From e0f47ae4dd94941a368155030173330d31addaec Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 24 Oct 2023 07:14:35 +0000 Subject: [PATCH] CodeGen from PR 26351 in Azure/azure-rest-api-specs Merge 2f78bb098c0023af8003ed520ebb8a8d8ec0ed44 into 567409e726635c1d4915ff9d752aa93a75fa9cb5 --- eng/versioning/version_client.txt | 1 + pom.xml | 1 + .../CHANGELOG.md | 5 + .../README.md | 107 + .../SAMPLE.md | 4192 +++++++++++ .../pom.xml | 62 + .../generated/ContainerServiceManager.java | 465 ++ .../generated/fluent/AgentPoolsClient.java | 422 ++ .../ContainerServiceManagementClient.java | 124 + .../fluent/ContainerServicesClient.java | 47 + .../MaintenanceConfigurationsClient.java | 142 + .../fluent/ManagedClustersClient.java | 1234 ++++ .../OpenShiftManagedClustersClient.java | 317 + .../generated/fluent/OperationsClient.java | 36 + .../PrivateEndpointConnectionsClient.java | 182 + .../fluent/PrivateLinkResourcesClient.java | 46 + .../ResolvePrivateLinkServiceIdsClient.java | 44 + .../generated/fluent/SnapshotsClient.java | 177 + .../TrustedAccessRoleBindingsClient.java | 213 + .../fluent/TrustedAccessRolesClient.java | 39 + .../fluent/models/AccessProfile.java | 51 + .../AgentPoolAvailableVersionsInner.java | 121 + .../AgentPoolAvailableVersionsProperties.java | 56 + .../fluent/models/AgentPoolInner.java | 1156 +++ .../models/AgentPoolUpgradeProfileInner.java | 190 + .../AgentPoolUpgradeProfileProperties.java | 150 + .../models/CommandResultProperties.java | 115 + .../fluent/models/CredentialResultsInner.java | 44 + .../KubernetesVersionListResultInner.java | 55 + .../models/MaintenanceConfigurationInner.java | 181 + .../MaintenanceConfigurationProperties.java | 124 + .../ManagedClusterAccessProfileInner.java | 99 + ...agedClusterAgentPoolProfileProperties.java | 1322 ++++ .../fluent/models/ManagedClusterInner.java | 1049 +++ .../models/ManagedClusterProperties.java | 1172 +++ .../ManagedClusterUpgradeProfileInner.java | 145 + ...anagedClusterUpgradeProfileProperties.java | 100 + .../models/MeshRevisionProfileInner.java | 71 + .../models/MeshUpgradeProfileInner.java | 71 + .../fluent/models/OSOptionProfileInner.java | 120 + .../fluent/models/OSOptionPropertyList.java | 63 + .../models/OpenShiftManagedClusterInner.java | 271 + .../OpenShiftManagedClusterProperties.java | 273 + .../fluent/models/OperationValueDisplay.java | 84 + .../fluent/models/OperationValueInner.java | 108 + ...estratorVersionProfileListResultInner.java | 121 + .../OrchestratorVersionProfileProperties.java | 63 + .../OutboundEnvironmentEndpointInner.java | 83 + .../PrivateEndpointConnectionInner.java | 104 + ...vateEndpointConnectionListResultInner.java | 54 + .../PrivateEndpointConnectionProperties.java | 112 + .../models/PrivateLinkResourceInner.java | 171 + .../PrivateLinkResourcesListResultInner.java | 54 + .../fluent/models/RunCommandResultInner.java | 112 + .../fluent/models/SnapshotInner.java | 182 + .../fluent/models/SnapshotProperties.java | 178 + .../models/TrustedAccessRoleBindingInner.java | 126 + .../TrustedAccessRoleBindingProperties.java | 111 + .../fluent/models/TrustedAccessRoleInner.java | 76 + .../generated/fluent/models/package-info.java | 6 + .../generated/fluent/package-info.java | 6 + .../AgentPoolAvailableVersionsImpl.java | 61 + .../implementation/AgentPoolImpl.java | 541 ++ .../AgentPoolUpgradeProfileImpl.java | 74 + .../implementation/AgentPoolsClientImpl.java | 2106 ++++++ .../implementation/AgentPoolsImpl.java | 285 + ...ntainerServiceManagementClientBuilder.java | 146 + .../ContainerServiceManagementClientImpl.java | 436 ++ .../ContainerServicesClientImpl.java | 220 + .../implementation/ContainerServicesImpl.java | 69 + .../implementation/CredentialResultsImpl.java | 49 + .../KubernetesVersionListResultImpl.java | 49 + .../MaintenanceConfigurationImpl.java | 192 + .../MaintenanceConfigurationsClientImpl.java | 907 +++ .../MaintenanceConfigurationsImpl.java | 216 + .../ManagedClusterAccessProfileImpl.java | 73 + .../implementation/ManagedClusterImpl.java | 681 ++ .../ManagedClusterUpgradeProfileImpl.java | 65 + .../ManagedClustersClientImpl.java | 6470 +++++++++++++++++ .../implementation/ManagedClustersImpl.java | 576 ++ .../MeshRevisionProfileImpl.java | 59 + .../MeshUpgradeProfileImpl.java | 59 + .../implementation/OSOptionProfileImpl.java | 61 + .../OpenShiftManagedClusterImpl.java | 285 + .../OpenShiftManagedClustersClientImpl.java | 1675 +++++ .../OpenShiftManagedClustersImpl.java | 191 + .../implementation/OperationValueImpl.java | 61 + .../implementation/OperationsClientImpl.java | 174 + .../implementation/OperationsImpl.java | 54 + ...hestratorVersionProfileListResultImpl.java | 61 + .../OutboundEnvironmentEndpointImpl.java | 53 + .../PrivateEndpointConnectionImpl.java | 64 + ...ivateEndpointConnectionListResultImpl.java | 56 + .../PrivateEndpointConnectionsClientImpl.java | 923 +++ .../PrivateEndpointConnectionsImpl.java | 144 + .../PrivateLinkResourceImpl.java | 68 + .../PrivateLinkResourcesClientImpl.java | 222 + .../PrivateLinkResourcesImpl.java | 69 + .../PrivateLinkResourcesListResultImpl.java | 56 + ...esolvePrivateLinkServiceIdsClientImpl.java | 237 + .../ResolvePrivateLinkServiceIdsImpl.java | 70 + .../implementation/RunCommandResultImpl.java | 66 + .../implementation/SnapshotImpl.java | 241 + .../implementation/SnapshotsClientImpl.java | 1226 ++++ .../implementation/SnapshotsImpl.java | 179 + .../TrustedAccessRoleBindingImpl.java | 178 + .../TrustedAccessRoleBindingsClientImpl.java | 1181 +++ .../TrustedAccessRoleBindingsImpl.java | 221 + .../implementation/TrustedAccessRoleImpl.java | 57 + .../TrustedAccessRolesClientImpl.java | 308 + .../TrustedAccessRolesImpl.java | 54 + .../generated/implementation/Utils.java | 204 + .../implementation/package-info.java | 6 + .../models/AbsoluteMonthlySchedule.java | 76 + .../generated/models/AgentPool.java | 1746 +++++ .../models/AgentPoolAvailableVersions.java | 48 + ...rsionsPropertiesAgentPoolVersionsItem.java | 102 + .../generated/models/AgentPoolListResult.java | 70 + .../generated/models/AgentPoolMode.java | 52 + .../generated/models/AgentPoolType.java | 47 + .../models/AgentPoolUpgradeProfile.java | 69 + ...lUpgradeProfilePropertiesUpgradesItem.java | 76 + .../models/AgentPoolUpgradeSettings.java | 103 + .../generated/models/AgentPools.java | 271 + .../generated/models/AzureKeyVaultKms.java | 152 + .../models/ClusterUpgradeSettings.java | 53 + .../generated/models/Code.java | 47 + .../generated/models/CompatibleVersions.java | 77 + .../generated/models/ConnectionStatus.java | 53 + .../models/ContainerServiceLinuxProfile.java | 93 + .../ContainerServiceNetworkProfile.java | 479 ++ .../ContainerServiceSshConfiguration.java | 64 + .../models/ContainerServiceSshPublicKey.java | 62 + .../generated/models/ContainerServices.java | 42 + .../generated/models/CreationData.java | 52 + .../generated/models/CredentialResult.java | 55 + .../generated/models/CredentialResults.java | 27 + .../generated/models/DailySchedule.java | 50 + .../generated/models/DateSpan.java | 92 + .../generated/models/DelegatedResource.java | 129 + .../generated/models/EndpointDependency.java | 80 + .../generated/models/EndpointDetail.java | 128 + .../generated/models/Expander.java | 59 + .../generated/models/ExtendedLocation.java | 76 + .../models/ExtendedLocationTypes.java | 44 + .../generated/models/Format.java | 47 + .../generated/models/GpuInstanceProfile.java | 56 + .../generated/models/IpFamily.java | 47 + .../models/IstioCertificateAuthority.java | 56 + .../generated/models/IstioComponents.java | 83 + .../generated/models/IstioEgressGateway.java | 79 + .../generated/models/IstioIngressGateway.java | 87 + .../models/IstioIngressGatewayMode.java | 47 + .../IstioPluginCertificateAuthority.java | 154 + .../generated/models/IstioServiceMesh.java | 118 + .../models/KeyVaultNetworkAccessTypes.java | 53 + .../generated/models/KubeletConfig.java | 375 + .../generated/models/KubeletDiskType.java | 47 + .../models/KubernetesPatchVersion.java | 51 + .../models/KubernetesSupportPlan.java | 47 + .../generated/models/KubernetesVersion.java | 144 + .../models/KubernetesVersionCapabilities.java | 51 + .../models/KubernetesVersionListResult.java | 27 + .../generated/models/LicenseType.java | 50 + .../generated/models/LinuxOSConfig.java | 162 + .../generated/models/LoadBalancerSku.java | 52 + .../models/MaintenanceConfiguration.java | 252 + .../MaintenanceConfigurationListResult.java | 70 + .../models/MaintenanceConfigurations.java | 148 + .../generated/models/MaintenanceWindow.java | 217 + .../generated/models/ManagedCluster.java | 1268 ++++ .../models/ManagedClusterAadProfile.java | 220 + .../models/ManagedClusterAccessProfile.java | 70 + .../models/ManagedClusterAddonProfile.java | 97 + .../ManagedClusterAddonProfileIdentity.java | 46 + .../ManagedClusterAgentPoolProfile.java | 338 + .../ManagedClusterApiServerAccessProfile.java | 188 + .../ManagedClusterAutoUpgradeProfile.java | 91 + .../ManagedClusterAzureMonitorProfile.java | 59 + ...erAzureMonitorProfileKubeStateMetrics.java | 93 + ...agedClusterAzureMonitorProfileMetrics.java | 93 + .../models/ManagedClusterHttpProxyConfig.java | 129 + .../models/ManagedClusterIdentity.java | 175 + .../models/ManagedClusterListResult.java | 70 + .../ManagedClusterLoadBalancerProfile.java | 230 + ...LoadBalancerProfileManagedOutboundIPs.java | 84 + ...ClusterLoadBalancerProfileOutboundIPs.java | 54 + ...LoadBalancerProfileOutboundIpPrefixes.java | 55 + ...anagedClusterManagedOutboundIpProfile.java | 53 + .../ManagedClusterNatGatewayProfile.java | 115 + .../ManagedClusterOidcIssuerProfile.java | 65 + .../models/ManagedClusterPodIdentity.java | 183 + .../ManagedClusterPodIdentityException.java | 132 + .../ManagedClusterPodIdentityProfile.java | 159 + ...edClusterPodIdentityProvisioningError.java | 53 + ...usterPodIdentityProvisioningErrorBody.java | 137 + ...gedClusterPodIdentityProvisioningInfo.java | 53 + ...edClusterPodIdentityProvisioningState.java | 60 + .../ManagedClusterPoolUpgradeProfile.java | 147 + ...ClusterPoolUpgradeProfileUpgradesItem.java | 76 + ...gedClusterPropertiesAutoScalerProfile.java | 621 ++ .../models/ManagedClusterSecurityProfile.java | 149 + ...ManagedClusterSecurityProfileDefender.java | 89 + ...rityProfileDefenderSecurityMonitoring.java | 50 + ...gedClusterSecurityProfileImageCleaner.java | 79 + ...lusterSecurityProfileWorkloadIdentity.java | 50 + ...ManagedClusterServicePrincipalProfile.java | 85 + .../generated/models/ManagedClusterSku.java | 85 + .../models/ManagedClusterSkuName.java | 44 + .../models/ManagedClusterSkuTier.java | 55 + .../models/ManagedClusterStorageProfile.java | 141 + ...gedClusterStorageProfileBlobCsiDriver.java | 50 + ...gedClusterStorageProfileDiskCsiDriver.java | 50 + ...gedClusterStorageProfileFileCsiDriver.java | 50 + ...usterStorageProfileSnapshotController.java | 50 + .../models/ManagedClusterUpgradeProfile.java | 55 + .../models/ManagedClusterWindowsProfile.java | 203 + ...nagedClusterWorkloadAutoScalerProfile.java | 85 + ...dClusterWorkloadAutoScalerProfileKeda.java | 50 + ...utoScalerProfileVerticalPodAutoscaler.java | 50 + .../generated/models/ManagedClusters.java | 785 ++ ...anagedClustersGetCommandResultHeaders.java | 58 + ...nagedClustersGetCommandResultResponse.java | 42 + ...ceIdentityUserAssignedIdentitiesValue.java | 54 + .../generated/models/MeshRevision.java | 108 + .../generated/models/MeshRevisionProfile.java | 55 + .../models/MeshRevisionProfileList.java | 70 + .../models/MeshRevisionProfileProperties.java | 54 + .../generated/models/MeshUpgradeProfile.java | 55 + .../models/MeshUpgradeProfileList.java | 70 + .../models/MeshUpgradeProfileProperties.java | 47 + .../generated/models/NetworkDataplane.java | 47 + .../generated/models/NetworkMode.java | 51 + .../generated/models/NetworkPlugin.java | 50 + .../generated/models/NetworkPluginMode.java | 44 + .../generated/models/NetworkPolicy.java | 50 + .../generated/models/NetworkProfile.java | 102 + .../models/NodeOSUpgradeChannel.java | 54 + .../generated/models/OSDiskType.java | 53 + .../generated/models/OSOptionProfile.java | 48 + .../generated/models/OSOptionProperty.java | 84 + .../generated/models/OSType.java | 47 + .../models/OpenShiftAgentPoolProfileRole.java | 47 + .../OpenShiftContainerServiceVMSize.java | 140 + .../models/OpenShiftManagedCluster.java | 373 + ...hiftManagedClusterAadIdentityProvider.java | 134 + ...enShiftManagedClusterAgentPoolProfile.java | 195 + .../OpenShiftManagedClusterAuthProfile.java | 55 + ...iftManagedClusterBaseIdentityProvider.java | 35 + ...enShiftManagedClusterIdentityProvider.java | 79 + .../OpenShiftManagedClusterListResult.java | 70 + ...nShiftManagedClusterMasterPoolProfile.java | 165 + .../models/OpenShiftManagedClusters.java | 191 + .../models/OpenShiftRouterProfile.java | 80 + .../generated/models/OperationListResult.java | 44 + .../generated/models/OperationValue.java | 61 + .../generated/models/Operations.java | 31 + .../generated/models/OrchestratorProfile.java | 111 + .../models/OrchestratorVersionProfile.java | 173 + .../OrchestratorVersionProfileListResult.java | 48 + .../generated/models/Ossku.java | 59 + .../models/OutboundEnvironmentEndpoint.java | 35 + ...OutboundEnvironmentEndpointCollection.java | 78 + .../generated/models/OutboundType.java | 58 + .../generated/models/PowerState.java | 50 + .../generated/models/PrivateEndpoint.java | 50 + .../models/PrivateEndpointConnection.java | 62 + .../PrivateEndpointConnectionListResult.java | 27 + ...teEndpointConnectionProvisioningState.java | 57 + .../models/PrivateEndpointConnections.java | 137 + .../generated/models/PrivateLinkResource.java | 63 + .../models/PrivateLinkResources.java | 41 + .../PrivateLinkResourcesListResult.java | 27 + .../PrivateLinkServiceConnectionState.java | 76 + .../generated/models/PublicNetworkAccess.java | 51 + .../generated/models/PurchasePlan.java | 131 + .../models/RelativeMonthlySchedule.java | 123 + .../models/ResolvePrivateLinkServiceIds.java | 40 + .../models/ResourceIdentityType.java | 59 + .../generated/models/ResourceReference.java | 50 + .../generated/models/RunCommandRequest.java | 110 + .../generated/models/RunCommandResult.java | 69 + .../generated/models/ScaleDownMode.java | 50 + .../models/ScaleSetEvictionPolicy.java | 52 + .../generated/models/ScaleSetPriority.java | 47 + .../generated/models/Schedule.java | 147 + .../generated/models/ServiceMeshMode.java | 47 + .../generated/models/ServiceMeshProfile.java | 87 + .../generated/models/Snapshot.java | 301 + .../generated/models/SnapshotListResult.java | 70 + .../generated/models/SnapshotType.java | 44 + .../generated/models/Snapshots.java | 157 + .../generated/models/SysctlConfig.java | 752 ++ .../generated/models/TagsObject.java | 53 + .../generated/models/TimeInWeek.java | 89 + .../generated/models/TimeSpan.java | 81 + .../generated/models/TrustedAccessRole.java | 42 + .../models/TrustedAccessRoleBinding.java | 221 + .../TrustedAccessRoleBindingListResult.java | 70 + ...tedAccessRoleBindingProvisioningState.java | 57 + .../models/TrustedAccessRoleBindings.java | 142 + .../models/TrustedAccessRoleListResult.java | 59 + .../models/TrustedAccessRoleRule.java | 100 + .../generated/models/TrustedAccessRoles.java | 34 + .../generated/models/Type.java | 60 + .../generated/models/UpgradeChannel.java | 61 + .../models/UpgradeOverrideSettings.java | 88 + .../models/UserAssignedIdentity.java | 102 + .../generated/models/WeekDay.java | 62 + .../generated/models/WeeklySchedule.java | 84 + .../generated/models/WindowsGmsaProfile.java | 114 + .../generated/models/WorkloadRuntime.java | 47 + .../generated/models/package-info.java | 6 + .../generated/package-info.java | 6 + .../src/main/java/module-info.java | 19 + .../proxy-config.json | 1 + .../reflect-config.json | 1006 +++ .../generated/generated/AgentPoolsAbor.java | 24 + .../generated/generated/AgentPoolsCrea.java | 510 ++ .../generated/generated/AgentPoolsDele.java | 22 + .../generated/generated/AgentPoolsGetA.java | 24 + .../generated/generated/AgentPoolsGetS.java | 22 + .../generated/generated/AgentPoolsGetU.java | 24 + .../generated/generated/AgentPoolsList.java | 22 + .../generated/generated/AgentPoolsUpgr.java | 24 + .../generated/generated/ContainerServi.java | 22 + .../generated/generated/MaintenanceCon.java | 94 + .../generated/generated/ManagedCluster.java | 1905 +++++ .../generated/generated/OpenShiftManag.java | 114 + .../generated/generated/OperationsList.java | 22 + .../generated/generated/PrivateEndpoin.java | 35 + .../generated/generated/PrivateLinkRes.java | 22 + .../generated/generated/ResolvePrivate.java | 30 + .../generated/generated/SnapshotsCreat.java | 48 + .../generated/generated/SnapshotsDelet.java | 22 + .../generated/generated/SnapshotsGetBy.java | 22 + .../generated/generated/SnapshotsListB.java | 22 + .../generated/generated/SnapshotsListS.java | 22 + .../generated/generated/SnapshotsUpdat.java | 43 + .../generated/generated/TrustedAccessR.java | 37 + .../ci.yml | 47 + .../pom.xml | 15 + 342 files changed, 65228 insertions(+) create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/CHANGELOG.md create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/README.md create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/ContainerServiceManager.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/AgentPoolsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServiceManagementClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServicesClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MaintenanceConfigurationsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClustersClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OpenShiftManagedClustersClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateLinkResourcesClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ResolvePrivateLinkServiceIdsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/SnapshotsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRoleBindingsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRolesClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AccessProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CommandResultProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CredentialResultsInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/KubernetesVersionListResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAccessProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAgentPoolProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshRevisionProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshUpgradeProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionPropertyList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueDisplay.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileListResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OutboundEnvironmentEndpointInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionListResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourcesListResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/RunCommandResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolAvailableVersionsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolUpgradeProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientBuilder.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/CredentialResultsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/KubernetesVersionListResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterAccessProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterUpgradeProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshRevisionProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshUpgradeProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OSOptionProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClusterImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationValueImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OrchestratorVersionProfileListResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OutboundEnvironmentEndpointImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionListResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesListResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/RunCommandResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/Utils.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AbsoluteMonthlySchedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPool.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersions.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeSettings.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPools.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AzureKeyVaultKms.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ClusterUpgradeSettings.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Code.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CompatibleVersions.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ConnectionStatus.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceLinuxProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshConfiguration.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshPublicKey.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServices.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CreationData.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResults.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DailySchedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DateSpan.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DelegatedResource.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDependency.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDetail.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Expander.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocation.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocationTypes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Format.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GpuInstanceProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpFamily.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioCertificateAuthority.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioComponents.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioEgressGateway.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGateway.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGatewayMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioPluginCertificateAuthority.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioServiceMesh.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KeyVaultNetworkAccessTypes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletDiskType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesPatchVersion.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesSupportPlan.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersion.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionCapabilities.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LicenseType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LinuxOSConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LoadBalancerSku.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfiguration.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurationListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurations.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceWindow.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedCluster.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAadProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAccessProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfileIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAgentPoolProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterApiServerAccessProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAutoUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileMetrics.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterHttpProxyConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterManagedOutboundIpProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNatGatewayProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterOidcIssuerProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityException.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningError.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningErrorBody.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningInfo.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesAutoScalerProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefender.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageCleaner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileWorkloadIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterServicePrincipalProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSku.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuName.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuTier.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileBlobCsiDriver.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileDiskCsiDriver.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileFileCsiDriver.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileSnapshotController.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWindowsProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileKeda.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusters.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultHeaders.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultResponse.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevision.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkDataplane.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPlugin.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPluginMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPolicy.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeOSUpgradeChannel.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSDiskType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProperty.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftAgentPoolProfileRole.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftContainerServiceVMSize.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedCluster.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAadIdentityProvider.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAgentPoolProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAuthProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterBaseIdentityProvider.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterIdentityProvider.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterMasterPoolProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusters.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftRouterProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationValue.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Operations.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfileListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Ossku.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpoint.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpointCollection.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PowerState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpoint.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnection.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnections.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResource.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResources.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResourcesListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PublicNetworkAccess.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PurchasePlan.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RelativeMonthlySchedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResolvePrivateLinkServiceIds.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceIdentityType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceReference.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandRequest.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleDownMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetEvictionPolicy.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetPriority.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Schedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshot.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshots.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SysctlConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TagsObject.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeInWeek.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeSpan.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRole.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBinding.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingProvisioningState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindings.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleRule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoles.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Type.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeChannel.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeOverrideSettings.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UserAssignedIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeekDay.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeeklySchedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WindowsGmsaProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WorkloadRuntime.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/module-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/proxy-config.json create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/reflect-config.json create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsAbor.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsCrea.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsDele.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetA.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetS.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetU.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsUpgr.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ContainerServi.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MaintenanceCon.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ManagedCluster.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OpenShiftManag.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationsList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateEndpoin.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateLinkRes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ResolvePrivate.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsCreat.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsDelet.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsGetBy.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListB.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListS.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsUpdat.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/TrustedAccessR.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/ci.yml create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index cf6968be50d37..17dc253c15d94 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -432,6 +432,7 @@ com.azure.resourcemanager:azure-resourcemanager-apicenter;1.0.0-beta.1;1.0.0-bet com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-playwrighttesting;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-recoveryservicesdatareplication;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1 diff --git a/pom.xml b/pom.xml index 5623ede6090d1..d084926286518 100644 --- a/pom.xml +++ b/pom.xml @@ -48,6 +48,7 @@ sdk/consumption sdk/containerregistry sdk/containerservicefleet + sdk/containerservicemicrosoftcontainerserviceaks sdk/contentsafety sdk/core sdk/cosmos diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/CHANGELOG.md b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/CHANGELOG.md new file mode 100644 index 0000000000000..e96e0e3ce950b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-10-24) + +- Azure Resource Manager ContainerService client library for Java. This package contains Microsoft Azure SDK for ContainerService Management SDK. Container Service Client. Package tag package-2023-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/README.md b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/README.md new file mode 100644 index 0000000000000..e6f7b1e0b5a66 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/README.md @@ -0,0 +1,107 @@ +# Azure Resource Manager ContainerService client library for Java + +Azure Resource Manager ContainerService client library for Java. + +This package contains Microsoft Azure SDK for ContainerService Management SDK. Container Service Client. Package tag package-2023-09. 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 + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +ContainerServiceManager manager = ContainerServiceManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcontainerservicemicrosoftcontainerserviceaks%2Fazure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated%2FREADME.png) diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md new file mode 100644 index 0000000000000..da13fec439450 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md @@ -0,0 +1,4192 @@ +# Code snippets and samples + + +## AgentPools + +- [AbortLatestOperation](#agentpools_abortlatestoperation) +- [CreateOrUpdate](#agentpools_createorupdate) +- [Delete](#agentpools_delete) +- [Get](#agentpools_get) +- [GetAvailableAgentPoolVersions](#agentpools_getavailableagentpoolversions) +- [GetUpgradeProfile](#agentpools_getupgradeprofile) +- [List](#agentpools_list) +- [UpgradeNodeImageVersion](#agentpools_upgradenodeimageversion) + +## ContainerServices + +- [ListOrchestrators](#containerservices_listorchestrators) + +## MaintenanceConfigurations + +- [CreateOrUpdate](#maintenanceconfigurations_createorupdate) +- [Delete](#maintenanceconfigurations_delete) +- [Get](#maintenanceconfigurations_get) +- [ListByManagedCluster](#maintenanceconfigurations_listbymanagedcluster) + +## ManagedClusters + +- [AbortLatestOperation](#managedclusters_abortlatestoperation) +- [CreateOrUpdate](#managedclusters_createorupdate) +- [Delete](#managedclusters_delete) +- [GetAccessProfile](#managedclusters_getaccessprofile) +- [GetByResourceGroup](#managedclusters_getbyresourcegroup) +- [GetCommandResult](#managedclusters_getcommandresult) +- [GetMeshRevisionProfile](#managedclusters_getmeshrevisionprofile) +- [GetMeshUpgradeProfile](#managedclusters_getmeshupgradeprofile) +- [GetOSOptions](#managedclusters_getosoptions) +- [GetUpgradeProfile](#managedclusters_getupgradeprofile) +- [List](#managedclusters_list) +- [ListByResourceGroup](#managedclusters_listbyresourcegroup) +- [ListClusterAdminCredentials](#managedclusters_listclusteradmincredentials) +- [ListClusterMonitoringUserCredentials](#managedclusters_listclustermonitoringusercredentials) +- [ListClusterUserCredentials](#managedclusters_listclusterusercredentials) +- [ListKubernetesVersions](#managedclusters_listkubernetesversions) +- [ListMeshRevisionProfiles](#managedclusters_listmeshrevisionprofiles) +- [ListMeshUpgradeProfiles](#managedclusters_listmeshupgradeprofiles) +- [ListOutboundNetworkDependenciesEndpoints](#managedclusters_listoutboundnetworkdependenciesendpoints) +- [ResetAadProfile](#managedclusters_resetaadprofile) +- [ResetServicePrincipalProfile](#managedclusters_resetserviceprincipalprofile) +- [RotateClusterCertificates](#managedclusters_rotateclustercertificates) +- [RotateServiceAccountSigningKeys](#managedclusters_rotateserviceaccountsigningkeys) +- [RunCommand](#managedclusters_runcommand) +- [Start](#managedclusters_start) +- [Stop](#managedclusters_stop) +- [UpdateTags](#managedclusters_updatetags) + +## OpenShiftManagedClusters + +- [CreateOrUpdate](#openshiftmanagedclusters_createorupdate) +- [Delete](#openshiftmanagedclusters_delete) +- [GetByResourceGroup](#openshiftmanagedclusters_getbyresourcegroup) +- [List](#openshiftmanagedclusters_list) +- [ListByResourceGroup](#openshiftmanagedclusters_listbyresourcegroup) +- [UpdateTags](#openshiftmanagedclusters_updatetags) + +## Operations + +- [List](#operations_list) + +## PrivateEndpointConnections + +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [List](#privateendpointconnections_list) +- [Update](#privateendpointconnections_update) + +## PrivateLinkResources + +- [List](#privatelinkresources_list) + +## ResolvePrivateLinkServiceId + +- [Post](#resolveprivatelinkserviceid_post) + +## Snapshots + +- [CreateOrUpdate](#snapshots_createorupdate) +- [Delete](#snapshots_delete) +- [GetByResourceGroup](#snapshots_getbyresourcegroup) +- [List](#snapshots_list) +- [ListByResourceGroup](#snapshots_listbyresourcegroup) +- [UpdateTags](#snapshots_updatetags) + +## TrustedAccessRoleBindings + +- [CreateOrUpdate](#trustedaccessrolebindings_createorupdate) +- [Delete](#trustedaccessrolebindings_delete) +- [Get](#trustedaccessrolebindings_get) +- [List](#trustedaccessrolebindings_list) + +## TrustedAccessRoles + +- [List](#trustedaccessroles_list) +### AgentPools_AbortLatestOperation + +```java +/** Samples for AgentPools AbortLatestOperation. */ +public final class AgentPoolsAbor { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsAbortOperation.json + */ + /** + * Sample code: Abort operation on agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void abortOperationOnAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .abortLatestOperation("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPool; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Code; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SysctlConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for AgentPools CreateOrUpdate. */ +public final class AgentPoolsCrea { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_EnableFIPS.json + */ + /** + * Sample code: Create Agent Pool with FIPS enabled OS. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithFIPSEnabledOS( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableFips(true) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_GPUMIG.json + */ + /** + * Sample code: Create Agent Pool with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithGPUMIG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_ND96asr_v4") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withKubeletConfig( + new KubeletConfig() + .withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig( + new LinuxOSConfig() + .withSysctls( + new SysctlConfig() + .withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)) + .withGpuInstanceProfile(GpuInstanceProfile.MIG2G) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_WindowsOSSKU.json + */ + /** + * Sample code: Create Agent Pool with Windows OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithWindowsOSSKU( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("wnp2") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_D4s_v3") + .withOsType(OSType.WINDOWS) + .withOsSku(Ossku.WINDOWS2022) + .withOrchestratorVersion("1.23.3") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_DedicatedHostGroup.json + */ + /** + * Sample code: Create Agent Pool with Dedicated Host Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithDedicatedHostGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_Update.json + */ + /** + * Sample code: Create/Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withTags(mapOf("name1", "val1")) + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPools_Start.json + */ + /** + * Sample code: Start Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void startAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withPowerState(new PowerState().withCode(Code.RUNNING)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_Spot.json + */ + /** + * Sample code: Create Spot Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createSpotAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withTags(mapOf("name1", "val1")) + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_Ephemeral.json + */ + /** + * Sample code: Create Agent Pool with Ephemeral OS Disk. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithEphemeralOSDisk( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsDiskSizeGB(64) + .withOsDiskType(OSDiskType.EPHEMERAL) + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json + */ + /** + * Sample code: Create Agent Pool with EncryptionAtHost enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithEncryptionAtHostEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableEncryptionAtHost(true) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_EnableUltraSSD.json + */ + /** + * Sample code: Create Agent Pool with UltraSSD enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithUltraSSDEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableUltraSsd(true) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_WasmWasi.json + */ + /** + * Sample code: Create Agent Pool with Krustlet and the WASI runtime. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithKrustletAndTheWASIRuntime( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsDiskSizeGB(64) + .withWorkloadRuntime(WorkloadRuntime.WASM_WASI) + .withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER) + .withOrchestratorVersion("") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_Snapshot.json + */ + /** + * Sample code: Create Agent Pool using an agent pool snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolUsingAnAgentPoolSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableFips(true) + .withCreationData( + new CreationData() + .withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_PPG.json + */ + /** + * Sample code: Create Agent Pool with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithPPG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_CustomNodeConfig.json + */ + /** + * Sample code: Create Agent Pool with KubeletConfig and LinuxOSConfig. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithKubeletConfigAndLinuxOSConfig( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withKubeletConfig( + new KubeletConfig() + .withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig( + new LinuxOSConfig() + .withSysctls( + new SysctlConfig() + .withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPools_Stop.json + */ + /** + * Sample code: Stop Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withPowerState(new PowerState().withCode(Code.STOPPED)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_OSSKU.json + */ + /** + * Sample code: Create Agent Pool with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithOSSKU( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOsSku(Ossku.AZURE_LINUX) + .withOrchestratorVersion("") + .withKubeletConfig( + new KubeletConfig() + .withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig( + new LinuxOSConfig() + .withSysctls( + new SysctlConfig() + .withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPools_Update.json + */ + /** + * Sample code: Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + AgentPool resource = + manager + .agentPools() + .getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withMaxCount(2) + .withMinCount(2) + .withEnableAutoScaling(true) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### AgentPools_Delete + +```java +/** Samples for AgentPools Delete. */ +public final class AgentPoolsDele { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsDelete.json + */ + /** + * Sample code: Delete Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.agentPools().delete("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_Get + +```java +/** Samples for AgentPools Get. */ +public final class AgentPoolsGetS { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsGet.json + */ + /** + * Sample code: Get Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.agentPools().getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_GetAvailableAgentPoolVersions + +```java +/** Samples for AgentPools GetAvailableAgentPoolVersions. */ +public final class AgentPoolsGetA { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json + */ + /** + * Sample code: Get available versions for agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAvailableVersionsForAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .getAvailableAgentPoolVersionsWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_GetUpgradeProfile + +```java +/** Samples for AgentPools GetUpgradeProfile. */ +public final class AgentPoolsGetU { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsGetUpgradeProfile.json + */ + /** + * Sample code: Get Upgrade Profile for Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getUpgradeProfileForAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .getUpgradeProfileWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_List + +```java +/** Samples for AgentPools List. */ +public final class AgentPoolsList { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsList.json + */ + /** + * Sample code: List Agent Pools by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listAgentPoolsByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.agentPools().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_UpgradeNodeImageVersion + +```java +/** Samples for AgentPools UpgradeNodeImageVersion. */ +public final class AgentPoolsUpgr { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsUpgradeNodeImageVersion.json + */ + /** + * Sample code: Upgrade Agent Pool Node Image Version. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void upgradeAgentPoolNodeImageVersion( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .upgradeNodeImageVersion("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerServices_ListOrchestrators + +```java +/** Samples for ContainerServices ListOrchestrators. */ +public final class ContainerServi { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-08-01/examples/ContainerServiceListOrchestrators.json + */ + /** + * Sample code: List Container Service Orchestrators. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listContainerServiceOrchestrators( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.containerServices().listOrchestratorsWithResponse("location1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceConfigurations_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.DateSpan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RelativeMonthlySchedule; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Schedule; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Type; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WeekDay; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** Samples for MaintenanceConfigurations CreateOrUpdate. */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsCreate_Update.json + */ + /** + * Sample code: Create/Update Maintenance Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateMaintenanceConfiguration( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .define("default") + .withExistingManagedCluster("rg1", "clustername1") + .withTimeInWeek(Arrays.asList(new TimeInWeek().withDay(WeekDay.MONDAY).withHourSlots(Arrays.asList(1, 2)))) + .withNotAllowedTime( + Arrays + .asList( + new TimeSpan() + .withStart(OffsetDateTime.parse("2020-11-26T03:00:00Z")) + .withEnd(OffsetDateTime.parse("2020-11-30T12:00:00Z")))) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + */ + /** + * Sample code: Create/Update Maintenance Configuration with Maintenance Window. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateMaintenanceConfigurationWithMaintenanceWindow( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .define("aksManagedAutoUpgradeSchedule") + .withExistingManagedCluster("rg1", "clustername1") + .withMaintenanceWindow( + new MaintenanceWindow() + .withSchedule( + new Schedule() + .withRelativeMonthly( + new RelativeMonthlySchedule() + .withIntervalMonths(3) + .withWeekIndex(Type.FIRST) + .withDayOfWeek(WeekDay.MONDAY))) + .withDurationHours(10) + .withUtcOffset("+05:30") + .withStartDate(LocalDate.parse("2023-01-01")) + .withStartTime("08:30") + .withNotAllowedDates( + Arrays + .asList( + new DateSpan() + .withStart(LocalDate.parse("2023-02-18")) + .withEnd(LocalDate.parse("2023-02-25")), + new DateSpan() + .withStart(LocalDate.parse("2023-12-23")) + .withEnd(LocalDate.parse("2024-01-05"))))) + .create(); + } +} +``` + +### MaintenanceConfigurations_Delete + +```java +/** Samples for MaintenanceConfigurations Delete. */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsDelete.json + */ + /** + * Sample code: Delete Maintenance Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteMaintenanceConfiguration( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .deleteWithResponse("rg1", "clustername1", "default", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json + */ + /** + * Sample code: Delete Maintenance Configuration For Node OS Upgrade. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteMaintenanceConfigurationForNodeOSUpgrade( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .deleteWithResponse( + "rg1", "clustername1", "aksManagedNodeOSUpgradeSchedule", com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceConfigurations_Get + +```java +/** Samples for MaintenanceConfigurations Get. */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsGet.json + */ + /** + * Sample code: Get Maintenance Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getMaintenanceConfiguration( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .getWithResponse("rg1", "clustername1", "default", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json + */ + /** + * Sample code: Get Maintenance Configuration Configured With Maintenance Window. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getMaintenanceConfigurationConfiguredWithMaintenanceWindow( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .getWithResponse( + "rg1", "clustername1", "aksManagedNodeOSUpgradeSchedule", com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceConfigurations_ListByManagedCluster + +```java +/** Samples for MaintenanceConfigurations ListByManagedCluster. */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json + */ + /** + * Sample code: List maintenance configurations configured with maintenance window by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsList.json + */ + /** + * Sample code: List maintenance configurations by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceConfigurationsByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_AbortLatestOperation + +```java +/** Samples for ManagedClusters AbortLatestOperation. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersAbortOperation.json + */ + /** + * Sample code: Abort operation on managed cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void abortOperationOnManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().abortLatestOperation("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceSshConfiguration; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceSshPublicKey; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Expander; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IpFamily; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioCertificateAuthority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioComponents; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioEgressGateway; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGateway; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGatewayMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioPluginCertificateAuthority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioServiceMesh; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LicenseType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LoadBalancerSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterManagedOutboundIpProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNatGatewayProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefender; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileWorkloadIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuName; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuTier; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedServiceIdentityUserAssignedIdentitiesValue; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceIdentityType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UpgradeOverrideSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WindowsGmsaProfile; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedClusters CreateOrUpdate. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_DualStackNetworking.json + */ + /** + * Sample code: Create/Update Managed Cluster with dual-stack networking. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithDualStackNetworking( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity( + new ManagedClusterIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withScaleDownMode(ScaleDownMode.DEALLOCATE) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) + .withIpFamilies(Arrays.asList(IpFamily.IPV4, IpFamily.IPV6))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withBalanceSimilarNodeGroups("true") + .withExpander(Expander.PRIORITY) + .withMaxNodeProvisionTime("15m") + .withNewPodScaleUpDelay("1m") + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m") + .withSkipNodesWithSystemPods("false")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_PodIdentity.json + */ + /** + * Sample code: Create Managed Cluster with PodIdentity enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithPodIdentityEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withPodIdentityProfile( + new ManagedClusterPodIdentityProfile().withEnabled(true).withAllowNetworkPluginKubenet(true)) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json + */ + /** + * Sample code: Create Managed Cluster with user-assigned NAT gateway as outbound type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(false) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.USER_ASSIGNED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD)) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity( + new ManagedClusterIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withScaleDownMode(ScaleDownMode.DEALLOCATE) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withUpgradeSettings( + new ClusterUpgradeSettings() + .withOverrideSettings( + new UpgradeOverrideSettings() + .withForceUpgrade(false) + .withUntil(OffsetDateTime.parse("2022-11-01T13:00:00Z")))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withBalanceSimilarNodeGroups("true") + .withExpander(Expander.PRIORITY) + .withMaxNodeProvisionTime("15m") + .withNewPodScaleUpDelay("1m") + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m") + .withSkipNodesWithSystemPods("false")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + */ + /** + * Sample code: Create Managed Private Cluster with fqdn subdomain specified. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withFqdnSubdomain("domain1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile( + new ManagedClusterApiServerAccessProfile() + .withEnablePrivateCluster(true) + .withPrivateDnsZone( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_ManagedNATGateway.json + */ + /** + * Sample code: Create Managed Cluster with AKS-managed NAT gateway as outbound type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(false) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.MANAGED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withNatGatewayProfile( + new ManagedClusterNatGatewayProfile() + .withManagedOutboundIpProfile(new ManagedClusterManagedOutboundIpProfile().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_Premium.json + */ + /** + * Sample code: Create Managed Cluster with LongTermSupport. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithLongTermSupport( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku().withName(ManagedClusterSkuName.BASE).withTier(ManagedClusterSkuTier.PREMIUM)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withSupportPlan(KubernetesSupportPlan.AKSLONG_TERM_SUPPORT) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json + */ + /** + * Sample code: Create Managed Cluster with Node Public IP Prefix. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithNodePublicIPPrefix( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withNodePublicIpPrefixId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix") + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json + */ + /** + * Sample code: Create Managed Cluster with EncryptionAtHost enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithEncryptionAtHostEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json + */ + /** + * Sample code: Create Managed Private Cluster with Public FQDN specified. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithPublicFQDNSpecified( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile( + new ManagedClusterApiServerAccessProfile() + .withEnablePrivateCluster(true) + .withEnablePrivateClusterPublicFqdn(true)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_HTTPProxy.json + */ + /** + * Sample code: Create Managed Cluster with HTTP proxy configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithHTTPProxyConfigured( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig( + new ManagedClusterHttpProxyConfig() + .withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_DedicatedHostGroup.json + */ + /** + * Sample code: Create Managed Cluster with Dedicated Host Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithDedicatedHostGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withEnableNodePublicIp(true) + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(false) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_EnabledFIPS.json + */ + /** + * Sample code: Create Managed Cluster with FIPS enabled OS. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithFIPSEnabledOS( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(false) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_SecurityProfile.json + */ + /** + * Sample code: Create Managed Cluster with Security Profile configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithSecurityProfileConfigured( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withSecurityProfile( + new ManagedClusterSecurityProfile() + .withDefender( + new ManagedClusterSecurityProfileDefender() + .withLogAnalyticsWorkspaceResourceId( + "/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME") + .withSecurityMonitoring( + new ManagedClusterSecurityProfileDefenderSecurityMonitoring().withEnabled(true))) + .withWorkloadIdentity(new ManagedClusterSecurityProfileWorkloadIdentity().withEnabled(true))) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_PPG.json + */ + /** + * Sample code: Create Managed Cluster with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithPPG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1") + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_UpdateWithAHUB.json + */ + /** + * Sample code: Create/Update Managed Cluster with EnableAHUB. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithEnableAHUB( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity( + new ManagedClusterIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder") + .withLicenseType(LicenseType.WINDOWS_SERVER)) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_DisableRunCommand.json + */ + /** + * Sample code: Create Managed Cluster with RunCommand disabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithRunCommandDisabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_Snapshot.json + */ + /** + * Sample code: Create Managed Cluster using an agent pool snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterUsingAnAgentPoolSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withCreationData( + new CreationData() + .withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(false) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_AzureServiceMesh.json + */ + /** + * Sample code: Create/Update Managed Cluster with Azure Service Mesh. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithAzureServiceMesh( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles( + mapOf( + "azureKeyvaultSecretsProvider", + new ManagedClusterAddonProfile() + .withEnabled(true) + .withConfig( + mapOf("enableSecretRotation", "fakeTokenPlaceholder", "rotationPollInterval", "2m")))) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withServiceMeshProfile( + new ServiceMeshProfile() + .withMode(ServiceMeshMode.ISTIO) + .withIstio( + new IstioServiceMesh() + .withComponents( + new IstioComponents() + .withIngressGateways( + Arrays + .asList( + new IstioIngressGateway() + .withMode(IstioIngressGatewayMode.INTERNAL) + .withEnabled(true))) + .withEgressGateways( + Arrays + .asList( + new IstioEgressGateway() + .withEnabled(true) + .withNodeSelector(mapOf("istio", "egress"))))) + .withCertificateAuthority( + new IstioCertificateAuthority() + .withPlugin( + new IstioPluginCertificateAuthority() + .withKeyVaultId("fakeTokenPlaceholder") + .withCertObjectName("ca-cert") + .withKeyObjectName("fakeTokenPlaceholder") + .withRootCertObjectName("root-cert") + .withCertChainObjectName("cert-chain"))))) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + */ + /** + * Sample code: Create Managed Cluster with Azure KeyVault Secrets Provider Addon. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles( + mapOf( + "azureKeyvaultSecretsProvider", + new ManagedClusterAddonProfile() + .withEnabled(true) + .withConfig( + mapOf("enableSecretRotation", "fakeTokenPlaceholder", "rotationPollInterval", "2m")))) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_OSSKU.json + */ + /** + * Sample code: Create Managed Cluster with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithOSSKU( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOsSku(Ossku.AZURE_LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig( + new ManagedClusterHttpProxyConfig() + .withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + */ + /** + * Sample code: Create/Update AAD Managed Cluster with EnableAzureRBAC. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateAADManagedClusterWithEnableAzureRBAC( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAadProfile(new ManagedClusterAadProfile().withManaged(true).withEnableAzureRbac(true)) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_EnableUltraSSD.json + */ + /** + * Sample code: Create Managed Cluster with UltraSSD enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithUltraSSDEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableUltraSsd(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json + */ + /** + * Sample code: Create/Update Managed Cluster with Windows gMSA enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithWindowsGMSAEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity( + new ManagedClusterIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder") + .withGmsaProfile(new WindowsGmsaProfile().withEnabled(true))) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_GPUMIG.json + */ + /** + * Sample code: Create Managed Cluster with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithGPUMIG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_ND96asr_v4") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withGpuInstanceProfile(GpuInstanceProfile.MIG3G) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig( + new ManagedClusterHttpProxyConfig() + .withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ManagedClusters_Delete + +```java +/** Samples for ManagedClusters Delete. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersDelete.json + */ + /** + * Sample code: Delete Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().delete("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetAccessProfile + +```java +/** Samples for ManagedClusters GetAccessProfile. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersGetAccessProfile.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .getAccessProfileWithResponse("rg1", "clustername1", "clusterUser", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetByResourceGroup + +```java +/** Samples for ManagedClusters GetByResourceGroup. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersGet.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetCommandResult + +```java +/** Samples for ManagedClusters GetCommandResult. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/RunCommandResultFailed.json + */ + /** + * Sample code: commandFailedResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void commandFailedResult( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .getCommandResultWithResponse( + "rg1", "clustername1", "def7b3ea71bd4f7e9d226ddbc0f00ad9", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/RunCommandResultSucceed.json + */ + /** + * Sample code: commandSucceedResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void commandSucceedResult( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .getCommandResultWithResponse( + "rg1", "clustername1", "def7b3ea71bd4f7e9d226ddbc0f00ad9", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetMeshRevisionProfile + +```java +/** Samples for ManagedClusters GetMeshRevisionProfile. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersGet_MeshRevisionProfile.json + */ + /** + * Sample code: Get a mesh revision profile for a mesh mode. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAMeshRevisionProfileForAMeshMode( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .getMeshRevisionProfileWithResponse("location1", "istio", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetMeshUpgradeProfile + +```java +/** Samples for ManagedClusters GetMeshUpgradeProfile. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersGet_MeshUpgradeProfile.json + */ + /** + * Sample code: Gets version compatibility and upgrade profile for a service mesh in a cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getsVersionCompatibilityAndUpgradeProfileForAServiceMeshInACluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .getMeshUpgradeProfileWithResponse("rg1", "clustername1", "istio", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetOSOptions + +```java +/** Samples for ManagedClusters GetOSOptions. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ContainerServiceGetOSOptions.json + */ + /** + * Sample code: Get Container Service OS Options. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getContainerServiceOSOptions( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().getOSOptionsWithResponse("location1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetUpgradeProfile + +```java +/** Samples for ManagedClusters GetUpgradeProfile. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersGetUpgradeProfile.json + */ + /** + * Sample code: Get Upgrade Profile for Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getUpgradeProfileForManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .getUpgradeProfileWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_List + +```java +/** Samples for ManagedClusters List. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersList.json + */ + /** + * Sample code: List Managed Clusters. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusters( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListByResourceGroup + +```java +/** Samples for ManagedClusters ListByResourceGroup. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersListByResourceGroup.json + */ + /** + * Sample code: Get Managed Clusters by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedClustersByResourceGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListClusterAdminCredentials + +```java +/** Samples for ManagedClusters ListClusterAdminCredentials. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersListClusterAdminCredentials.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .listClusterAdminCredentialsWithResponse("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListClusterMonitoringUserCredentials + +```java +/** Samples for ManagedClusters ListClusterMonitoringUserCredentials. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .listClusterMonitoringUserCredentialsWithResponse( + "rg1", "clustername1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListClusterUserCredentials + +```java +/** Samples for ManagedClusters ListClusterUserCredentials. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersListClusterUserCredentials.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .listClusterUserCredentialsWithResponse( + "rg1", "clustername1", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListKubernetesVersions + +```java +/** Samples for ManagedClusters ListKubernetesVersions. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/KubernetesVersions_List.json + */ + /** + * Sample code: List Kubernetes Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listKubernetesVersions( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().listKubernetesVersionsWithResponse("location1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListMeshRevisionProfiles + +```java +/** Samples for ManagedClusters ListMeshRevisionProfiles. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersList_MeshRevisionProfiles.json + */ + /** + * Sample code: List mesh revision profiles in a location. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMeshRevisionProfilesInALocation( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().listMeshRevisionProfiles("location1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListMeshUpgradeProfiles + +```java +/** Samples for ManagedClusters ListMeshUpgradeProfiles. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersList_MeshUpgradeProfiles.json + */ + /** + * Sample code: Lists version compatibility and upgrade profile for all service meshes in a cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listsVersionCompatibilityAndUpgradeProfileForAllServiceMeshesInACluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().listMeshUpgradeProfiles("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListOutboundNetworkDependenciesEndpoints + +```java +/** Samples for ManagedClusters ListOutboundNetworkDependenciesEndpoints. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/OutboundNetworkDependenciesEndpointsList.json + */ + /** + * Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listOutboundNetworkDependenciesEndpointsByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .listOutboundNetworkDependenciesEndpoints("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ResetAadProfile + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; + +/** Samples for ManagedClusters ResetAadProfile. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersResetAADProfile.json + */ + /** + * Sample code: Reset AAD Profile. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void resetAADProfile( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .resetAadProfile( + "rg1", + "clustername1", + new ManagedClusterAadProfile() + .withClientAppId("clientappid") + .withServerAppId("serverappid") + .withServerAppSecret("fakeTokenPlaceholder") + .withTenantId("tenantid"), + com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ResetServicePrincipalProfile + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; + +/** Samples for ManagedClusters ResetServicePrincipalProfile. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersResetServicePrincipalProfile.json + */ + /** + * Sample code: Reset Service Principal Profile. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void resetServicePrincipalProfile( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .resetServicePrincipalProfile( + "rg1", + "clustername1", + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_RotateClusterCertificates + +```java +/** Samples for ManagedClusters RotateClusterCertificates. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersRotateClusterCertificates.json + */ + /** + * Sample code: Rotate Cluster Certificates. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void rotateClusterCertificates( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().rotateClusterCertificates("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_RotateServiceAccountSigningKeys + +```java +/** Samples for ManagedClusters RotateServiceAccountSigningKeys. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json + */ + /** + * Sample code: Rotate Cluster Service Account Signing Keys. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void rotateClusterServiceAccountSigningKeys( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .rotateServiceAccountSigningKeys("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_RunCommand + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; + +/** Samples for ManagedClusters RunCommand. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/RunCommandRequest.json + */ + /** + * Sample code: submitNewCommand. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void submitNewCommand( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .runCommand( + "rg1", + "clustername1", + new RunCommandRequest() + .withCommand("kubectl apply -f ns.yaml") + .withContext("") + .withClusterToken("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_Start + +```java +/** Samples for ManagedClusters Start. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersStart.json + */ + /** + * Sample code: Start Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void startManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().start("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_Stop + +```java +/** Samples for ManagedClusters Stop. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersStop.json + */ + /** + * Sample code: Stop Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.managedClusters().stop("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_UpdateTags + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedClusters UpdateTags. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersUpdateTags.json + */ + /** + * Sample code: Update Managed Cluster Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateManagedClusterTags( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + ManagedCluster resource = + manager + .managedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("archv3", "", "tier", "testing")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### OpenShiftManagedClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftAgentPoolProfileRole; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftContainerServiceVMSize; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAadIdentityProvider; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterIdentityProvider; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OpenShiftManagedClusters CreateOrUpdate. */ +public final class OpenShiftManag { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/OpenShiftManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update OpenShift Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateOpenShiftManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .openShiftManagedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withOpenShiftVersion("v3.11") + .withNetworkProfile(new NetworkProfile().withVnetCidr("10.0.0.0/8")) + .withRouterProfiles(Arrays.asList(new OpenShiftRouterProfile().withName("default"))) + .withMasterPoolProfile( + new OpenShiftManagedClusterMasterPoolProfile() + .withName("master") + .withCount(3) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX)) + .withAgentPoolProfiles( + Arrays + .asList( + new OpenShiftManagedClusterAgentPoolProfile() + .withName("infra") + .withCount(2) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX) + .withRole(OpenShiftAgentPoolProfileRole.INFRA), + new OpenShiftManagedClusterAgentPoolProfile() + .withName("compute") + .withCount(4) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX) + .withRole(OpenShiftAgentPoolProfileRole.COMPUTE))) + .withAuthProfile( + new OpenShiftManagedClusterAuthProfile() + .withIdentityProviders( + Arrays + .asList( + new OpenShiftManagedClusterIdentityProvider() + .withName("Azure AD") + .withProvider( + new OpenShiftManagedClusterAadIdentityProvider() + .withClientId("clientId") + .withSecret("fakeTokenPlaceholder") + .withTenantId("tenantId") + .withCustomerAdminGroupId("customerAdminGroupId"))))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### OpenShiftManagedClusters_Delete + +```java +/** Samples for OpenShiftManagedClusters Delete. */ +public final class OpenShiftManag { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/OpenShiftManagedClustersDelete.json + */ + /** + * Sample code: Delete OpenShift Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteOpenShiftManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.openShiftManagedClusters().delete("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### OpenShiftManagedClusters_GetByResourceGroup + +```java +/** Samples for OpenShiftManagedClusters GetByResourceGroup. */ +public final class OpenShiftManag { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/OpenShiftManagedClustersGet.json + */ + /** + * Sample code: Get OpenShift Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getOpenShiftManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .openShiftManagedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### OpenShiftManagedClusters_List + +```java +/** Samples for OpenShiftManagedClusters List. */ +public final class OpenShiftManag { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/OpenShiftManagedClustersList.json + */ + /** + * Sample code: List Managed Clusters. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusters( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.openShiftManagedClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### OpenShiftManagedClusters_ListByResourceGroup + +```java +/** Samples for OpenShiftManagedClusters ListByResourceGroup. */ +public final class OpenShiftManag { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/OpenShiftManagedClustersListByResourceGroup.json + */ + /** + * Sample code: Get Managed Clusters by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedClustersByResourceGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.openShiftManagedClusters().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### OpenShiftManagedClusters_UpdateTags + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OpenShiftManagedClusters UpdateTags. */ +public final class OpenShiftManag { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/OpenShiftManagedClustersUpdateTags.json + */ + /** + * Sample code: Update OpenShift Managed Cluster Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateOpenShiftManagedClusterTags( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + OpenShiftManagedCluster resource = + manager + .openShiftManagedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("archv3", "", "tier", "testing")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_List + +```java +/** Samples for Operations List. */ +public final class OperationsList { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/Operation_List.json + */ + /** + * Sample code: List available operations for the container service resource provider. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listAvailableOperationsForTheContainerServiceResourceProvider( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/PrivateEndpointConnectionsDelete.json + */ + /** + * Sample code: Delete Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deletePrivateEndpointConnection( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .privateEndpointConnections() + .delete("rg1", "clustername1", "privateendpointconnection1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/PrivateEndpointConnectionsGet.json + */ + /** + * Sample code: Get Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getPrivateEndpointConnection( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .privateEndpointConnections() + .getWithResponse("rg1", "clustername1", "privateendpointconnection1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +/** Samples for PrivateEndpointConnections List. */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/PrivateEndpointConnectionsList.json + */ + /** + * Sample code: List Private Endpoint Connections by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listPrivateEndpointConnectionsByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.privateEndpointConnections().listWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Update + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; + +/** Samples for PrivateEndpointConnections Update. */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/PrivateEndpointConnectionsUpdate.json + */ + /** + * Sample code: Update Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updatePrivateEndpointConnection( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .privateEndpointConnections() + .updateWithResponse( + "rg1", + "clustername1", + "privateendpointconnection1", + new PrivateEndpointConnectionInner() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED)), + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_List + +```java +/** Samples for PrivateLinkResources List. */ +public final class PrivateLinkRes { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/PrivateLinkResourcesList.json + */ + /** + * Sample code: List Private Link Resources by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listPrivateLinkResourcesByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.privateLinkResources().listWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ResolvePrivateLinkServiceId_Post + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; + +/** Samples for ResolvePrivateLinkServiceId Post. */ +public final class ResolvePrivate { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ResolvePrivateLinkServiceId.json + */ + /** + * Sample code: Resolve the Private Link Service ID for Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void resolveThePrivateLinkServiceIDForManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .resolvePrivateLinkServiceIds() + .postWithResponse( + "rg1", + "clustername1", + new PrivateLinkResourceInner().withName("management"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Snapshots CreateOrUpdate. */ +public final class SnapshotsCreat { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsCreate.json + */ + /** + * Sample code: Create/Update Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .snapshots() + .define("snapshot1") + .withRegion("westus") + .withExistingResourceGroup("rg1") + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withCreationData( + new CreationData() + .withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Snapshots_Delete + +```java +/** Samples for Snapshots Delete. */ +public final class SnapshotsDelet { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsDelete.json + */ + /** + * Sample code: Delete Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.snapshots().deleteByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_GetByResourceGroup + +```java +/** Samples for Snapshots GetByResourceGroup. */ +public final class SnapshotsGetBy { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsGet.json + */ + /** + * Sample code: Get Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.snapshots().getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_List + +```java +/** Samples for Snapshots List. */ +public final class SnapshotsListS { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsList.json + */ + /** + * Sample code: List Snapshots. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshots( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.snapshots().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_ListByResourceGroup + +```java +/** Samples for Snapshots ListByResourceGroup. */ +public final class SnapshotsListB { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsListByResourceGroup.json + */ + /** + * Sample code: List Snapshots by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshotsByResourceGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.snapshots().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_UpdateTags + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshot; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Snapshots UpdateTags. */ +public final class SnapshotsUpdat { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsUpdateTags.json + */ + /** + * Sample code: Update Snapshot Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateSnapshotTags( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + Snapshot resource = + manager + .snapshots() + .getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key2", "fakeTokenPlaceholder", "key3", "fakeTokenPlaceholder")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### TrustedAccessRoleBindings_CreateOrUpdate + +```java +import java.util.Arrays; + +/** Samples for TrustedAccessRoleBindings CreateOrUpdate. */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json + */ + /** + * Sample code: Create or update a trusted access role binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createOrUpdateATrustedAccessRoleBinding( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .trustedAccessRoleBindings() + .define("binding1") + .withExistingManagedCluster("rg1", "clustername1") + .withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/b/providers/Microsoft.MachineLearningServices/workspaces/c") + .withRoles( + Arrays + .asList( + "Microsoft.MachineLearningServices/workspaces/reader", + "Microsoft.MachineLearningServices/workspaces/writer")) + .create(); + } +} +``` + +### TrustedAccessRoleBindings_Delete + +```java +/** Samples for TrustedAccessRoleBindings Delete. */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/TrustedAccessRoleBindings_Delete.json + */ + /** + * Sample code: Delete a trusted access role binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteATrustedAccessRoleBinding( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.trustedAccessRoleBindings().delete("rg1", "clustername1", "binding1", com.azure.core.util.Context.NONE); + } +} +``` + +### TrustedAccessRoleBindings_Get + +```java +/** Samples for TrustedAccessRoleBindings Get. */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/TrustedAccessRoleBindings_Get.json + */ + /** + * Sample code: Get a trusted access role binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getATrustedAccessRoleBinding( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .trustedAccessRoleBindings() + .getWithResponse("rg1", "clustername1", "binding1", com.azure.core.util.Context.NONE); + } +} +``` + +### TrustedAccessRoleBindings_List + +```java +/** Samples for TrustedAccessRoleBindings List. */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/TrustedAccessRoleBindings_List.json + */ + /** + * Sample code: List trusted access role bindings. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listTrustedAccessRoleBindings( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.trustedAccessRoleBindings().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### TrustedAccessRoles_List + +```java +/** Samples for TrustedAccessRoles List. */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/TrustedAccessRoles_List.json + */ + /** + * Sample code: List trusted access roles. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listTrustedAccessRoles( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.trustedAccessRoles().list("westus2", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml new file mode 100644 index 0000000000000..1f1a91cea8b21 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for ContainerService Management + This package contains Microsoft Azure SDK for ContainerService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Container Service Client. Package tag package-2023-09. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + true + + + + com.azure + azure-core + 1.44.1 + + + com.azure + azure-core-management + 1.11.7 + + + diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/ContainerServiceManager.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/ContainerServiceManager.java new file mode 100644 index 0000000000000..920768e7b87e8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/ContainerServiceManager.java @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.AgentPoolsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ContainerServiceManagementClientBuilder; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ContainerServicesImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.MaintenanceConfigurationsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ManagedClustersImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OpenShiftManagedClustersImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OperationsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.PrivateLinkResourcesImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ResolvePrivateLinkServiceIdsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.SnapshotsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.TrustedAccessRoleBindingsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.TrustedAccessRolesImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPools; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServices; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfigurations; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusters; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusters; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Operations; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnections; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResources; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResolvePrivateLinkServiceIds; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshots; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoles; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** Entry point to ContainerServiceManager. Container Service Client. */ +public final class ContainerServiceManager { + private OpenShiftManagedClusters openShiftManagedClusters; + + private ContainerServices containerServices; + + private Operations operations; + + private ManagedClusters managedClusters; + + private MaintenanceConfigurations maintenanceConfigurations; + + private AgentPools agentPools; + + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateLinkResources privateLinkResources; + + private ResolvePrivateLinkServiceIds resolvePrivateLinkServiceIds; + + private Snapshots snapshots; + + private TrustedAccessRoleBindings trustedAccessRoleBindings; + + private TrustedAccessRoles trustedAccessRoles; + + private final ContainerServiceManagementClient clientObject; + + private ContainerServiceManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = + new ContainerServiceManagementClientBuilder() + .pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of ContainerService service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the ContainerService service API instance. + */ + public static ContainerServiceManager 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 ContainerService service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the ContainerService service API instance. + */ + public static ContainerServiceManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new ContainerServiceManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create ContainerServiceManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new ContainerServiceManager.Configurable(); + } + + /** The Configurable allowing configurations to be set. */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of ContainerService service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the ContainerService service API instance. + */ + public ContainerServiceManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder + .append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated") + .append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder + .append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new ContainerServiceManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of OpenShiftManagedClusters. It manages OpenShiftManagedCluster. + * + * @return Resource collection API of OpenShiftManagedClusters. + */ + public OpenShiftManagedClusters openShiftManagedClusters() { + if (this.openShiftManagedClusters == null) { + this.openShiftManagedClusters = + new OpenShiftManagedClustersImpl(clientObject.getOpenShiftManagedClusters(), this); + } + return openShiftManagedClusters; + } + + /** + * Gets the resource collection API of ContainerServices. + * + * @return Resource collection API of ContainerServices. + */ + public ContainerServices containerServices() { + if (this.containerServices == null) { + this.containerServices = new ContainerServicesImpl(clientObject.getContainerServices(), this); + } + return containerServices; + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of ManagedClusters. It manages ManagedCluster. + * + * @return Resource collection API of ManagedClusters. + */ + public ManagedClusters managedClusters() { + if (this.managedClusters == null) { + this.managedClusters = new ManagedClustersImpl(clientObject.getManagedClusters(), this); + } + return managedClusters; + } + + /** + * Gets the resource collection API of MaintenanceConfigurations. It manages MaintenanceConfiguration. + * + * @return Resource collection API of MaintenanceConfigurations. + */ + public MaintenanceConfigurations maintenanceConfigurations() { + if (this.maintenanceConfigurations == null) { + this.maintenanceConfigurations = + new MaintenanceConfigurationsImpl(clientObject.getMaintenanceConfigurations(), this); + } + return maintenanceConfigurations; + } + + /** + * Gets the resource collection API of AgentPools. It manages AgentPool. + * + * @return Resource collection API of AgentPools. + */ + public AgentPools agentPools() { + if (this.agentPools == null) { + this.agentPools = new AgentPoolsImpl(clientObject.getAgentPools(), this); + } + return agentPools; + } + + /** + * Gets the resource collection API of PrivateEndpointConnections. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = + new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + + /** + * Gets the resource collection API of ResolvePrivateLinkServiceIds. + * + * @return Resource collection API of ResolvePrivateLinkServiceIds. + */ + public ResolvePrivateLinkServiceIds resolvePrivateLinkServiceIds() { + if (this.resolvePrivateLinkServiceIds == null) { + this.resolvePrivateLinkServiceIds = + new ResolvePrivateLinkServiceIdsImpl(clientObject.getResolvePrivateLinkServiceIds(), this); + } + return resolvePrivateLinkServiceIds; + } + + /** + * Gets the resource collection API of Snapshots. It manages Snapshot. + * + * @return Resource collection API of Snapshots. + */ + public Snapshots snapshots() { + if (this.snapshots == null) { + this.snapshots = new SnapshotsImpl(clientObject.getSnapshots(), this); + } + return snapshots; + } + + /** + * Gets the resource collection API of TrustedAccessRoleBindings. It manages TrustedAccessRoleBinding. + * + * @return Resource collection API of TrustedAccessRoleBindings. + */ + public TrustedAccessRoleBindings trustedAccessRoleBindings() { + if (this.trustedAccessRoleBindings == null) { + this.trustedAccessRoleBindings = + new TrustedAccessRoleBindingsImpl(clientObject.getTrustedAccessRoleBindings(), this); + } + return trustedAccessRoleBindings; + } + + /** + * Gets the resource collection API of TrustedAccessRoles. + * + * @return Resource collection API of TrustedAccessRoles. + */ + public TrustedAccessRoles trustedAccessRoles() { + if (this.trustedAccessRoles == null) { + this.trustedAccessRoles = new TrustedAccessRolesImpl(clientObject.getTrustedAccessRoles(), this); + } + return trustedAccessRoles; + } + + /** + * Gets wrapped service client ContainerServiceManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + * + * @return Wrapped service client ContainerServiceManagementClient. + */ + public ContainerServiceManagementClient serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/AgentPoolsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/AgentPoolsClient.java new file mode 100644 index 0000000000000..4e91b98f8438d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/AgentPoolsClient.java @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; + +/** An instance of this class provides access to all the operations defined in AgentPoolsClient. */ +public interface AgentPoolsClient { + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAbortLatestOperation( + String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAbortLatestOperation( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginCreateOrUpdate( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + Context context); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner createOrUpdate( + String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner createOrUpdate( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + Context context); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAvailableAgentPoolVersionsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner upgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServiceManagementClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServiceManagementClient.java new file mode 100644 index 0000000000000..ca5fa2016fae0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServiceManagementClient.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** The interface for ContainerServiceManagementClient class. */ +public interface ContainerServiceManagementClient { + /** + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the OpenShiftManagedClustersClient object to access its operations. + * + * @return the OpenShiftManagedClustersClient object. + */ + OpenShiftManagedClustersClient getOpenShiftManagedClusters(); + + /** + * Gets the ContainerServicesClient object to access its operations. + * + * @return the ContainerServicesClient object. + */ + ContainerServicesClient getContainerServices(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the ManagedClustersClient object to access its operations. + * + * @return the ManagedClustersClient object. + */ + ManagedClustersClient getManagedClusters(); + + /** + * Gets the MaintenanceConfigurationsClient object to access its operations. + * + * @return the MaintenanceConfigurationsClient object. + */ + MaintenanceConfigurationsClient getMaintenanceConfigurations(); + + /** + * Gets the AgentPoolsClient object to access its operations. + * + * @return the AgentPoolsClient object. + */ + AgentPoolsClient getAgentPools(); + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + PrivateLinkResourcesClient getPrivateLinkResources(); + + /** + * Gets the ResolvePrivateLinkServiceIdsClient object to access its operations. + * + * @return the ResolvePrivateLinkServiceIdsClient object. + */ + ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds(); + + /** + * Gets the SnapshotsClient object to access its operations. + * + * @return the SnapshotsClient object. + */ + SnapshotsClient getSnapshots(); + + /** + * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * + * @return the TrustedAccessRoleBindingsClient object. + */ + TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); + + /** + * Gets the TrustedAccessRolesClient object to access its operations. + * + * @return the TrustedAccessRolesClient object. + */ + TrustedAccessRolesClient getTrustedAccessRoles(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServicesClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServicesClient.java new file mode 100644 index 0000000000000..7ce64bdd617e2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServicesClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; + +/** An instance of this class provides access to all the operations defined in ContainerServicesClient. */ +public interface ContainerServicesClient { + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listOrchestratorsWithResponse( + String location, String resourceType, Context context); + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OrchestratorVersionProfileListResultInner listOrchestrators(String location); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MaintenanceConfigurationsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MaintenanceConfigurationsClient.java new file mode 100644 index 0000000000000..597d3ee80c912 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MaintenanceConfigurationsClient.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; + +/** An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. */ +public interface MaintenanceConfigurationsClient { + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String configName, Context context); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @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 specified maintenance configuration of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceConfigurationInner get(String resourceGroupName, String resourceName, String configName); + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + String configName, + MaintenanceConfigurationInner parameters, + Context context); + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceConfigurationInner createOrUpdate( + String resourceGroupName, String resourceName, String configName, MaintenanceConfigurationInner parameters); + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String resourceName, String configName, Context context); + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String configName); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClustersClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClustersClient.java new file mode 100644 index 0000000000000..9c1b6390b2ccf --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClustersClient.java @@ -0,0 +1,1234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; + +/** An instance of this class provides access to all the operations defined in ManagedClustersClient. */ +public interface ManagedClustersClient { + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options needs to be returned. + * @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 supported OS options in the specified subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getOSOptionsWithResponse(String location, String resourceType, Context context); + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported OS options in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OSOptionProfileInner getOSOptions(String location); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKubernetesVersionsWithResponse(String location, Context context); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubernetesVersionListResultInner listKubernetesVersions(String location); + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response from the List Managed Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed clusters in the specified subscription and 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 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 response from the List Managed Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName); + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAccessProfileWithResponse( + String resourceGroupName, String resourceName, String roleName, Context context); + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, String roleName); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterAdminCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Context context); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName); + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin + * binary in the path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterUserCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Format format, Context context); + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterMonitoringUserCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Context context); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName); + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner createOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner updateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, Context context); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetServicePrincipalProfile( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetServicePrincipalProfile( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context); + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context); + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context); + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateClusterCertificates( + String resourceGroupName, String resourceName, Context context); + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateClusterCertificates(String resourceGroupName, String resourceName); + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAbortLatestOperation( + String resourceGroupName, String resourceName, Context context); + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void abortLatestOperation(String resourceGroupName, String resourceName); + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void abortLatestOperation(String resourceGroupName, String resourceName, Context context); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateServiceAccountSigningKeys( + String resourceGroupName, String resourceName); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateServiceAccountSigningKeys( + String resourceGroupName, String resourceName, Context context); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context); + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStop(String resourceGroupName, String resourceName); + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, Context context); + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stop(String resourceGroupName, String resourceName); + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stop(String resourceGroupName, String resourceName, Context context); + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStart(String resourceGroupName, String resourceName); + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStart(String resourceGroupName, String resourceName, Context context); + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void start(String resourceGroupName, String resourceName); + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void start(String resourceGroupName, String resourceName, Context context); + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context); + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunCommandResultInner runCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context); + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClustersGetCommandResultResponse getCommandResultWithResponse( + String resourceGroupName, String resourceName, String commandId, Context context); + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName, Context context); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshRevisionProfiles(String location); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshRevisionProfiles(String location, Context context); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMeshRevisionProfileWithResponse( + String location, String mode, Context context); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshUpgradeProfiles( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMeshUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String mode, Context context); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OpenShiftManagedClustersClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OpenShiftManagedClustersClient.java new file mode 100644 index 0000000000000..5e93ac3b89c42 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OpenShiftManagedClustersClient.java @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; + +/** An instance of this class provides access to all the operations defined in OpenShiftManagedClustersClient. */ +public interface OpenShiftManagedClustersClient { + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed cluster. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response from the List OpenShift Managed Clusters operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response from the List OpenShift Managed Clusters operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name along with {@link + * Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OpenShiftManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters); + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OpenShiftManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context); + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner createOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters); + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner createOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context); + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OpenShiftManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OpenShiftManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context); + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner updateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context); + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName); + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName); + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationsClient.java new file mode 100644 index 0000000000000..2c7c2e849fbf1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationsClient.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; + +/** An instance of this class provides access to all the operations defined in OperationsClient. */ +public interface OperationsClient { + /** + * Gets a list of operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 0000000000000..13c5f3f8da166 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateEndpointConnectionsClient.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; + +/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +public interface PrivateEndpointConnectionsClient { + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName); + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get( + String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, + Context context); + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner update( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateLinkResourcesClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateLinkResourcesClient.java new file mode 100644 index 0000000000000..606acef754e55 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateLinkResourcesClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; + +/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +public interface PrivateLinkResourcesClient { + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ResolvePrivateLinkServiceIdsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ResolvePrivateLinkServiceIdsClient.java new file mode 100644 index 0000000000000..8ee7c328d315c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ResolvePrivateLinkServiceIdsClient.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; + +/** An instance of this class provides access to all the operations defined in ResolvePrivateLinkServiceIdsClient. */ +public interface ResolvePrivateLinkServiceIdsClient { + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response postWithResponse( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context); + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner post(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/SnapshotsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/SnapshotsClient.java new file mode 100644 index 0000000000000..84886c79de249 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/SnapshotsClient.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; + +/** An instance of this class provides access to all the operations defined in SnapshotsClient. */ +public interface SnapshotsClient { + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response from the List Snapshots operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists snapshots in the specified subscription and 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 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 response from the List Snapshots operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, String resourceName, SnapshotInner parameters, Context context); + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner createOrUpdate(String resourceGroupName, String resourceName, SnapshotInner parameters); + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse( + String resourceGroupName, String resourceName, TagsObject parameters, Context context); + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRoleBindingsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRoleBindingsClient.java new file mode 100644 index 0000000000000..d735bab7629d3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRoleBindingsClient.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; + +/** An instance of this class provides access to all the operations defined in TrustedAccessRoleBindingsClient. */ +public interface TrustedAccessRoleBindingsClient { + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TrustedAccessRoleBindingInner get( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, + Context context); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TrustedAccessRoleBindingInner createOrUpdate( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TrustedAccessRoleBindingInner createOrUpdate( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, + Context context); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRolesClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRolesClient.java new file mode 100644 index 0000000000000..cb7bcca76ced8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRolesClient.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; + +/** An instance of this class provides access to all the operations defined in TrustedAccessRolesClient. */ +public interface TrustedAccessRolesClient { + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AccessProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AccessProfile.java new file mode 100644 index 0000000000000..98a082c1c310f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AccessProfile.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Profile for enabling a user to access a managed cluster. */ +@Fluent +public final class AccessProfile { + /* + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "kubeConfig") + private byte[] kubeConfig; + + /** Creates an instance of AccessProfile class. */ + public AccessProfile() { + } + + /** + * Get the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeConfig value. + */ + public byte[] kubeConfig() { + return CoreUtils.clone(this.kubeConfig); + } + + /** + * Set the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @param kubeConfig the kubeConfig value to set. + * @return the AccessProfile object itself. + */ + public AccessProfile withKubeConfig(byte[] kubeConfig) { + this.kubeConfig = CoreUtils.clone(kubeConfig); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsInner.java new file mode 100644 index 0000000000000..b1324c572e6a1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsInner.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available versions for an agent pool. */ +@Fluent +public final class AgentPoolAvailableVersionsInner { + /* + * The ID of the agent pool version list. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the agent pool version list. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Type of the agent pool version list. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Properties of agent pool available versions. + */ + @JsonProperty(value = "properties", required = true) + private AgentPoolAvailableVersionsProperties innerProperties = new AgentPoolAvailableVersionsProperties(); + + /** Creates an instance of AgentPoolAvailableVersionsInner class. */ + public AgentPoolAvailableVersionsInner() { + } + + /** + * Get the id property: The ID of the agent pool version list. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the agent pool version list. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Type of the agent pool version list. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: Properties of agent pool available versions. + * + * @return the innerProperties value. + */ + private AgentPoolAvailableVersionsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the agentPoolVersions property: List of versions available for agent pool. + * + * @return the agentPoolVersions value. + */ + public List agentPoolVersions() { + return this.innerProperties() == null ? null : this.innerProperties().agentPoolVersions(); + } + + /** + * Set the agentPoolVersions property: List of versions available for agent pool. + * + * @param agentPoolVersions the agentPoolVersions value to set. + * @return the AgentPoolAvailableVersionsInner object itself. + */ + public AgentPoolAvailableVersionsInner withAgentPoolVersions( + List agentPoolVersions) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolAvailableVersionsProperties(); + } + this.innerProperties().withAgentPoolVersions(agentPoolVersions); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model AgentPoolAvailableVersionsInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolAvailableVersionsInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsProperties.java new file mode 100644 index 0000000000000..7425b11c42bc9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available agent pool versions. */ +@Fluent +public final class AgentPoolAvailableVersionsProperties { + /* + * List of versions available for agent pool. + */ + @JsonProperty(value = "agentPoolVersions") + private List agentPoolVersions; + + /** Creates an instance of AgentPoolAvailableVersionsProperties class. */ + public AgentPoolAvailableVersionsProperties() { + } + + /** + * Get the agentPoolVersions property: List of versions available for agent pool. + * + * @return the agentPoolVersions value. + */ + public List agentPoolVersions() { + return this.agentPoolVersions; + } + + /** + * Set the agentPoolVersions property: List of versions available for agent pool. + * + * @param agentPoolVersions the agentPoolVersions value to set. + * @return the AgentPoolAvailableVersionsProperties object itself. + */ + public AgentPoolAvailableVersionsProperties withAgentPoolVersions( + List agentPoolVersions) { + this.agentPoolVersions = agentPoolVersions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (agentPoolVersions() != null) { + agentPoolVersions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolInner.java new file mode 100644 index 0000000000000..6067200809b83 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolInner.java @@ -0,0 +1,1156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Agent Pool. */ +@Fluent +public final class AgentPoolInner extends SubResource { + /* + * Properties of an agent pool. + */ + @JsonProperty(value = "properties") + private ManagedClusterAgentPoolProfileProperties innerProperties; + + /* + * The name of the resource that is unique within a resource group. This name can be used to access the resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Resource type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** Creates an instance of AgentPoolInner class. */ + public AgentPoolInner() { + } + + /** + * Get the innerProperties property: Properties of an agent pool. + * + * @return the innerProperties value. + */ + private ManagedClusterAgentPoolProfileProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the name property: The name of the resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** {@inheritDoc} */ + @Override + public AgentPoolInner withId(String id) { + super.withId(id); + return this; + } + + /** + * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @return the count value. + */ + public Integer count() { + return this.innerProperties() == null ? null : this.innerProperties().count(); + } + + /** + * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @param count the count value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withCount(Integer count) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withCount(count); + return this; + } + + /** + * Get the vmSize property: The size of the agent pool VMs. + * + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) + * pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.innerProperties() == null ? null : this.innerProperties().vmSize(); + } + + /** + * Set the vmSize property: The size of the agent pool VMs. + * + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) + * pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize the vmSize value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVmSize(String vmSize) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withVmSize(vmSize); + return this; + } + + /** + * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @return the osDiskSizeGB value. + */ + public Integer osDiskSizeGB() { + return this.innerProperties() == null ? null : this.innerProperties().osDiskSizeGB(); + } + + /** + * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @param osDiskSizeGB the osDiskSizeGB value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsDiskSizeGB(Integer osDiskSizeGB) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOsDiskSizeGB(osDiskSizeGB); + return this; + } + + /** + * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. + * + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + * Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.innerProperties() == null ? null : this.innerProperties().osDiskType(); + } + + /** + * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. + * + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + * Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @param osDiskType the osDiskType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsDiskType(OSDiskType osDiskType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOsDiskType(osDiskType); + return this; + } + + /** + * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.innerProperties() == null ? null : this.innerProperties().kubeletDiskType(); + } + + /** + * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withKubeletDiskType(KubeletDiskType kubeletDiskType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withKubeletDiskType(kubeletDiskType); + return this; + } + + /** + * Get the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + public WorkloadRuntime workloadRuntime() { + return this.innerProperties() == null ? null : this.innerProperties().workloadRuntime(); + } + + /** + * Set the workloadRuntime property: Determines the type of workload a node can run. + * + * @param workloadRuntime the workloadRuntime value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withWorkloadRuntime(workloadRuntime); + return this; + } + + /** + * Get the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. + * + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this + * applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.innerProperties() == null ? null : this.innerProperties().vnetSubnetId(); + } + + /** + * Set the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. + * + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this + * applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVnetSubnetId(String vnetSubnetId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withVnetSubnetId(vnetSubnetId); + return this; + } + + /** + * Get the podSubnetId property: The ID of the subnet which pods will join when launched. + * + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of + * the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.innerProperties() == null ? null : this.innerProperties().podSubnetId(); + } + + /** + * Set the podSubnetId property: The ID of the subnet which pods will join when launched. + * + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of + * the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId the podSubnetId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withPodSubnetId(String podSubnetId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withPodSubnetId(podSubnetId); + return this; + } + + /** + * Get the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.innerProperties() == null ? null : this.innerProperties().maxPods(); + } + + /** + * Set the maxPods property: The maximum number of pods that can run on a node. + * + * @param maxPods the maxPods value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMaxPods(Integer maxPods) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMaxPods(maxPods); + return this; + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.innerProperties() == null ? null : this.innerProperties().osType(); + } + + /** + * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @param osType the osType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsType(OSType osType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOsType(osType); + return this; + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + public Ossku osSku() { + return this.innerProperties() == null ? null : this.innerProperties().osSku(); + } + + /** + * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @param osSku the osSku value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsSku(Ossku osSku) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOsSku(osSku); + return this; + } + + /** + * Get the maxCount property: The maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + public Integer maxCount() { + return this.innerProperties() == null ? null : this.innerProperties().maxCount(); + } + + /** + * Set the maxCount property: The maximum number of nodes for auto-scaling. + * + * @param maxCount the maxCount value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMaxCount(Integer maxCount) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMaxCount(maxCount); + return this; + } + + /** + * Get the minCount property: The minimum number of nodes for auto-scaling. + * + * @return the minCount value. + */ + public Integer minCount() { + return this.innerProperties() == null ? null : this.innerProperties().minCount(); + } + + /** + * Set the minCount property: The minimum number of nodes for auto-scaling. + * + * @param minCount the minCount value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMinCount(Integer minCount) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMinCount(minCount); + return this; + } + + /** + * Get the enableAutoScaling property: Whether to enable auto-scaler. + * + * @return the enableAutoScaling value. + */ + public Boolean enableAutoScaling() { + return this.innerProperties() == null ? null : this.innerProperties().enableAutoScaling(); + } + + /** + * Set the enableAutoScaling property: Whether to enable auto-scaler. + * + * @param enableAutoScaling the enableAutoScaling value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableAutoScaling(Boolean enableAutoScaling) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableAutoScaling(enableAutoScaling); + return this; + } + + /** + * Get the scaleDownMode property: This also effects the cluster autoscaler behavior. If not specified, it defaults + * to Delete. + * + * @return the scaleDownMode value. + */ + public ScaleDownMode scaleDownMode() { + return this.innerProperties() == null ? null : this.innerProperties().scaleDownMode(); + } + + /** + * Set the scaleDownMode property: This also effects the cluster autoscaler behavior. If not specified, it defaults + * to Delete. + * + * @param scaleDownMode the scaleDownMode value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleDownMode(ScaleDownMode scaleDownMode) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withScaleDownMode(scaleDownMode); + return this; + } + + /** + * Get the type property: The type of Agent Pool. + * + * @return the type value. + */ + public AgentPoolType typePropertiesType() { + return this.innerProperties() == null ? null : this.innerProperties().type(); + } + + /** + * Set the type property: The type of Agent Pool. + * + * @param type the type value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withTypePropertiesType(AgentPoolType type) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withType(type); + return this; + } + + /** + * Get the mode property: The mode of an agent pool. + * + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool + * restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.innerProperties() == null ? null : this.innerProperties().mode(); + } + + /** + * Set the mode property: The mode of an agent pool. + * + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool + * restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @param mode the mode value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMode(AgentPoolMode mode) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMode(mode); + return this; + } + + /** + * Get the orchestratorVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in + * an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the + * control plane. The node pool minor version must be within two minor versions of the control plane version. The + * node pool version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.innerProperties() == null ? null : this.innerProperties().orchestratorVersion(); + } + + /** + * Set the orchestratorVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in + * an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the + * control plane. The node pool minor version must be within two minor versions of the control plane version. The + * node pool version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOrchestratorVersion(String orchestratorVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOrchestratorVersion(orchestratorVersion); + return this; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. + * + *

If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly + * equal to it. If orchestratorVersion is <major.minor>, this field will contain the full + * <major.minor.patch> version being used. + * + * @return the currentOrchestratorVersion value. + */ + public String currentOrchestratorVersion() { + return this.innerProperties() == null ? null : this.innerProperties().currentOrchestratorVersion(); + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.innerProperties() == null ? null : this.innerProperties().nodeImageVersion(); + } + + /** + * Get the upgradeSettings property: Settings for upgrading the agentpool. + * + * @return the upgradeSettings value. + */ + public AgentPoolUpgradeSettings upgradeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeSettings(); + } + + /** + * Set the upgradeSettings property: Settings for upgrading the agentpool. + * + * @param upgradeSettings the upgradeSettings value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withUpgradeSettings(upgradeSettings); + return this; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the powerState property: When an Agent Pool is first created it is initially Running. The Agent Pool can be + * stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + * charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.innerProperties() == null ? null : this.innerProperties().powerState(); + } + + /** + * Set the powerState property: When an Agent Pool is first created it is initially Running. The Agent Pool can be + * stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + * charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. + * + * @param powerState the powerState value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withPowerState(PowerState powerState) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withPowerState(powerState); + return this; + } + + /** + * Get the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @return the availabilityZones value. + */ + public List availabilityZones() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityZones(); + } + + /** + * Set the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @param availabilityZones the availabilityZones value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withAvailabilityZones(List availabilityZones) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withAvailabilityZones(availabilityZones); + return this; + } + + /** + * Get the enableNodePublicIp property: Whether each node is allocated its own public IP. + * + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common + * scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to + * minimize hops. For more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.innerProperties() == null ? null : this.innerProperties().enableNodePublicIp(); + } + + /** + * Set the enableNodePublicIp property: Whether each node is allocated its own public IP. + * + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common + * scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to + * minimize hops. For more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @param enableNodePublicIp the enableNodePublicIp value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableNodePublicIp(Boolean enableNodePublicIp) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableNodePublicIp(enableNodePublicIp); + return this; + } + + /** + * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.innerProperties() == null ? null : this.innerProperties().nodePublicIpPrefixId(); + } + + /** + * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodePublicIpPrefixId(nodePublicIpPrefixId); + return this; + } + + /** + * Get the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * + * @return the scaleSetPriority value. + */ + public ScaleSetPriority scaleSetPriority() { + return this.innerProperties() == null ? null : this.innerProperties().scaleSetPriority(); + } + + /** + * Set the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * + * @param scaleSetPriority the scaleSetPriority value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withScaleSetPriority(scaleSetPriority); + return this; + } + + /** + * Get the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + * + * @return the scaleSetEvictionPolicy value. + */ + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().scaleSetEvictionPolicy(); + } + + /** + * Set the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + * + * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withScaleSetEvictionPolicy(scaleSetEvictionPolicy); + return this; + } + + /** + * Get the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @return the spotMaxPrice value. + */ + public Float spotMaxPrice() { + return this.innerProperties() == null ? null : this.innerProperties().spotMaxPrice(); + } + + /** + * Set the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @param spotMaxPrice the spotMaxPrice value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withSpotMaxPrice(Float spotMaxPrice) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withSpotMaxPrice(spotMaxPrice); + return this; + } + + /** + * Get the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value. + */ + public Map tags() { + return this.innerProperties() == null ? null : this.innerProperties().tags(); + } + + /** + * Set the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @param tags the tags value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withTags(Map tags) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withTags(tags); + return this; + } + + /** + * Get the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value. + */ + public Map nodeLabels() { + return this.innerProperties() == null ? null : this.innerProperties().nodeLabels(); + } + + /** + * Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @param nodeLabels the nodeLabels value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeLabels(Map nodeLabels) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeLabels(nodeLabels); + return this; + } + + /** + * Get the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + public List nodeTaints() { + return this.innerProperties() == null ? null : this.innerProperties().nodeTaints(); + } + + /** + * Set the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @param nodeTaints the nodeTaints value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeTaints(List nodeTaints) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeTaints(nodeTaints); + return this; + } + + /** + * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @return the proximityPlacementGroupId value. + */ + public String proximityPlacementGroupId() { + return this.innerProperties() == null ? null : this.innerProperties().proximityPlacementGroupId(); + } + + /** + * Set the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @param proximityPlacementGroupId the proximityPlacementGroupId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withProximityPlacementGroupId(String proximityPlacementGroupId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withProximityPlacementGroupId(proximityPlacementGroupId); + return this; + } + + /** + * Get the kubeletConfig property: Kubelet configurations of agent nodes. + * + *

The Kubelet configuration on the agent pool nodes. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.innerProperties() == null ? null : this.innerProperties().kubeletConfig(); + } + + /** + * Set the kubeletConfig property: Kubelet configurations of agent nodes. + * + *

The Kubelet configuration on the agent pool nodes. + * + * @param kubeletConfig the kubeletConfig value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withKubeletConfig(KubeletConfig kubeletConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withKubeletConfig(kubeletConfig); + return this; + } + + /** + * Get the linuxOSConfig property: OS configurations of Linux agent nodes. + * + *

The OS configuration of Linux agent nodes. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.innerProperties() == null ? null : this.innerProperties().linuxOSConfig(); + } + + /** + * Set the linuxOSConfig property: OS configurations of Linux agent nodes. + * + *

The OS configuration of Linux agent nodes. + * + * @param linuxOSConfig the linuxOSConfig value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withLinuxOSConfig(linuxOSConfig); + return this; + } + + /** + * Get the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. + * + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @return the enableEncryptionAtHost value. + */ + public Boolean enableEncryptionAtHost() { + return this.innerProperties() == null ? null : this.innerProperties().enableEncryptionAtHost(); + } + + /** + * Set the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. + * + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableEncryptionAtHost(enableEncryptionAtHost); + return this; + } + + /** + * Get the enableUltraSsd property: Whether to enable UltraSSD. + * + * @return the enableUltraSsd value. + */ + public Boolean enableUltraSsd() { + return this.innerProperties() == null ? null : this.innerProperties().enableUltraSsd(); + } + + /** + * Set the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd the enableUltraSsd value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableUltraSsd(Boolean enableUltraSsd) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableUltraSsd(enableUltraSsd); + return this; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.innerProperties() == null ? null : this.innerProperties().enableFips(); + } + + /** + * Set the enableFips property: Whether to use a FIPS-enabled OS. + * + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @param enableFips the enableFips value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableFips(Boolean enableFips) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableFips(enableFips); + return this; + } + + /** + * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + public GpuInstanceProfile gpuInstanceProfile() { + return this.innerProperties() == null ? null : this.innerProperties().gpuInstanceProfile(); + } + + /** + * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withGpuInstanceProfile(gpuInstanceProfile); + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + + /** + * Get the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @return the hostGroupId value. + */ + public String hostGroupId() { + return this.innerProperties() == null ? null : this.innerProperties().hostGroupId(); + } + + /** + * Set the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @param hostGroupId the hostGroupId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withHostGroupId(String hostGroupId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withHostGroupId(hostGroupId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileInner.java new file mode 100644 index 0000000000000..98ed37d396583 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileInner.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available upgrades for an agent pool. */ +@Fluent +public final class AgentPoolUpgradeProfileInner { + /* + * The ID of the agent pool upgrade profile. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the agent pool upgrade profile. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The type of the agent pool upgrade profile. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The properties of the agent pool upgrade profile. + */ + @JsonProperty(value = "properties", required = true) + private AgentPoolUpgradeProfileProperties innerProperties = new AgentPoolUpgradeProfileProperties(); + + /** Creates an instance of AgentPoolUpgradeProfileInner class. */ + public AgentPoolUpgradeProfileInner() { + } + + /** + * Get the id property: The ID of the agent pool upgrade profile. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the agent pool upgrade profile. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the agent pool upgrade profile. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: The properties of the agent pool upgrade profile. + * + * @return the innerProperties value. + */ + private AgentPoolUpgradeProfileProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withKubernetesVersion(String kubernetesVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withKubernetesVersion(kubernetesVersion); + return this; + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.innerProperties() == null ? null : this.innerProperties().osType(); + } + + /** + * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @param osType the osType value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withOsType(OSType osType) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withOsType(osType); + return this; + } + + /** + * Get the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.innerProperties() == null ? null : this.innerProperties().upgrades(); + } + + /** + * Set the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @param upgrades the upgrades value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withUpgrades(List upgrades) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withUpgrades(upgrades); + return this; + } + + /** + * Get the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @return the latestNodeImageVersion value. + */ + public String latestNodeImageVersion() { + return this.innerProperties() == null ? null : this.innerProperties().latestNodeImageVersion(); + } + + /** + * Set the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @param latestNodeImageVersion the latestNodeImageVersion value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withLatestNodeImageVersion(String latestNodeImageVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withLatestNodeImageVersion(latestNodeImageVersion); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model AgentPoolUpgradeProfileInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileProperties.java new file mode 100644 index 0000000000000..a12860afed4eb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available upgrade versions. */ +@Fluent +public final class AgentPoolUpgradeProfileProperties { + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion", required = true) + private String kubernetesVersion; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType", required = true) + private OSType osType; + + /* + * List of orchestrator types and versions available for upgrade. + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /* + * The latest AKS supported node image version. + */ + @JsonProperty(value = "latestNodeImageVersion") + private String latestNodeImageVersion; + + /** Creates an instance of AgentPoolUpgradeProfileProperties class. */ + public AgentPoolUpgradeProfileProperties() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @param osType the osType value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @param upgrades the upgrades value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties withUpgrades( + List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Get the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @return the latestNodeImageVersion value. + */ + public String latestNodeImageVersion() { + return this.latestNodeImageVersion; + } + + /** + * Set the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @param latestNodeImageVersion the latestNodeImageVersion value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties withLatestNodeImageVersion(String latestNodeImageVersion) { + this.latestNodeImageVersion = latestNodeImageVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubernetesVersion() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property kubernetesVersion in model AgentPoolUpgradeProfileProperties")); + } + if (osType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property osType in model AgentPoolUpgradeProfileProperties")); + } + if (upgrades() != null) { + upgrades().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CommandResultProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CommandResultProperties.java new file mode 100644 index 0000000000000..632a719b92ecd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CommandResultProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The results of a run command. */ +@Immutable +public final class CommandResultProperties { + /* + * provisioning State + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The exit code of the command + */ + @JsonProperty(value = "exitCode", access = JsonProperty.Access.WRITE_ONLY) + private Integer exitCode; + + /* + * The time when the command started. + */ + @JsonProperty(value = "startedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startedAt; + + /* + * The time when the command finished. + */ + @JsonProperty(value = "finishedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime finishedAt; + + /* + * The command output. + */ + @JsonProperty(value = "logs", access = JsonProperty.Access.WRITE_ONLY) + private String logs; + + /* + * An explanation of why provisioningState is set to failed (if so). + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + private String reason; + + /** Creates an instance of CommandResultProperties class. */ + public CommandResultProperties() { + } + + /** + * Get the provisioningState property: provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the exitCode property: The exit code of the command. + * + * @return the exitCode value. + */ + public Integer exitCode() { + return this.exitCode; + } + + /** + * Get the startedAt property: The time when the command started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.startedAt; + } + + /** + * Get the finishedAt property: The time when the command finished. + * + * @return the finishedAt value. + */ + public OffsetDateTime finishedAt() { + return this.finishedAt; + } + + /** + * Get the logs property: The command output. + * + * @return the logs value. + */ + public String logs() { + return this.logs; + } + + /** + * Get the reason property: An explanation of why provisioningState is set to failed (if so). + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CredentialResultsInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CredentialResultsInner.java new file mode 100644 index 0000000000000..ea6044fff7cf9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CredentialResultsInner.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResult; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list credential result response. */ +@Immutable +public final class CredentialResultsInner { + /* + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "kubeconfigs", access = JsonProperty.Access.WRITE_ONLY) + private List kubeconfigs; + + /** Creates an instance of CredentialResultsInner class. */ + public CredentialResultsInner() { + } + + /** + * Get the kubeconfigs property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeconfigs value. + */ + public List kubeconfigs() { + return this.kubeconfigs; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubeconfigs() != null) { + kubeconfigs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/KubernetesVersionListResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/KubernetesVersionListResultInner.java new file mode 100644 index 0000000000000..2c0a411e50390 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/KubernetesVersionListResultInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersion; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Hold values properties, which is array of KubernetesVersion. */ +@Fluent +public final class KubernetesVersionListResultInner { + /* + * Array of AKS supported Kubernetes versions. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of KubernetesVersionListResultInner class. */ + public KubernetesVersionListResultInner() { + } + + /** + * Get the values property: Array of AKS supported Kubernetes versions. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: Array of AKS supported Kubernetes versions. + * + * @param values the values value to set. + * @return the KubernetesVersionListResultInner object itself. + */ + public KubernetesVersionListResultInner withValues(List values) { + this.values = values; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (values() != null) { + values().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationInner.java new file mode 100644 index 0000000000000..b5f44c83ade38 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationInner.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. + * + *

See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about + * planned maintenance. + */ +@Fluent +public final class MaintenanceConfigurationInner extends SubResource { + /* + * The system metadata relating to this resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Properties of a default maintenance configuration. + */ + @JsonProperty(value = "properties") + private MaintenanceConfigurationProperties innerProperties; + + /* + * The name of the resource that is unique within a resource group. This name can be used to access the resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Resource type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** Creates an instance of MaintenanceConfigurationInner class. */ + public MaintenanceConfigurationInner() { + } + + /** + * Get the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the innerProperties property: Properties of a default maintenance configuration. + * + * @return the innerProperties value. + */ + private MaintenanceConfigurationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the name property: The name of the resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** {@inheritDoc} */ + @Override + public MaintenanceConfigurationInner withId(String id) { + super.withId(id); + return this; + } + + /** + * Get the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. + * + *

If two array entries specify the same day of the week, the applied configuration is the union of times in both + * entries. + * + * @return the timeInWeek value. + */ + public List timeInWeek() { + return this.innerProperties() == null ? null : this.innerProperties().timeInWeek(); + } + + /** + * Set the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. + * + *

If two array entries specify the same day of the week, the applied configuration is the union of times in both + * entries. + * + * @param timeInWeek the timeInWeek value to set. + * @return the MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner withTimeInWeek(List timeInWeek) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceConfigurationProperties(); + } + this.innerProperties().withTimeInWeek(timeInWeek); + return this; + } + + /** + * Get the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @return the notAllowedTime value. + */ + public List notAllowedTime() { + return this.innerProperties() == null ? null : this.innerProperties().notAllowedTime(); + } + + /** + * Set the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @param notAllowedTime the notAllowedTime value to set. + * @return the MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner withNotAllowedTime(List notAllowedTime) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceConfigurationProperties(); + } + this.innerProperties().withNotAllowedTime(notAllowedTime); + return this; + } + + /** + * Get the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @return the maintenanceWindow value. + */ + public MaintenanceWindow maintenanceWindow() { + return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindow(); + } + + /** + * Set the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @param maintenanceWindow the maintenanceWindow value to set. + * @return the MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceConfigurationProperties(); + } + this.innerProperties().withMaintenanceWindow(maintenanceWindow); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationProperties.java new file mode 100644 index 0000000000000..3f29ba7da3f9a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationProperties.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties used to configure planned maintenance for a Managed Cluster. */ +@Fluent +public final class MaintenanceConfigurationProperties { + /* + * Time slots during the week when planned maintenance is allowed to proceed. + * + * If two array entries specify the same day of the week, the applied configuration is the union of times in both + * entries. + */ + @JsonProperty(value = "timeInWeek") + private List timeInWeek; + + /* + * Time slots on which upgrade is not allowed. + */ + @JsonProperty(value = "notAllowedTime") + private List notAllowedTime; + + /* + * Maintenance window for the maintenance configuration. + */ + @JsonProperty(value = "maintenanceWindow") + private MaintenanceWindow maintenanceWindow; + + /** Creates an instance of MaintenanceConfigurationProperties class. */ + public MaintenanceConfigurationProperties() { + } + + /** + * Get the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. + * + *

If two array entries specify the same day of the week, the applied configuration is the union of times in both + * entries. + * + * @return the timeInWeek value. + */ + public List timeInWeek() { + return this.timeInWeek; + } + + /** + * Set the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. + * + *

If two array entries specify the same day of the week, the applied configuration is the union of times in both + * entries. + * + * @param timeInWeek the timeInWeek value to set. + * @return the MaintenanceConfigurationProperties object itself. + */ + public MaintenanceConfigurationProperties withTimeInWeek(List timeInWeek) { + this.timeInWeek = timeInWeek; + return this; + } + + /** + * Get the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @return the notAllowedTime value. + */ + public List notAllowedTime() { + return this.notAllowedTime; + } + + /** + * Set the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @param notAllowedTime the notAllowedTime value to set. + * @return the MaintenanceConfigurationProperties object itself. + */ + public MaintenanceConfigurationProperties withNotAllowedTime(List notAllowedTime) { + this.notAllowedTime = notAllowedTime; + return this; + } + + /** + * Get the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @return the maintenanceWindow value. + */ + public MaintenanceWindow maintenanceWindow() { + return this.maintenanceWindow; + } + + /** + * Set the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @param maintenanceWindow the maintenanceWindow value to set. + * @return the MaintenanceConfigurationProperties object itself. + */ + public MaintenanceConfigurationProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (timeInWeek() != null) { + timeInWeek().forEach(e -> e.validate()); + } + if (notAllowedTime() != null) { + notAllowedTime().forEach(e -> e.validate()); + } + if (maintenanceWindow() != null) { + maintenanceWindow().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAccessProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAccessProfileInner.java new file mode 100644 index 0000000000000..58bb1f11278ff --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAccessProfileInner.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Managed cluster Access Profile. */ +@Fluent +public final class ManagedClusterAccessProfileInner extends Resource { + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; + + /* + * AccessProfile of a managed cluster. + */ + @JsonProperty(value = "properties") + private AccessProfile innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ManagedClusterAccessProfileInner class. */ + public ManagedClusterAccessProfileInner() { + } + + /** + * Get the innerProperties property: AccessProfile of a managed cluster. + * + * @return the innerProperties value. + */ + private AccessProfile innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAccessProfileInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAccessProfileInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeConfig value. + */ + public byte[] kubeConfig() { + return this.innerProperties() == null ? EMPTY_BYTE_ARRAY : this.innerProperties().kubeConfig(); + } + + /** + * Set the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @param kubeConfig the kubeConfig value to set. + * @return the ManagedClusterAccessProfileInner object itself. + */ + public ManagedClusterAccessProfileInner withKubeConfig(byte[] kubeConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessProfile(); + } + this.innerProperties().withKubeConfig(kubeConfig); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAgentPoolProfileProperties.java new file mode 100644 index 0000000000000..78cfb284f8514 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAgentPoolProfileProperties.java @@ -0,0 +1,1322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Properties for the container service agent pool profile. */ +@Fluent +public class ManagedClusterAgentPoolProfileProperties { + /* + * Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) + * for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /* + * The size of the agent pool VMs. + * + * VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods + * might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions + */ + @JsonProperty(value = "vmSize") + private String vmSize; + + /* + * OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you + * specify 0, it will apply the default osDisk size according to the vmSize specified. + */ + @JsonProperty(value = "osDiskSizeGB") + private Integer osDiskSizeGB; + + /* + * The OS disk type to be used for machines in the agent pool. + * + * The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + * Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + */ + @JsonProperty(value = "osDiskType") + private OSDiskType osDiskType; + + /* + * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + */ + @JsonProperty(value = "kubeletDiskType") + private KubeletDiskType kubeletDiskType; + + /* + * Determines the type of workload a node can run. + */ + @JsonProperty(value = "workloadRuntime") + private WorkloadRuntime workloadRuntime; + + /* + * The ID of the subnet which agent pool nodes and optionally pods will join on startup. + * + * If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this + * applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + */ + @JsonProperty(value = "vnetSubnetID") + private String vnetSubnetId; + + /* + * The ID of the subnet which pods will join when launched. + * + * If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of + * the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + */ + @JsonProperty(value = "podSubnetID") + private String podSubnetId; + + /* + * The maximum number of pods that can run on a node. + */ + @JsonProperty(value = "maxPods") + private Integer maxPods; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /* + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is + * Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + */ + @JsonProperty(value = "osSKU") + private Ossku osSku; + + /* + * The maximum number of nodes for auto-scaling + */ + @JsonProperty(value = "maxCount") + private Integer maxCount; + + /* + * The minimum number of nodes for auto-scaling + */ + @JsonProperty(value = "minCount") + private Integer minCount; + + /* + * Whether to enable auto-scaler + */ + @JsonProperty(value = "enableAutoScaling") + private Boolean enableAutoScaling; + + /* + * This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + */ + @JsonProperty(value = "scaleDownMode") + private ScaleDownMode scaleDownMode; + + /* + * The type of Agent Pool. + */ + @JsonProperty(value = "type") + private AgentPoolType type; + + /* + * The mode of an agent pool. + * + * A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool + * restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools + */ + @JsonProperty(value = "mode") + private AgentPoolMode mode; + + /* + * The version of Kubernetes specified by the user. + * + * Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When + * is specified, the latest supported GA patch version is chosen automatically. Updating the cluster + * with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if + * a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to + * the same Kubernetes version. The node pool version must have the same major version as the control plane. The + * node pool minor version must be within two minor versions of the control plane version. The node pool version + * cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + */ + @JsonProperty(value = "orchestratorVersion") + private String orchestratorVersion; + + /* + * The version of Kubernetes the Agent Pool is running. + * + * If orchestratorVersion is a fully specified version , this field will be exactly equal to it. + * If orchestratorVersion is , this field will contain the full version being + * used. + */ + @JsonProperty(value = "currentOrchestratorVersion", access = JsonProperty.Access.WRITE_ONLY) + private String currentOrchestratorVersion; + + /* + * The version of node image + */ + @JsonProperty(value = "nodeImageVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeImageVersion; + + /* + * Settings for upgrading the agentpool + */ + @JsonProperty(value = "upgradeSettings") + private AgentPoolUpgradeSettings upgradeSettings; + + /* + * The current deployment or provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field + * to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can + * only be stopped if it is Running and provisioning state is Succeeded + */ + @JsonProperty(value = "powerState") + private PowerState powerState; + + /* + * The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is + * 'VirtualMachineScaleSets'. + */ + @JsonProperty(value = "availabilityZones") + private List availabilityZones; + + /* + * Whether each node is allocated its own public IP. + * + * Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common + * scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine + * to minimize hops. For more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + */ + @JsonProperty(value = "enableNodePublicIP") + private Boolean enableNodePublicIp; + + /* + * The public IP prefix ID which VM nodes should use IPs from. + * + * This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + */ + @JsonProperty(value = "nodePublicIPPrefixID") + private String nodePublicIpPrefixId; + + /* + * The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + */ + @JsonProperty(value = "scaleSetPriority") + private ScaleSetPriority scaleSetPriority; + + /* + * The Virtual Machine Scale Set eviction policy. + * + * This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + */ + @JsonProperty(value = "scaleSetEvictionPolicy") + private ScaleSetEvictionPolicy scaleSetEvictionPolicy; + + /* + * The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value + * greater than zero or -1 which indicates default price to be up-to on-demand. + * + * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + */ + @JsonProperty(value = "spotMaxPrice") + private Float spotMaxPrice; + + /* + * The tags to be persisted on the agent pool virtual machine scale set. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The node labels to be persisted across all nodes in agent pool. + */ + @JsonProperty(value = "nodeLabels") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map nodeLabels; + + /* + * The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + */ + @JsonProperty(value = "nodeTaints") + private List nodeTaints; + + /* + * The ID for Proximity Placement Group. + */ + @JsonProperty(value = "proximityPlacementGroupID") + private String proximityPlacementGroupId; + + /* + * Kubelet configurations of agent nodes. + * + * The Kubelet configuration on the agent pool nodes. + */ + @JsonProperty(value = "kubeletConfig") + private KubeletConfig kubeletConfig; + + /* + * OS configurations of Linux agent nodes. + * + * The OS configuration of Linux agent nodes. + */ + @JsonProperty(value = "linuxOSConfig") + private LinuxOSConfig linuxOSConfig; + + /* + * Whether to enable host based OS and data drive encryption. + * + * This is only supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption + */ + @JsonProperty(value = "enableEncryptionAtHost") + private Boolean enableEncryptionAtHost; + + /* + * Whether to enable UltraSSD + */ + @JsonProperty(value = "enableUltraSSD") + private Boolean enableUltraSsd; + + /* + * Whether to use a FIPS-enabled OS. + * + * See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for + * more details. + */ + @JsonProperty(value = "enableFIPS") + private Boolean enableFips; + + /* + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + */ + @JsonProperty(value = "gpuInstanceProfile") + private GpuInstanceProfile gpuInstanceProfile; + + /* + * CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a + * snapshot. + */ + @JsonProperty(value = "creationData") + private CreationData creationData; + + /* + * The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in + * creation scenario and not allowed to changed once set. + * + * This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + */ + @JsonProperty(value = "hostGroupID") + private String hostGroupId; + + /** Creates an instance of ManagedClusterAgentPoolProfileProperties class. */ + public ManagedClusterAgentPoolProfileProperties() { + } + + /** + * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @param count the count value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the vmSize property: The size of the agent pool VMs. + * + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) + * pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: The size of the agent pool VMs. + * + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) + * pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize the vmSize value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @return the osDiskSizeGB value. + */ + public Integer osDiskSizeGB() { + return this.osDiskSizeGB; + } + + /** + * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @param osDiskSizeGB the osDiskSizeGB value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsDiskSizeGB(Integer osDiskSizeGB) { + this.osDiskSizeGB = osDiskSizeGB; + return this; + } + + /** + * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. + * + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + * Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. + * + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + * Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @param osDiskType the osDiskType value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsDiskType(OSDiskType osDiskType) { + this.osDiskType = osDiskType; + return this; + } + + /** + * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.kubeletDiskType; + } + + /** + * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.kubeletDiskType = kubeletDiskType; + return this; + } + + /** + * Get the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + public WorkloadRuntime workloadRuntime() { + return this.workloadRuntime; + } + + /** + * Set the workloadRuntime property: Determines the type of workload a node can run. + * + * @param workloadRuntime the workloadRuntime value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + this.workloadRuntime = workloadRuntime; + return this; + } + + /** + * Get the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. + * + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this + * applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.vnetSubnetId; + } + + /** + * Set the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. + * + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this + * applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withVnetSubnetId(String vnetSubnetId) { + this.vnetSubnetId = vnetSubnetId; + return this; + } + + /** + * Get the podSubnetId property: The ID of the subnet which pods will join when launched. + * + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of + * the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.podSubnetId; + } + + /** + * Set the podSubnetId property: The ID of the subnet which pods will join when launched. + * + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of + * the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId the podSubnetId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withPodSubnetId(String podSubnetId) { + this.podSubnetId = podSubnetId; + return this; + } + + /** + * Get the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set the maxPods property: The maximum number of pods that can run on a node. + * + * @param maxPods the maxPods value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMaxPods(Integer maxPods) { + this.maxPods = maxPods; + return this; + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @param osType the osType value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + public Ossku osSku() { + return this.osSku; + } + + /** + * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @param osSku the osSku value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsSku(Ossku osSku) { + this.osSku = osSku; + return this; + } + + /** + * Get the maxCount property: The maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + public Integer maxCount() { + return this.maxCount; + } + + /** + * Set the maxCount property: The maximum number of nodes for auto-scaling. + * + * @param maxCount the maxCount value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMaxCount(Integer maxCount) { + this.maxCount = maxCount; + return this; + } + + /** + * Get the minCount property: The minimum number of nodes for auto-scaling. + * + * @return the minCount value. + */ + public Integer minCount() { + return this.minCount; + } + + /** + * Set the minCount property: The minimum number of nodes for auto-scaling. + * + * @param minCount the minCount value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMinCount(Integer minCount) { + this.minCount = minCount; + return this; + } + + /** + * Get the enableAutoScaling property: Whether to enable auto-scaler. + * + * @return the enableAutoScaling value. + */ + public Boolean enableAutoScaling() { + return this.enableAutoScaling; + } + + /** + * Set the enableAutoScaling property: Whether to enable auto-scaler. + * + * @param enableAutoScaling the enableAutoScaling value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableAutoScaling(Boolean enableAutoScaling) { + this.enableAutoScaling = enableAutoScaling; + return this; + } + + /** + * Get the scaleDownMode property: This also effects the cluster autoscaler behavior. If not specified, it defaults + * to Delete. + * + * @return the scaleDownMode value. + */ + public ScaleDownMode scaleDownMode() { + return this.scaleDownMode; + } + + /** + * Set the scaleDownMode property: This also effects the cluster autoscaler behavior. If not specified, it defaults + * to Delete. + * + * @param scaleDownMode the scaleDownMode value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withScaleDownMode(ScaleDownMode scaleDownMode) { + this.scaleDownMode = scaleDownMode; + return this; + } + + /** + * Get the type property: The type of Agent Pool. + * + * @return the type value. + */ + public AgentPoolType type() { + return this.type; + } + + /** + * Set the type property: The type of Agent Pool. + * + * @param type the type value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withType(AgentPoolType type) { + this.type = type; + return this; + } + + /** + * Get the mode property: The mode of an agent pool. + * + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool + * restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set the mode property: The mode of an agent pool. + * + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool + * restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @param mode the mode value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMode(AgentPoolMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the orchestratorVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in + * an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the + * control plane. The node pool minor version must be within two minor versions of the control plane version. The + * node pool version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in + * an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the + * control plane. The node pool minor version must be within two minor versions of the control plane version. The + * node pool version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. + * + *

If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly + * equal to it. If orchestratorVersion is <major.minor>, this field will contain the full + * <major.minor.patch> version being used. + * + * @return the currentOrchestratorVersion value. + */ + public String currentOrchestratorVersion() { + return this.currentOrchestratorVersion; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the upgradeSettings property: Settings for upgrading the agentpool. + * + * @return the upgradeSettings value. + */ + public AgentPoolUpgradeSettings upgradeSettings() { + return this.upgradeSettings; + } + + /** + * Set the upgradeSettings property: Settings for upgrading the agentpool. + * + * @param upgradeSettings the upgradeSettings value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + this.upgradeSettings = upgradeSettings; + return this; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the powerState property: When an Agent Pool is first created it is initially Running. The Agent Pool can be + * stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + * charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * Set the powerState property: When an Agent Pool is first created it is initially Running. The Agent Pool can be + * stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + * charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. + * + * @param powerState the powerState value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withPowerState(PowerState powerState) { + this.powerState = powerState; + return this; + } + + /** + * Get the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @return the availabilityZones value. + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @param availabilityZones the availabilityZones value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withAvailabilityZones(List availabilityZones) { + this.availabilityZones = availabilityZones; + return this; + } + + /** + * Get the enableNodePublicIp property: Whether each node is allocated its own public IP. + * + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common + * scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to + * minimize hops. For more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.enableNodePublicIp; + } + + /** + * Set the enableNodePublicIp property: Whether each node is allocated its own public IP. + * + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common + * scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to + * minimize hops. For more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @param enableNodePublicIp the enableNodePublicIp value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { + this.enableNodePublicIp = enableNodePublicIp; + return this; + } + + /** + * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.nodePublicIpPrefixId; + } + + /** + * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + this.nodePublicIpPrefixId = nodePublicIpPrefixId; + return this; + } + + /** + * Get the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * + * @return the scaleSetPriority value. + */ + public ScaleSetPriority scaleSetPriority() { + return this.scaleSetPriority; + } + + /** + * Set the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * + * @param scaleSetPriority the scaleSetPriority value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + this.scaleSetPriority = scaleSetPriority; + return this; + } + + /** + * Get the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + * + * @return the scaleSetEvictionPolicy value. + */ + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.scaleSetEvictionPolicy; + } + + /** + * Set the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + * + * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withScaleSetEvictionPolicy( + ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + this.scaleSetEvictionPolicy = scaleSetEvictionPolicy; + return this; + } + + /** + * Get the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @return the spotMaxPrice value. + */ + public Float spotMaxPrice() { + return this.spotMaxPrice; + } + + /** + * Set the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @param spotMaxPrice the spotMaxPrice value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withSpotMaxPrice(Float spotMaxPrice) { + this.spotMaxPrice = spotMaxPrice; + return this; + } + + /** + * Get the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @param tags the tags value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value. + */ + public Map nodeLabels() { + return this.nodeLabels; + } + + /** + * Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @param nodeLabels the nodeLabels value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withNodeLabels(Map nodeLabels) { + this.nodeLabels = nodeLabels; + return this; + } + + /** + * Get the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + public List nodeTaints() { + return this.nodeTaints; + } + + /** + * Set the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @param nodeTaints the nodeTaints value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withNodeTaints(List nodeTaints) { + this.nodeTaints = nodeTaints; + return this; + } + + /** + * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @return the proximityPlacementGroupId value. + */ + public String proximityPlacementGroupId() { + return this.proximityPlacementGroupId; + } + + /** + * Set the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @param proximityPlacementGroupId the proximityPlacementGroupId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withProximityPlacementGroupId(String proximityPlacementGroupId) { + this.proximityPlacementGroupId = proximityPlacementGroupId; + return this; + } + + /** + * Get the kubeletConfig property: Kubelet configurations of agent nodes. + * + *

The Kubelet configuration on the agent pool nodes. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.kubeletConfig; + } + + /** + * Set the kubeletConfig property: Kubelet configurations of agent nodes. + * + *

The Kubelet configuration on the agent pool nodes. + * + * @param kubeletConfig the kubeletConfig value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withKubeletConfig(KubeletConfig kubeletConfig) { + this.kubeletConfig = kubeletConfig; + return this; + } + + /** + * Get the linuxOSConfig property: OS configurations of Linux agent nodes. + * + *

The OS configuration of Linux agent nodes. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.linuxOSConfig; + } + + /** + * Set the linuxOSConfig property: OS configurations of Linux agent nodes. + * + *

The OS configuration of Linux agent nodes. + * + * @param linuxOSConfig the linuxOSConfig value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + this.linuxOSConfig = linuxOSConfig; + return this; + } + + /** + * Get the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. + * + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @return the enableEncryptionAtHost value. + */ + public Boolean enableEncryptionAtHost() { + return this.enableEncryptionAtHost; + } + + /** + * Set the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. + * + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + this.enableEncryptionAtHost = enableEncryptionAtHost; + return this; + } + + /** + * Get the enableUltraSsd property: Whether to enable UltraSSD. + * + * @return the enableUltraSsd value. + */ + public Boolean enableUltraSsd() { + return this.enableUltraSsd; + } + + /** + * Set the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd the enableUltraSsd value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableUltraSsd(Boolean enableUltraSsd) { + this.enableUltraSsd = enableUltraSsd; + return this; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Set the enableFips property: Whether to use a FIPS-enabled OS. + * + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @param enableFips the enableFips value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableFips(Boolean enableFips) { + this.enableFips = enableFips; + return this; + } + + /** + * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + public GpuInstanceProfile gpuInstanceProfile() { + return this.gpuInstanceProfile; + } + + /** + * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.gpuInstanceProfile = gpuInstanceProfile; + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * Get the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @return the hostGroupId value. + */ + public String hostGroupId() { + return this.hostGroupId; + } + + /** + * Set the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @param hostGroupId the hostGroupId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withHostGroupId(String hostGroupId) { + this.hostGroupId = hostGroupId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (upgradeSettings() != null) { + upgradeSettings().validate(); + } + if (powerState() != null) { + powerState().validate(); + } + if (kubeletConfig() != null) { + kubeletConfig().validate(); + } + if (linuxOSConfig() != null) { + linuxOSConfig().validate(); + } + if (creationData() != null) { + creationData().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterInner.java new file mode 100644 index 0000000000000..93e6f49e6c917 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterInner.java @@ -0,0 +1,1049 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ExtendedLocation; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterOidcIssuerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UserAssignedIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Managed cluster. */ +@Fluent +public final class ManagedClusterInner extends Resource { + /* + * The managed cluster SKU. + */ + @JsonProperty(value = "sku") + private ManagedClusterSku sku; + + /* + * The extended location of the Virtual Machine. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * The identity of the managed cluster, if configured. + */ + @JsonProperty(value = "identity") + private ManagedClusterIdentity identity; + + /* + * Properties of a managed cluster. + */ + @JsonProperty(value = "properties") + private ManagedClusterProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ManagedClusterInner class. */ + public ManagedClusterInner() { + } + + /** + * Get the sku property: The managed cluster SKU. + * + * @return the sku value. + */ + public ManagedClusterSku sku() { + return this.sku; + } + + /** + * Set the sku property: The managed cluster SKU. + * + * @param sku the sku value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSku(ManagedClusterSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the extendedLocation property: The extended location of the Virtual Machine. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extended location of the Virtual Machine. + * + * @param extendedLocation the extendedLocation value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the identity property: The identity of the managed cluster, if configured. + * + * @return the identity value. + */ + public ManagedClusterIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the managed cluster, if configured. + * + * @param identity the identity value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withIdentity(ManagedClusterIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the innerProperties property: Properties of a managed cluster. + * + * @return the innerProperties value. + */ + private ManagedClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the powerState property: The Power State of the cluster. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.innerProperties() == null ? null : this.innerProperties().powerState(); + } + + /** + * Get the maxAgentPools property: The max number of agent pools for the managed cluster. + * + * @return the maxAgentPools value. + */ + public Integer maxAgentPools() { + return this.innerProperties() == null ? null : this.innerProperties().maxAgentPools(); + } + + /** + * Get the kubernetesVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes + * minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For + * example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is + * not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + * details. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); + } + + /** + * Set the kubernetesVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes + * minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For + * example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is + * not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + * details. + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withKubernetesVersion(String kubernetesVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withKubernetesVersion(kubernetesVersion); + return this; + } + + /** + * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. + * + *

If kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal + * to it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentKubernetesVersion value. + */ + public String currentKubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().currentKubernetesVersion(); + } + + /** + * Get the dnsPrefix property: The DNS prefix of the Managed Cluster. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @return the dnsPrefix value. + */ + public String dnsPrefix() { + return this.innerProperties() == null ? null : this.innerProperties().dnsPrefix(); + } + + /** + * Set the dnsPrefix property: The DNS prefix of the Managed Cluster. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @param dnsPrefix the dnsPrefix value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withDnsPrefix(String dnsPrefix) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withDnsPrefix(dnsPrefix); + return this; + } + + /** + * Get the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @return the fqdnSubdomain value. + */ + public String fqdnSubdomain() { + return this.innerProperties() == null ? null : this.innerProperties().fqdnSubdomain(); + } + + /** + * Set the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @param fqdnSubdomain the fqdnSubdomain value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withFqdnSubdomain(String fqdnSubdomain) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withFqdnSubdomain(fqdnSubdomain); + return this; + } + + /** + * Get the fqdn property: The FQDN of the master pool. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.innerProperties() == null ? null : this.innerProperties().fqdn(); + } + + /** + * Get the privateFqdn property: The FQDN of private cluster. + * + * @return the privateFqdn value. + */ + public String privateFqdn() { + return this.innerProperties() == null ? null : this.innerProperties().privateFqdn(); + } + + /** + * Get the azurePortalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This + * FQDN is for use only by the Azure Portal and should not be used by other clients. + * + *

The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, + * which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal + * to function properly. + * + * @return the azurePortalFqdn value. + */ + public String azurePortalFqdn() { + return this.innerProperties() == null ? null : this.innerProperties().azurePortalFqdn(); + } + + /** + * Get the agentPoolProfiles property: The agent pool properties. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); + } + + /** + * Set the agentPoolProfiles property: The agent pool properties. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAgentPoolProfiles(List agentPoolProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + /** + * Get the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @return the linuxProfile value. + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.innerProperties() == null ? null : this.innerProperties().linuxProfile(); + } + + /** + * Set the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @param linuxProfile the linuxProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withLinuxProfile(linuxProfile); + return this; + } + + /** + * Get the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @return the windowsProfile value. + */ + public ManagedClusterWindowsProfile windowsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); + } + + /** + * Set the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @param windowsProfile the windowsProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withWindowsProfile(windowsProfile); + return this; + } + + /** + * Get the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @return the servicePrincipalProfile value. + */ + public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { + return this.innerProperties() == null ? null : this.innerProperties().servicePrincipalProfile(); + } + + /** + * Set the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @param servicePrincipalProfile the servicePrincipalProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withServicePrincipalProfile( + ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withServicePrincipalProfile(servicePrincipalProfile); + return this; + } + + /** + * Get the addonProfiles property: The profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + public Map addonProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().addonProfiles(); + } + + /** + * Set the addonProfiles property: The profile of managed cluster add-on. + * + * @param addonProfiles the addonProfiles value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAddonProfiles(Map addonProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAddonProfiles(addonProfiles); + return this; + } + + /** + * Get the podIdentityProfile property: The pod identity profile of the Managed Cluster. + * + *

See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on + * AAD pod identity integration. + * + * @return the podIdentityProfile value. + */ + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.innerProperties() == null ? null : this.innerProperties().podIdentityProfile(); + } + + /** + * Set the podIdentityProfile property: The pod identity profile of the Managed Cluster. + * + *

See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on + * AAD pod identity integration. + * + * @param podIdentityProfile the podIdentityProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withPodIdentityProfile(podIdentityProfile); + return this; + } + + /** + * Get the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @return the oidcIssuerProfile value. + */ + public ManagedClusterOidcIssuerProfile oidcIssuerProfile() { + return this.innerProperties() == null ? null : this.innerProperties().oidcIssuerProfile(); + } + + /** + * Set the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @param oidcIssuerProfile the oidcIssuerProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withOidcIssuerProfile(oidcIssuerProfile); + return this; + } + + /** + * Get the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value. + */ + public String nodeResourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().nodeResourceGroup(); + } + + /** + * Set the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @param nodeResourceGroup the nodeResourceGroup value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withNodeResourceGroup(String nodeResourceGroup) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withNodeResourceGroup(nodeResourceGroup); + return this; + } + + /** + * Get the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @return the enableRbac value. + */ + public Boolean enableRbac() { + return this.innerProperties() == null ? null : this.innerProperties().enableRbac(); + } + + /** + * Set the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @param enableRbac the enableRbac value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnableRbac(Boolean enableRbac) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnableRbac(enableRbac); + return this; + } + + /** + * Get the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @return the supportPlan value. + */ + public KubernetesSupportPlan supportPlan() { + return this.innerProperties() == null ? null : this.innerProperties().supportPlan(); + } + + /** + * Set the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @param supportPlan the supportPlan value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSupportPlan(KubernetesSupportPlan supportPlan) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withSupportPlan(supportPlan); + return this; + } + + /** + * Get the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more + * at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @return the enablePodSecurityPolicy value. + */ + public Boolean enablePodSecurityPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().enablePodSecurityPolicy(); + } + + /** + * Set the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more + * at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @param enablePodSecurityPolicy the enablePodSecurityPolicy value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnablePodSecurityPolicy(enablePodSecurityPolicy); + return this; + } + + /** + * Get the networkProfile property: The network configuration profile. + * + * @return the networkProfile value. + */ + public ContainerServiceNetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + } + + /** + * Set the networkProfile property: The network configuration profile. + * + * @param networkProfile the networkProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withNetworkProfile(networkProfile); + return this; + } + + /** + * Get the aadProfile property: AADProfile specifies attributes for Azure Active Directory integration. + * + *

The Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + public ManagedClusterAadProfile aadProfile() { + return this.innerProperties() == null ? null : this.innerProperties().aadProfile(); + } + + /** + * Set the aadProfile property: AADProfile specifies attributes for Azure Active Directory integration. + * + *

The Azure Active Directory configuration. + * + * @param aadProfile the aadProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAadProfile(ManagedClusterAadProfile aadProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAadProfile(aadProfile); + return this; + } + + /** + * Get the autoUpgradeProfile property: The auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.innerProperties() == null ? null : this.innerProperties().autoUpgradeProfile(); + } + + /** + * Set the autoUpgradeProfile property: The auto upgrade configuration. + * + * @param autoUpgradeProfile the autoUpgradeProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAutoUpgradeProfile(autoUpgradeProfile); + return this; + } + + /** + * Get the upgradeSettings property: Settings for upgrading a cluster. + * + * @return the upgradeSettings value. + */ + public ClusterUpgradeSettings upgradeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeSettings(); + } + + /** + * Set the upgradeSettings property: Settings for upgrading a cluster. + * + * @param upgradeSettings the upgradeSettings value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withUpgradeSettings(ClusterUpgradeSettings upgradeSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withUpgradeSettings(upgradeSettings); + return this; + } + + /** + * Get the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @return the autoScalerProfile value. + */ + public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { + return this.innerProperties() == null ? null : this.innerProperties().autoScalerProfile(); + } + + /** + * Set the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @param autoScalerProfile the autoScalerProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAutoScalerProfile(autoScalerProfile); + return this; + } + + /** + * Get the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { + return this.innerProperties() == null ? null : this.innerProperties().apiServerAccessProfile(); + } + + /** + * Set the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @param apiServerAccessProfile the apiServerAccessProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withApiServerAccessProfile(apiServerAccessProfile); + return this; + } + + /** + * Get the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. + * + *

This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @return the diskEncryptionSetId value. + */ + public String diskEncryptionSetId() { + return this.innerProperties() == null ? null : this.innerProperties().diskEncryptionSetId(); + } + + /** + * Set the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. + * + *

This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @param diskEncryptionSetId the diskEncryptionSetId value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withDiskEncryptionSetId(String diskEncryptionSetId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withDiskEncryptionSetId(diskEncryptionSetId); + return this; + } + + /** + * Get the identityProfile property: Identities associated with the cluster. + * + * @return the identityProfile value. + */ + public Map identityProfile() { + return this.innerProperties() == null ? null : this.innerProperties().identityProfile(); + } + + /** + * Set the identityProfile property: Identities associated with the cluster. + * + * @param identityProfile the identityProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withIdentityProfile(Map identityProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withIdentityProfile(identityProfile); + return this; + } + + /** + * Get the privateLinkResources property: Private link resources associated with the cluster. + * + * @return the privateLinkResources value. + */ + public List privateLinkResources() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkResources(); + } + + /** + * Set the privateLinkResources property: Private link resources associated with the cluster. + * + * @param privateLinkResources the privateLinkResources value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withPrivateLinkResources(List privateLinkResources) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withPrivateLinkResources(privateLinkResources); + return this; + } + + /** + * Get the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. + * + *

If set to true, getting static credentials will be disabled for this cluster. This must only be used on + * Managed Clusters that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @return the disableLocalAccounts value. + */ + public Boolean disableLocalAccounts() { + return this.innerProperties() == null ? null : this.innerProperties().disableLocalAccounts(); + } + + /** + * Set the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. + * + *

If set to true, getting static credentials will be disabled for this cluster. This must only be used on + * Managed Clusters that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @param disableLocalAccounts the disableLocalAccounts value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withDisableLocalAccounts(Boolean disableLocalAccounts) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withDisableLocalAccounts(disableLocalAccounts); + return this; + } + + /** + * Get the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @return the httpProxyConfig value. + */ + public ManagedClusterHttpProxyConfig httpProxyConfig() { + return this.innerProperties() == null ? null : this.innerProperties().httpProxyConfig(); + } + + /** + * Set the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @param httpProxyConfig the httpProxyConfig value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withHttpProxyConfig(httpProxyConfig); + return this; + } + + /** + * Get the securityProfile property: Security profile for the managed cluster. + * + * @return the securityProfile value. + */ + public ManagedClusterSecurityProfile securityProfile() { + return this.innerProperties() == null ? null : this.innerProperties().securityProfile(); + } + + /** + * Set the securityProfile property: Security profile for the managed cluster. + * + * @param securityProfile the securityProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSecurityProfile(ManagedClusterSecurityProfile securityProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withSecurityProfile(securityProfile); + return this; + } + + /** + * Get the storageProfile property: Storage profile for the managed cluster. + * + * @return the storageProfile value. + */ + public ManagedClusterStorageProfile storageProfile() { + return this.innerProperties() == null ? null : this.innerProperties().storageProfile(); + } + + /** + * Set the storageProfile property: Storage profile for the managed cluster. + * + * @param storageProfile the storageProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withStorageProfile(ManagedClusterStorageProfile storageProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withStorageProfile(storageProfile); + return this; + } + + /** + * Get the publicNetworkAccess property: PublicNetworkAccess of the managedCluster + * + *

Allow or deny public network access for AKS. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: PublicNetworkAccess of the managedCluster + * + *

Allow or deny public network access for AKS. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @return the workloadAutoScalerProfile value. + */ + public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { + return this.innerProperties() == null ? null : this.innerProperties().workloadAutoScalerProfile(); + } + + /** + * Set the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @param workloadAutoScalerProfile the workloadAutoScalerProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withWorkloadAutoScalerProfile( + ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withWorkloadAutoScalerProfile(workloadAutoScalerProfile); + return this; + } + + /** + * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @return the azureMonitorProfile value. + */ + public ManagedClusterAzureMonitorProfile azureMonitorProfile() { + return this.innerProperties() == null ? null : this.innerProperties().azureMonitorProfile(); + } + + /** + * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @param azureMonitorProfile the azureMonitorProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAzureMonitorProfile(azureMonitorProfile); + return this; + } + + /** + * Get the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @return the serviceMeshProfile value. + */ + public ServiceMeshProfile serviceMeshProfile() { + return this.innerProperties() == null ? null : this.innerProperties().serviceMeshProfile(); + } + + /** + * Set the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @param serviceMeshProfile the serviceMeshProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withServiceMeshProfile(serviceMeshProfile); + return this; + } + + /** + * Get the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds + * (i.e: create, delete, create sequence). + * + * @return the resourceUid value. + */ + public String resourceUid() { + return this.innerProperties() == null ? null : this.innerProperties().resourceUid(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (extendedLocation() != null) { + extendedLocation().validate(); + } + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterProperties.java new file mode 100644 index 0000000000000..fdbba706919ea --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterProperties.java @@ -0,0 +1,1172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterOidcIssuerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UserAssignedIdentity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Properties of the managed cluster. */ +@Fluent +public final class ManagedClusterProperties { + /* + * The current provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The Power State of the cluster. + */ + @JsonProperty(value = "powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /* + * The max number of agent pools for the managed cluster. + */ + @JsonProperty(value = "maxAgentPools", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxAgentPools; + + /* + * The version of Kubernetes specified by the user. + * + * Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When + * is specified, the latest supported GA patch version is chosen automatically. Updating the cluster + * with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if + * a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + * be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between + * 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS + * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * The version of Kubernetes the Managed Cluster is running. + * + * If kubernetesVersion was a fully specified version , this field will be exactly equal to it. + * If kubernetesVersion was , this field will contain the full version being used. + */ + @JsonProperty(value = "currentKubernetesVersion", access = JsonProperty.Access.WRITE_ONLY) + private String currentKubernetesVersion; + + /* + * The DNS prefix of the Managed Cluster. + * + * This cannot be updated once the Managed Cluster has been created. + */ + @JsonProperty(value = "dnsPrefix") + private String dnsPrefix; + + /* + * The FQDN subdomain of the private cluster with custom private dns zone. + * + * This cannot be updated once the Managed Cluster has been created. + */ + @JsonProperty(value = "fqdnSubdomain") + private String fqdnSubdomain; + + /* + * The FQDN of the master pool. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * The FQDN of private cluster. + */ + @JsonProperty(value = "privateFQDN", access = JsonProperty.Access.WRITE_ONLY) + private String privateFqdn; + + /* + * The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN is for use only by the Azure + * Portal and should not be used by other clients. + * + * The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, + * which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal + * to function properly. + */ + @JsonProperty(value = "azurePortalFQDN", access = JsonProperty.Access.WRITE_ONLY) + private String azurePortalFqdn; + + /* + * The agent pool properties. + */ + @JsonProperty(value = "agentPoolProfiles") + private List agentPoolProfiles; + + /* + * The profile for Linux VMs in the Managed Cluster. + */ + @JsonProperty(value = "linuxProfile") + private ContainerServiceLinuxProfile linuxProfile; + + /* + * The profile for Windows VMs in the Managed Cluster. + */ + @JsonProperty(value = "windowsProfile") + private ManagedClusterWindowsProfile windowsProfile; + + /* + * Information about a service principal identity for the cluster to use for manipulating Azure APIs. + */ + @JsonProperty(value = "servicePrincipalProfile") + private ManagedClusterServicePrincipalProfile servicePrincipalProfile; + + /* + * The profile of managed cluster add-on. + */ + @JsonProperty(value = "addonProfiles") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map addonProfiles; + + /* + * The pod identity profile of the Managed Cluster. + * + * See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on + * AAD pod identity integration. + */ + @JsonProperty(value = "podIdentityProfile") + private ManagedClusterPodIdentityProfile podIdentityProfile; + + /* + * The OIDC issuer profile of the Managed Cluster. + */ + @JsonProperty(value = "oidcIssuerProfile") + private ManagedClusterOidcIssuerProfile oidcIssuerProfile; + + /* + * The name of the resource group containing agent pool nodes. + */ + @JsonProperty(value = "nodeResourceGroup") + private String nodeResourceGroup; + + /* + * Whether to enable Kubernetes Role-Based Access Control. + */ + @JsonProperty(value = "enableRBAC") + private Boolean enableRbac; + + /* + * The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + */ + @JsonProperty(value = "supportPlan") + private KubernetesSupportPlan supportPlan; + + /* + * (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in + * Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and + * https://aka.ms/aks/psp. + */ + @JsonProperty(value = "enablePodSecurityPolicy") + private Boolean enablePodSecurityPolicy; + + /* + * The network configuration profile. + */ + @JsonProperty(value = "networkProfile") + private ContainerServiceNetworkProfile networkProfile; + + /* + * AADProfile specifies attributes for Azure Active Directory integration. + * + * The Azure Active Directory configuration. + */ + @JsonProperty(value = "aadProfile") + private ManagedClusterAadProfile aadProfile; + + /* + * The auto upgrade configuration. + */ + @JsonProperty(value = "autoUpgradeProfile") + private ManagedClusterAutoUpgradeProfile autoUpgradeProfile; + + /* + * Settings for upgrading a cluster. + */ + @JsonProperty(value = "upgradeSettings") + private ClusterUpgradeSettings upgradeSettings; + + /* + * Parameters to be applied to the cluster-autoscaler when enabled + */ + @JsonProperty(value = "autoScalerProfile") + private ManagedClusterPropertiesAutoScalerProfile autoScalerProfile; + + /* + * The access profile for managed cluster API server. + */ + @JsonProperty(value = "apiServerAccessProfile") + private ManagedClusterApiServerAccessProfile apiServerAccessProfile; + + /* + * The Resource ID of the disk encryption set to use for enabling encryption at rest. + * + * This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + */ + @JsonProperty(value = "diskEncryptionSetID") + private String diskEncryptionSetId; + + /* + * Identities associated with the cluster. + */ + @JsonProperty(value = "identityProfile") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map identityProfile; + + /* + * Private link resources associated with the cluster. + */ + @JsonProperty(value = "privateLinkResources") + private List privateLinkResources; + + /* + * If local accounts should be disabled on the Managed Cluster. + * + * If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed + * Clusters that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + */ + @JsonProperty(value = "disableLocalAccounts") + private Boolean disableLocalAccounts; + + /* + * Configurations for provisioning the cluster with HTTP proxy servers. + */ + @JsonProperty(value = "httpProxyConfig") + private ManagedClusterHttpProxyConfig httpProxyConfig; + + /* + * Security profile for the managed cluster. + */ + @JsonProperty(value = "securityProfile") + private ManagedClusterSecurityProfile securityProfile; + + /* + * Storage profile for the managed cluster. + */ + @JsonProperty(value = "storageProfile") + private ManagedClusterStorageProfile storageProfile; + + /* + * PublicNetworkAccess of the managedCluster + * + * Allow or deny public network access for AKS + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * Workload Auto-scaler profile for the managed cluster. + */ + @JsonProperty(value = "workloadAutoScalerProfile") + private ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile; + + /* + * Azure Monitor addon profiles for monitoring the managed cluster. + */ + @JsonProperty(value = "azureMonitorProfile") + private ManagedClusterAzureMonitorProfile azureMonitorProfile; + + /* + * Service mesh profile for a managed cluster. + */ + @JsonProperty(value = "serviceMeshProfile") + private ServiceMeshProfile serviceMeshProfile; + + /* + * The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create + * sequence) + */ + @JsonProperty(value = "resourceUID", access = JsonProperty.Access.WRITE_ONLY) + private String resourceUid; + + /** Creates an instance of ManagedClusterProperties class. */ + public ManagedClusterProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the powerState property: The Power State of the cluster. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * Get the maxAgentPools property: The max number of agent pools for the managed cluster. + * + * @return the maxAgentPools value. + */ + public Integer maxAgentPools() { + return this.maxAgentPools; + } + + /** + * Get the kubernetesVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes + * minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For + * example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is + * not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + * details. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes + * minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For + * example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is + * not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + * details. + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. + * + *

If kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal + * to it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentKubernetesVersion value. + */ + public String currentKubernetesVersion() { + return this.currentKubernetesVersion; + } + + /** + * Get the dnsPrefix property: The DNS prefix of the Managed Cluster. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @return the dnsPrefix value. + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set the dnsPrefix property: The DNS prefix of the Managed Cluster. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @param dnsPrefix the dnsPrefix value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @return the fqdnSubdomain value. + */ + public String fqdnSubdomain() { + return this.fqdnSubdomain; + } + + /** + * Set the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @param fqdnSubdomain the fqdnSubdomain value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withFqdnSubdomain(String fqdnSubdomain) { + this.fqdnSubdomain = fqdnSubdomain; + return this; + } + + /** + * Get the fqdn property: The FQDN of the master pool. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the privateFqdn property: The FQDN of private cluster. + * + * @return the privateFqdn value. + */ + public String privateFqdn() { + return this.privateFqdn; + } + + /** + * Get the azurePortalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This + * FQDN is for use only by the Azure Portal and should not be used by other clients. + * + *

The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, + * which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal + * to function properly. + * + * @return the azurePortalFqdn value. + */ + public String azurePortalFqdn() { + return this.azurePortalFqdn; + } + + /** + * Get the agentPoolProfiles property: The agent pool properties. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles property: The agent pool properties. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @return the linuxProfile value. + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @param linuxProfile the linuxProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @return the windowsProfile value. + */ + public ManagedClusterWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @param windowsProfile the windowsProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Get the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @return the servicePrincipalProfile value. + */ + public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { + return this.servicePrincipalProfile; + } + + /** + * Set the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @param servicePrincipalProfile the servicePrincipalProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withServicePrincipalProfile( + ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + this.servicePrincipalProfile = servicePrincipalProfile; + return this; + } + + /** + * Get the addonProfiles property: The profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + public Map addonProfiles() { + return this.addonProfiles; + } + + /** + * Set the addonProfiles property: The profile of managed cluster add-on. + * + * @param addonProfiles the addonProfiles value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAddonProfiles(Map addonProfiles) { + this.addonProfiles = addonProfiles; + return this; + } + + /** + * Get the podIdentityProfile property: The pod identity profile of the Managed Cluster. + * + *

See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on + * AAD pod identity integration. + * + * @return the podIdentityProfile value. + */ + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.podIdentityProfile; + } + + /** + * Set the podIdentityProfile property: The pod identity profile of the Managed Cluster. + * + *

See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on + * AAD pod identity integration. + * + * @param podIdentityProfile the podIdentityProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + this.podIdentityProfile = podIdentityProfile; + return this; + } + + /** + * Get the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @return the oidcIssuerProfile value. + */ + public ManagedClusterOidcIssuerProfile oidcIssuerProfile() { + return this.oidcIssuerProfile; + } + + /** + * Set the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @param oidcIssuerProfile the oidcIssuerProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile) { + this.oidcIssuerProfile = oidcIssuerProfile; + return this; + } + + /** + * Get the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value. + */ + public String nodeResourceGroup() { + return this.nodeResourceGroup; + } + + /** + * Set the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @param nodeResourceGroup the nodeResourceGroup value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withNodeResourceGroup(String nodeResourceGroup) { + this.nodeResourceGroup = nodeResourceGroup; + return this; + } + + /** + * Get the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @return the enableRbac value. + */ + public Boolean enableRbac() { + return this.enableRbac; + } + + /** + * Set the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @param enableRbac the enableRbac value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withEnableRbac(Boolean enableRbac) { + this.enableRbac = enableRbac; + return this; + } + + /** + * Get the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @return the supportPlan value. + */ + public KubernetesSupportPlan supportPlan() { + return this.supportPlan; + } + + /** + * Set the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @param supportPlan the supportPlan value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withSupportPlan(KubernetesSupportPlan supportPlan) { + this.supportPlan = supportPlan; + return this; + } + + /** + * Get the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more + * at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @return the enablePodSecurityPolicy value. + */ + public Boolean enablePodSecurityPolicy() { + return this.enablePodSecurityPolicy; + } + + /** + * Set the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more + * at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @param enablePodSecurityPolicy the enablePodSecurityPolicy value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + this.enablePodSecurityPolicy = enablePodSecurityPolicy; + return this; + } + + /** + * Get the networkProfile property: The network configuration profile. + * + * @return the networkProfile value. + */ + public ContainerServiceNetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: The network configuration profile. + * + * @param networkProfile the networkProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the aadProfile property: AADProfile specifies attributes for Azure Active Directory integration. + * + *

The Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + public ManagedClusterAadProfile aadProfile() { + return this.aadProfile; + } + + /** + * Set the aadProfile property: AADProfile specifies attributes for Azure Active Directory integration. + * + *

The Azure Active Directory configuration. + * + * @param aadProfile the aadProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAadProfile(ManagedClusterAadProfile aadProfile) { + this.aadProfile = aadProfile; + return this; + } + + /** + * Get the autoUpgradeProfile property: The auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.autoUpgradeProfile; + } + + /** + * Set the autoUpgradeProfile property: The auto upgrade configuration. + * + * @param autoUpgradeProfile the autoUpgradeProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + this.autoUpgradeProfile = autoUpgradeProfile; + return this; + } + + /** + * Get the upgradeSettings property: Settings for upgrading a cluster. + * + * @return the upgradeSettings value. + */ + public ClusterUpgradeSettings upgradeSettings() { + return this.upgradeSettings; + } + + /** + * Set the upgradeSettings property: Settings for upgrading a cluster. + * + * @param upgradeSettings the upgradeSettings value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withUpgradeSettings(ClusterUpgradeSettings upgradeSettings) { + this.upgradeSettings = upgradeSettings; + return this; + } + + /** + * Get the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @return the autoScalerProfile value. + */ + public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { + return this.autoScalerProfile; + } + + /** + * Set the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @param autoScalerProfile the autoScalerProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + this.autoScalerProfile = autoScalerProfile; + return this; + } + + /** + * Get the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { + return this.apiServerAccessProfile; + } + + /** + * Set the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @param apiServerAccessProfile the apiServerAccessProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withApiServerAccessProfile( + ManagedClusterApiServerAccessProfile apiServerAccessProfile) { + this.apiServerAccessProfile = apiServerAccessProfile; + return this; + } + + /** + * Get the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. + * + *

This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @return the diskEncryptionSetId value. + */ + public String diskEncryptionSetId() { + return this.diskEncryptionSetId; + } + + /** + * Set the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. + * + *

This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @param diskEncryptionSetId the diskEncryptionSetId value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withDiskEncryptionSetId(String diskEncryptionSetId) { + this.diskEncryptionSetId = diskEncryptionSetId; + return this; + } + + /** + * Get the identityProfile property: Identities associated with the cluster. + * + * @return the identityProfile value. + */ + public Map identityProfile() { + return this.identityProfile; + } + + /** + * Set the identityProfile property: Identities associated with the cluster. + * + * @param identityProfile the identityProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withIdentityProfile(Map identityProfile) { + this.identityProfile = identityProfile; + return this; + } + + /** + * Get the privateLinkResources property: Private link resources associated with the cluster. + * + * @return the privateLinkResources value. + */ + public List privateLinkResources() { + return this.privateLinkResources; + } + + /** + * Set the privateLinkResources property: Private link resources associated with the cluster. + * + * @param privateLinkResources the privateLinkResources value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withPrivateLinkResources(List privateLinkResources) { + this.privateLinkResources = privateLinkResources; + return this; + } + + /** + * Get the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. + * + *

If set to true, getting static credentials will be disabled for this cluster. This must only be used on + * Managed Clusters that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @return the disableLocalAccounts value. + */ + public Boolean disableLocalAccounts() { + return this.disableLocalAccounts; + } + + /** + * Set the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. + * + *

If set to true, getting static credentials will be disabled for this cluster. This must only be used on + * Managed Clusters that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @param disableLocalAccounts the disableLocalAccounts value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withDisableLocalAccounts(Boolean disableLocalAccounts) { + this.disableLocalAccounts = disableLocalAccounts; + return this; + } + + /** + * Get the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @return the httpProxyConfig value. + */ + public ManagedClusterHttpProxyConfig httpProxyConfig() { + return this.httpProxyConfig; + } + + /** + * Set the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @param httpProxyConfig the httpProxyConfig value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { + this.httpProxyConfig = httpProxyConfig; + return this; + } + + /** + * Get the securityProfile property: Security profile for the managed cluster. + * + * @return the securityProfile value. + */ + public ManagedClusterSecurityProfile securityProfile() { + return this.securityProfile; + } + + /** + * Set the securityProfile property: Security profile for the managed cluster. + * + * @param securityProfile the securityProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withSecurityProfile(ManagedClusterSecurityProfile securityProfile) { + this.securityProfile = securityProfile; + return this; + } + + /** + * Get the storageProfile property: Storage profile for the managed cluster. + * + * @return the storageProfile value. + */ + public ManagedClusterStorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile property: Storage profile for the managed cluster. + * + * @param storageProfile the storageProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withStorageProfile(ManagedClusterStorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the publicNetworkAccess property: PublicNetworkAccess of the managedCluster + * + *

Allow or deny public network access for AKS. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: PublicNetworkAccess of the managedCluster + * + *

Allow or deny public network access for AKS. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @return the workloadAutoScalerProfile value. + */ + public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { + return this.workloadAutoScalerProfile; + } + + /** + * Set the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @param workloadAutoScalerProfile the workloadAutoScalerProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withWorkloadAutoScalerProfile( + ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile) { + this.workloadAutoScalerProfile = workloadAutoScalerProfile; + return this; + } + + /** + * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @return the azureMonitorProfile value. + */ + public ManagedClusterAzureMonitorProfile azureMonitorProfile() { + return this.azureMonitorProfile; + } + + /** + * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @param azureMonitorProfile the azureMonitorProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile) { + this.azureMonitorProfile = azureMonitorProfile; + return this; + } + + /** + * Get the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @return the serviceMeshProfile value. + */ + public ServiceMeshProfile serviceMeshProfile() { + return this.serviceMeshProfile; + } + + /** + * Set the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @param serviceMeshProfile the serviceMeshProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile) { + this.serviceMeshProfile = serviceMeshProfile; + return this; + } + + /** + * Get the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds + * (i.e: create, delete, create sequence). + * + * @return the resourceUid value. + */ + public String resourceUid() { + return this.resourceUid; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (powerState() != null) { + powerState().validate(); + } + if (agentPoolProfiles() != null) { + agentPoolProfiles().forEach(e -> e.validate()); + } + if (linuxProfile() != null) { + linuxProfile().validate(); + } + if (windowsProfile() != null) { + windowsProfile().validate(); + } + if (servicePrincipalProfile() != null) { + servicePrincipalProfile().validate(); + } + if (addonProfiles() != null) { + addonProfiles() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (podIdentityProfile() != null) { + podIdentityProfile().validate(); + } + if (oidcIssuerProfile() != null) { + oidcIssuerProfile().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + if (aadProfile() != null) { + aadProfile().validate(); + } + if (autoUpgradeProfile() != null) { + autoUpgradeProfile().validate(); + } + if (upgradeSettings() != null) { + upgradeSettings().validate(); + } + if (autoScalerProfile() != null) { + autoScalerProfile().validate(); + } + if (apiServerAccessProfile() != null) { + apiServerAccessProfile().validate(); + } + if (identityProfile() != null) { + identityProfile() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (privateLinkResources() != null) { + privateLinkResources().forEach(e -> e.validate()); + } + if (httpProxyConfig() != null) { + httpProxyConfig().validate(); + } + if (securityProfile() != null) { + securityProfile().validate(); + } + if (storageProfile() != null) { + storageProfile().validate(); + } + if (workloadAutoScalerProfile() != null) { + workloadAutoScalerProfile().validate(); + } + if (azureMonitorProfile() != null) { + azureMonitorProfile().validate(); + } + if (serviceMeshProfile() != null) { + serviceMeshProfile().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileInner.java new file mode 100644 index 0000000000000..d4aba15037523 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileInner.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available upgrades for compute pools. */ +@Fluent +public final class ManagedClusterUpgradeProfileInner { + /* + * The ID of the upgrade profile. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the upgrade profile. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The type of the upgrade profile. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The properties of the upgrade profile. + */ + @JsonProperty(value = "properties", required = true) + private ManagedClusterUpgradeProfileProperties innerProperties = new ManagedClusterUpgradeProfileProperties(); + + /** Creates an instance of ManagedClusterUpgradeProfileInner class. */ + public ManagedClusterUpgradeProfileInner() { + } + + /** + * Get the id property: The ID of the upgrade profile. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the upgrade profile. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the upgrade profile. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: The properties of the upgrade profile. + * + * @return the innerProperties value. + */ + private ManagedClusterUpgradeProfileProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @return the controlPlaneProfile value. + */ + public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneProfile(); + } + + /** + * Set the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @param controlPlaneProfile the controlPlaneProfile value to set. + * @return the ManagedClusterUpgradeProfileInner object itself. + */ + public ManagedClusterUpgradeProfileInner withControlPlaneProfile( + ManagedClusterPoolUpgradeProfile controlPlaneProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterUpgradeProfileProperties(); + } + this.innerProperties().withControlPlaneProfile(controlPlaneProfile); + return this; + } + + /** + * Get the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); + } + + /** + * Set the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterUpgradeProfileInner object itself. + */ + public ManagedClusterUpgradeProfileInner withAgentPoolProfiles( + List agentPoolProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterUpgradeProfileProperties(); + } + this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model ManagedClusterUpgradeProfileInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpgradeProfileInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileProperties.java new file mode 100644 index 0000000000000..90d263dab62d0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileProperties.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Control plane and agent pool upgrade profiles. */ +@Fluent +public final class ManagedClusterUpgradeProfileProperties { + /* + * The list of available upgrade versions for the control plane. + */ + @JsonProperty(value = "controlPlaneProfile", required = true) + private ManagedClusterPoolUpgradeProfile controlPlaneProfile; + + /* + * The list of available upgrade versions for agent pools. + */ + @JsonProperty(value = "agentPoolProfiles", required = true) + private List agentPoolProfiles; + + /** Creates an instance of ManagedClusterUpgradeProfileProperties class. */ + public ManagedClusterUpgradeProfileProperties() { + } + + /** + * Get the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @return the controlPlaneProfile value. + */ + public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { + return this.controlPlaneProfile; + } + + /** + * Set the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @param controlPlaneProfile the controlPlaneProfile value to set. + * @return the ManagedClusterUpgradeProfileProperties object itself. + */ + public ManagedClusterUpgradeProfileProperties withControlPlaneProfile( + ManagedClusterPoolUpgradeProfile controlPlaneProfile) { + this.controlPlaneProfile = controlPlaneProfile; + return this; + } + + /** + * Get the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterUpgradeProfileProperties object itself. + */ + public ManagedClusterUpgradeProfileProperties withAgentPoolProfiles( + List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (controlPlaneProfile() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property controlPlaneProfile in model" + + " ManagedClusterUpgradeProfileProperties")); + } else { + controlPlaneProfile().validate(); + } + if (agentPoolProfiles() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property agentPoolProfiles in model ManagedClusterUpgradeProfileProperties")); + } else { + agentPoolProfiles().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpgradeProfileProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshRevisionProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshRevisionProfileInner.java new file mode 100644 index 0000000000000..94900012f3ffe --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshRevisionProfileInner.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Mesh revision profile for a mesh. */ +@Fluent +public final class MeshRevisionProfileInner extends ProxyResource { + /* + * Mesh revision profile properties for a mesh + */ + @JsonProperty(value = "properties") + private MeshRevisionProfileProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of MeshRevisionProfileInner class. */ + public MeshRevisionProfileInner() { + } + + /** + * Get the properties property: Mesh revision profile properties for a mesh. + * + * @return the properties value. + */ + public MeshRevisionProfileProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Mesh revision profile properties for a mesh. + * + * @param properties the properties value to set. + * @return the MeshRevisionProfileInner object itself. + */ + public MeshRevisionProfileInner withProperties(MeshRevisionProfileProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshUpgradeProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshUpgradeProfileInner.java new file mode 100644 index 0000000000000..9f55ca52e6114 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshUpgradeProfileInner.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Upgrade profile for given mesh. */ +@Fluent +public final class MeshUpgradeProfileInner extends ProxyResource { + /* + * Mesh upgrade profile properties for a major.minor release. + */ + @JsonProperty(value = "properties") + private MeshUpgradeProfileProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of MeshUpgradeProfileInner class. */ + public MeshUpgradeProfileInner() { + } + + /** + * Get the properties property: Mesh upgrade profile properties for a major.minor release. + * + * @return the properties value. + */ + public MeshUpgradeProfileProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Mesh upgrade profile properties for a major.minor release. + * + * @param properties the properties value to set. + * @return the MeshUpgradeProfileInner object itself. + */ + public MeshUpgradeProfileInner withProperties(MeshUpgradeProfileProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionProfileInner.java new file mode 100644 index 0000000000000..3e69f3e169a4e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionProfileInner.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProperty; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The OS option profile. */ +@Fluent +public final class OSOptionProfileInner { + /* + * The ID of the OS option resource. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the OS option resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The type of the OS option resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The list of OS options. + */ + @JsonProperty(value = "properties", required = true) + private OSOptionPropertyList innerProperties = new OSOptionPropertyList(); + + /** Creates an instance of OSOptionProfileInner class. */ + public OSOptionProfileInner() { + } + + /** + * Get the id property: The ID of the OS option resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the OS option resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the OS option resource. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: The list of OS options. + * + * @return the innerProperties value. + */ + private OSOptionPropertyList innerProperties() { + return this.innerProperties; + } + + /** + * Get the osOptionPropertyList property: The list of OS options. + * + * @return the osOptionPropertyList value. + */ + public List osOptionPropertyList() { + return this.innerProperties() == null ? null : this.innerProperties().osOptionPropertyList(); + } + + /** + * Set the osOptionPropertyList property: The list of OS options. + * + * @param osOptionPropertyList the osOptionPropertyList value to set. + * @return the OSOptionProfileInner object itself. + */ + public OSOptionProfileInner withOsOptionPropertyList(List osOptionPropertyList) { + if (this.innerProperties() == null) { + this.innerProperties = new OSOptionPropertyList(); + } + this.innerProperties().withOsOptionPropertyList(osOptionPropertyList); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model OSOptionProfileInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OSOptionProfileInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionPropertyList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionPropertyList.java new file mode 100644 index 0000000000000..ecc577697cf97 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionPropertyList.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProperty; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of OS option properties. */ +@Fluent +public final class OSOptionPropertyList { + /* + * The list of OS options. + */ + @JsonProperty(value = "osOptionPropertyList", required = true) + private List osOptionPropertyList; + + /** Creates an instance of OSOptionPropertyList class. */ + public OSOptionPropertyList() { + } + + /** + * Get the osOptionPropertyList property: The list of OS options. + * + * @return the osOptionPropertyList value. + */ + public List osOptionPropertyList() { + return this.osOptionPropertyList; + } + + /** + * Set the osOptionPropertyList property: The list of OS options. + * + * @param osOptionPropertyList the osOptionPropertyList value to set. + * @return the OSOptionPropertyList object itself. + */ + public OSOptionPropertyList withOsOptionPropertyList(List osOptionPropertyList) { + this.osOptionPropertyList = osOptionPropertyList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (osOptionPropertyList() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property osOptionPropertyList in model OSOptionPropertyList")); + } else { + osOptionPropertyList().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OSOptionPropertyList.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterInner.java new file mode 100644 index 0000000000000..7e7c1fd9f9b86 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterInner.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PurchasePlan; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** OpenShift Managed cluster. */ +@Fluent +public final class OpenShiftManagedClusterInner extends Resource { + /* + * Define the resource plan as required by ARM for billing purposes + */ + @JsonProperty(value = "plan") + private PurchasePlan plan; + + /* + * Properties of a OpenShift managed cluster. + */ + @JsonProperty(value = "properties") + private OpenShiftManagedClusterProperties innerProperties; + + /** Creates an instance of OpenShiftManagedClusterInner class. */ + public OpenShiftManagedClusterInner() { + } + + /** + * Get the plan property: Define the resource plan as required by ARM for billing purposes. + * + * @return the plan value. + */ + public PurchasePlan plan() { + return this.plan; + } + + /** + * Set the plan property: Define the resource plan as required by ARM for billing purposes. + * + * @param plan the plan value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withPlan(PurchasePlan plan) { + this.plan = plan; + return this; + } + + /** + * Get the innerProperties property: Properties of a OpenShift managed cluster. + * + * @return the innerProperties value. + */ + private OpenShiftManagedClusterProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public OpenShiftManagedClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public OpenShiftManagedClusterInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state, which only appears in the + * response. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the openShiftVersion value. + */ + public String openShiftVersion() { + return this.innerProperties() == null ? null : this.innerProperties().openShiftVersion(); + } + + /** + * Set the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @param openShiftVersion the openShiftVersion value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withOpenShiftVersion(String openShiftVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withOpenShiftVersion(openShiftVersion); + return this; + } + + /** + * Get the clusterVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the clusterVersion value. + */ + public String clusterVersion() { + return this.innerProperties() == null ? null : this.innerProperties().clusterVersion(); + } + + /** + * Get the publicHostname property: Service generated FQDN for OpenShift API server. + * + * @return the publicHostname value. + */ + public String publicHostname() { + return this.innerProperties() == null ? null : this.innerProperties().publicHostname(); + } + + /** + * Get the fqdn property: Service generated FQDN for OpenShift API server loadbalancer internal hostname. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.innerProperties() == null ? null : this.innerProperties().fqdn(); + } + + /** + * Get the networkProfile property: Configuration for OpenShift networking. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + } + + /** + * Set the networkProfile property: Configuration for OpenShift networking. + * + * @param networkProfile the networkProfile value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withNetworkProfile(NetworkProfile networkProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withNetworkProfile(networkProfile); + return this; + } + + /** + * Get the routerProfiles property: Configuration for OpenShift router(s). + * + * @return the routerProfiles value. + */ + public List routerProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().routerProfiles(); + } + + /** + * Set the routerProfiles property: Configuration for OpenShift router(s). + * + * @param routerProfiles the routerProfiles value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withRouterProfiles(List routerProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withRouterProfiles(routerProfiles); + return this; + } + + /** + * Get the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @return the masterPoolProfile value. + */ + public OpenShiftManagedClusterMasterPoolProfile masterPoolProfile() { + return this.innerProperties() == null ? null : this.innerProperties().masterPoolProfile(); + } + + /** + * Set the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @param masterPoolProfile the masterPoolProfile value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withMasterPoolProfile( + OpenShiftManagedClusterMasterPoolProfile masterPoolProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withMasterPoolProfile(masterPoolProfile); + return this; + } + + /** + * Get the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); + } + + /** + * Set the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withAgentPoolProfiles( + List agentPoolProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + /** + * Get the authProfile property: Configures OpenShift authentication. + * + * @return the authProfile value. + */ + public OpenShiftManagedClusterAuthProfile authProfile() { + return this.innerProperties() == null ? null : this.innerProperties().authProfile(); + } + + /** + * Set the authProfile property: Configures OpenShift authentication. + * + * @param authProfile the authProfile value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withAuthProfile(authProfile); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plan() != null) { + plan().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterProperties.java new file mode 100644 index 0000000000000..9412d21b904ab --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterProperties.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of the OpenShift managed cluster. */ +@Fluent +public final class OpenShiftManagedClusterProperties { + /* + * The current deployment or provisioning state, which only appears in the response. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Version of OpenShift specified when creating the cluster. + */ + @JsonProperty(value = "openShiftVersion", required = true) + private String openShiftVersion; + + /* + * Version of OpenShift specified when creating the cluster. + */ + @JsonProperty(value = "clusterVersion", access = JsonProperty.Access.WRITE_ONLY) + private String clusterVersion; + + /* + * Service generated FQDN for OpenShift API server. + */ + @JsonProperty(value = "publicHostname", access = JsonProperty.Access.WRITE_ONLY) + private String publicHostname; + + /* + * Service generated FQDN for OpenShift API server loadbalancer internal hostname. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * Configuration for OpenShift networking. + */ + @JsonProperty(value = "networkProfile") + private NetworkProfile networkProfile; + + /* + * Configuration for OpenShift router(s). + */ + @JsonProperty(value = "routerProfiles") + private List routerProfiles; + + /* + * Configuration for OpenShift master VMs. + */ + @JsonProperty(value = "masterPoolProfile") + private OpenShiftManagedClusterMasterPoolProfile masterPoolProfile; + + /* + * Configuration of OpenShift cluster VMs. + */ + @JsonProperty(value = "agentPoolProfiles") + private List agentPoolProfiles; + + /* + * Configures OpenShift authentication. + */ + @JsonProperty(value = "authProfile") + private OpenShiftManagedClusterAuthProfile authProfile; + + /** Creates an instance of OpenShiftManagedClusterProperties class. */ + public OpenShiftManagedClusterProperties() { + } + + /** + * Get the provisioningState property: The current deployment or provisioning state, which only appears in the + * response. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the openShiftVersion value. + */ + public String openShiftVersion() { + return this.openShiftVersion; + } + + /** + * Set the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @param openShiftVersion the openShiftVersion value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withOpenShiftVersion(String openShiftVersion) { + this.openShiftVersion = openShiftVersion; + return this; + } + + /** + * Get the clusterVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the clusterVersion value. + */ + public String clusterVersion() { + return this.clusterVersion; + } + + /** + * Get the publicHostname property: Service generated FQDN for OpenShift API server. + * + * @return the publicHostname value. + */ + public String publicHostname() { + return this.publicHostname; + } + + /** + * Get the fqdn property: Service generated FQDN for OpenShift API server loadbalancer internal hostname. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the networkProfile property: Configuration for OpenShift networking. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Configuration for OpenShift networking. + * + * @param networkProfile the networkProfile value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the routerProfiles property: Configuration for OpenShift router(s). + * + * @return the routerProfiles value. + */ + public List routerProfiles() { + return this.routerProfiles; + } + + /** + * Set the routerProfiles property: Configuration for OpenShift router(s). + * + * @param routerProfiles the routerProfiles value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withRouterProfiles(List routerProfiles) { + this.routerProfiles = routerProfiles; + return this; + } + + /** + * Get the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @return the masterPoolProfile value. + */ + public OpenShiftManagedClusterMasterPoolProfile masterPoolProfile() { + return this.masterPoolProfile; + } + + /** + * Set the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @param masterPoolProfile the masterPoolProfile value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withMasterPoolProfile( + OpenShiftManagedClusterMasterPoolProfile masterPoolProfile) { + this.masterPoolProfile = masterPoolProfile; + return this; + } + + /** + * Get the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withAgentPoolProfiles( + List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get the authProfile property: Configures OpenShift authentication. + * + * @return the authProfile value. + */ + public OpenShiftManagedClusterAuthProfile authProfile() { + return this.authProfile; + } + + /** + * Set the authProfile property: Configures OpenShift authentication. + * + * @param authProfile the authProfile value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile) { + this.authProfile = authProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (openShiftVersion() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property openShiftVersion in model OpenShiftManagedClusterProperties")); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + if (routerProfiles() != null) { + routerProfiles().forEach(e -> e.validate()); + } + if (masterPoolProfile() != null) { + masterPoolProfile().validate(); + } + if (agentPoolProfiles() != null) { + agentPoolProfiles().forEach(e -> e.validate()); + } + if (authProfile() != null) { + authProfile().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OpenShiftManagedClusterProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueDisplay.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueDisplay.java new file mode 100644 index 0000000000000..d281f410332c5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueDisplay.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the properties of a Operation Value Display. */ +@Immutable +public final class OperationValueDisplay { + /* + * The display name of the operation. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The display name of the resource the operation applies to. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The description of the operation. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * The resource provider for the operation. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** Creates an instance of OperationValueDisplay class. */ + public OperationValueDisplay() { + } + + /** + * Get the operation property: The display name of the operation. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the resource property: The display name of the resource the operation applies to. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the description property: The description of the operation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the provider property: The resource provider for the operation. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueInner.java new file mode 100644 index 0000000000000..865c8d71cf46e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueInner.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the properties of a Operation value. */ +@Immutable +public final class OperationValueInner { + /* + * The origin of the operation. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private String origin; + + /* + * The name of the operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Describes the properties of a Operation Value Display. + */ + @JsonProperty(value = "display") + private OperationValueDisplay innerDisplay; + + /** Creates an instance of OperationValueInner class. */ + public OperationValueInner() { + } + + /** + * Get the origin property: The origin of the operation. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Get the name property: The name of the operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the innerDisplay property: Describes the properties of a Operation Value Display. + * + * @return the innerDisplay value. + */ + private OperationValueDisplay innerDisplay() { + return this.innerDisplay; + } + + /** + * Get the operation property: The display name of the operation. + * + * @return the operation value. + */ + public String operation() { + return this.innerDisplay() == null ? null : this.innerDisplay().operation(); + } + + /** + * Get the resource property: The display name of the resource the operation applies to. + * + * @return the resource value. + */ + public String resource() { + return this.innerDisplay() == null ? null : this.innerDisplay().resource(); + } + + /** + * Get the description property: The description of the operation. + * + * @return the description value. + */ + public String description() { + return this.innerDisplay() == null ? null : this.innerDisplay().description(); + } + + /** + * Get the provider property: The resource provider for the operation. + * + * @return the provider value. + */ + public String provider() { + return this.innerDisplay() == null ? null : this.innerDisplay().provider(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerDisplay() != null) { + innerDisplay().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileListResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileListResultInner.java new file mode 100644 index 0000000000000..3d2dbf2b32b1e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileListResultInner.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of versions for supported orchestrators. */ +@Fluent +public final class OrchestratorVersionProfileListResultInner { + /* + * Id of the orchestrator version profile list result. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Name of the orchestrator version profile list result. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Type of the orchestrator version profile list result. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The properties of an orchestrator version profile. + */ + @JsonProperty(value = "properties", required = true) + private OrchestratorVersionProfileProperties innerProperties = new OrchestratorVersionProfileProperties(); + + /** Creates an instance of OrchestratorVersionProfileListResultInner class. */ + public OrchestratorVersionProfileListResultInner() { + } + + /** + * Get the id property: Id of the orchestrator version profile list result. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the orchestrator version profile list result. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Type of the orchestrator version profile list result. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: The properties of an orchestrator version profile. + * + * @return the innerProperties value. + */ + private OrchestratorVersionProfileProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the orchestrators property: List of orchestrator version profiles. + * + * @return the orchestrators value. + */ + public List orchestrators() { + return this.innerProperties() == null ? null : this.innerProperties().orchestrators(); + } + + /** + * Set the orchestrators property: List of orchestrator version profiles. + * + * @param orchestrators the orchestrators value to set. + * @return the OrchestratorVersionProfileListResultInner object itself. + */ + public OrchestratorVersionProfileListResultInner withOrchestrators(List orchestrators) { + if (this.innerProperties() == null) { + this.innerProperties = new OrchestratorVersionProfileProperties(); + } + this.innerProperties().withOrchestrators(orchestrators); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model" + + " OrchestratorVersionProfileListResultInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileListResultInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileProperties.java new file mode 100644 index 0000000000000..2a6d7d0307a0e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileProperties.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The properties of an orchestrator version profile. */ +@Fluent +public final class OrchestratorVersionProfileProperties { + /* + * List of orchestrator version profiles. + */ + @JsonProperty(value = "orchestrators", required = true) + private List orchestrators; + + /** Creates an instance of OrchestratorVersionProfileProperties class. */ + public OrchestratorVersionProfileProperties() { + } + + /** + * Get the orchestrators property: List of orchestrator version profiles. + * + * @return the orchestrators value. + */ + public List orchestrators() { + return this.orchestrators; + } + + /** + * Set the orchestrators property: List of orchestrator version profiles. + * + * @param orchestrators the orchestrators value to set. + * @return the OrchestratorVersionProfileProperties object itself. + */ + public OrchestratorVersionProfileProperties withOrchestrators(List orchestrators) { + this.orchestrators = orchestrators; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (orchestrators() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property orchestrators in model OrchestratorVersionProfileProperties")); + } else { + orchestrators().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OutboundEnvironmentEndpointInner.java new file mode 100644 index 0000000000000..7ae8f1b369763 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OutboundEnvironmentEndpointInner.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EndpointDependency; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Egress endpoints which AKS agent nodes connect to for common purpose. */ +@Fluent +public final class OutboundEnvironmentEndpointInner { + /* + * The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. + */ + @JsonProperty(value = "category") + private String category; + + /* + * The endpoints that AKS agent nodes connect to + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /** Creates an instance of OutboundEnvironmentEndpointInner class. */ + public OutboundEnvironmentEndpointInner() { + } + + /** + * Get the category property: The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + * + * @param category the category value to set. + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the endpoints property: The endpoints that AKS agent nodes connect to. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The endpoints that AKS agent nodes connect to. + * + * @param endpoints the endpoints value to set. + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 0000000000000..1d54feb4b892b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A private endpoint connection. */ +@Fluent +public final class PrivateEndpointConnectionInner extends ProxyResource { + /* + * The properties of a private endpoint connection. + */ + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; + + /** Creates an instance of PrivateEndpointConnectionInner class. */ + public PrivateEndpointConnectionInner() { + } + + /** + * Get the innerProperties property: The properties of a private endpoint connection. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the privateEndpoint property: The resource of private endpoint. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: The resource of private endpoint. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionListResultInner.java new file mode 100644 index 0000000000000..afa38dfbc4a16 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionListResultInner.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of private endpoint connections. */ +@Fluent +public final class PrivateEndpointConnectionListResultInner { + /* + * The collection value. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of PrivateEndpointConnectionListResultInner class. */ + public PrivateEndpointConnectionListResultInner() { + } + + /** + * Get the value property: The collection value. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The collection value. + * + * @param value the value value to set. + * @return the PrivateEndpointConnectionListResultInner object itself. + */ + public PrivateEndpointConnectionListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 0000000000000..b48f752616b32 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a private endpoint connection. */ +@Fluent +public final class PrivateEndpointConnectionProperties { + /* + * The current provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /* + * The resource of private endpoint. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + @JsonProperty(value = "privateLinkServiceConnectionState", required = true) + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** Creates an instance of PrivateEndpointConnectionProperties class. */ + public PrivateEndpointConnectionProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpoint property: The resource of private endpoint. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private endpoint. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model" + + " PrivateEndpointConnectionProperties")); + } else { + privateLinkServiceConnectionState().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourceInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 0000000000000..3a15c8015865e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A private link resource. */ +@Fluent +public final class PrivateLinkResourceInner { + /* + * The ID of the private link resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The name of the private link resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The resource type. + */ + @JsonProperty(value = "type") + private String type; + + /* + * The group ID of the resource. + */ + @JsonProperty(value = "groupId") + private String groupId; + + /* + * The RequiredMembers of the resource + */ + @JsonProperty(value = "requiredMembers") + private List requiredMembers; + + /* + * The private link service ID of the resource, this field is exposed only to NRP internally. + */ + @JsonProperty(value = "privateLinkServiceID", access = JsonProperty.Access.WRITE_ONLY) + private String privateLinkServiceId; + + /** Creates an instance of PrivateLinkResourceInner class. */ + public PrivateLinkResourceInner() { + } + + /** + * Get the id property: The ID of the private link resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The ID of the private link resource. + * + * @param id the id value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The name of the private link resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the private link resource. + * + * @param name the name value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The resource type. + * + * @param type the type value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the groupId property: The group ID of the resource. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the groupId property: The group ID of the resource. + * + * @param groupId the groupId value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the requiredMembers property: The RequiredMembers of the resource. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Set the requiredMembers property: The RequiredMembers of the resource. + * + * @param requiredMembers the requiredMembers value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { + this.requiredMembers = requiredMembers; + return this; + } + + /** + * Get the privateLinkServiceId property: The private link service ID of the resource, this field is exposed only to + * NRP internally. + * + * @return the privateLinkServiceId value. + */ + public String privateLinkServiceId() { + return this.privateLinkServiceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourcesListResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourcesListResultInner.java new file mode 100644 index 0000000000000..2cef25f748fd8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourcesListResultInner.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of private link resources. */ +@Fluent +public final class PrivateLinkResourcesListResultInner { + /* + * The collection value. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of PrivateLinkResourcesListResultInner class. */ + public PrivateLinkResourcesListResultInner() { + } + + /** + * Get the value property: The collection value. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The collection value. + * + * @param value the value value to set. + * @return the PrivateLinkResourcesListResultInner object itself. + */ + public PrivateLinkResourcesListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/RunCommandResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/RunCommandResultInner.java new file mode 100644 index 0000000000000..fa67ff3175609 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/RunCommandResultInner.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** run command result. */ +@Immutable +public final class RunCommandResultInner { + /* + * The command id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Properties of command result. + */ + @JsonProperty(value = "properties") + private CommandResultProperties innerProperties; + + /** Creates an instance of RunCommandResultInner class. */ + public RunCommandResultInner() { + } + + /** + * Get the id property: The command id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the innerProperties property: Properties of command result. + * + * @return the innerProperties value. + */ + private CommandResultProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the provisioningState property: provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the exitCode property: The exit code of the command. + * + * @return the exitCode value. + */ + public Integer exitCode() { + return this.innerProperties() == null ? null : this.innerProperties().exitCode(); + } + + /** + * Get the startedAt property: The time when the command started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.innerProperties() == null ? null : this.innerProperties().startedAt(); + } + + /** + * Get the finishedAt property: The time when the command finished. + * + * @return the finishedAt value. + */ + public OffsetDateTime finishedAt() { + return this.innerProperties() == null ? null : this.innerProperties().finishedAt(); + } + + /** + * Get the logs property: The command output. + * + * @return the logs value. + */ + public String logs() { + return this.innerProperties() == null ? null : this.innerProperties().logs(); + } + + /** + * Get the reason property: An explanation of why provisioningState is set to failed (if so). + * + * @return the reason value. + */ + public String reason() { + return this.innerProperties() == null ? null : this.innerProperties().reason(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotInner.java new file mode 100644 index 0000000000000..986632f58218b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotInner.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A node pool snapshot resource. */ +@Fluent +public final class SnapshotInner extends Resource { + /* + * Properties of a snapshot. + */ + @JsonProperty(value = "properties") + private SnapshotProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of SnapshotInner class. */ + public SnapshotInner() { + } + + /** + * Get the innerProperties property: Properties of a snapshot. + * + * @return the innerProperties value. + */ + private SnapshotProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public SnapshotInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public SnapshotInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @param creationData the creationData value to set. + * @return the SnapshotInner object itself. + */ + public SnapshotInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the SnapshotInner object itself. + */ + public SnapshotInner withSnapshotType(SnapshotType snapshotType) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotProperties(); + } + this.innerProperties().withSnapshotType(snapshotType); + return this; + } + + /** + * Get the kubernetesVersion property: The version of Kubernetes. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.innerProperties() == null ? null : this.innerProperties().nodeImageVersion(); + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.innerProperties() == null ? null : this.innerProperties().osType(); + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + public Ossku osSku() { + return this.innerProperties() == null ? null : this.innerProperties().osSku(); + } + + /** + * Get the vmSize property: The size of the VM. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.innerProperties() == null ? null : this.innerProperties().vmSize(); + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.innerProperties() == null ? null : this.innerProperties().enableFips(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotProperties.java new file mode 100644 index 0000000000000..1a1a0d46c5497 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotProperties.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties used to configure a node pool snapshot. */ +@Fluent +public final class SnapshotProperties { + /* + * CreationData to be used to specify the source agent pool resource ID to create this snapshot. + */ + @JsonProperty(value = "creationData") + private CreationData creationData; + + /* + * The type of a snapshot. The default is NodePool. + */ + @JsonProperty(value = "snapshotType") + private SnapshotType snapshotType; + + /* + * The version of Kubernetes. + */ + @JsonProperty(value = "kubernetesVersion", access = JsonProperty.Access.WRITE_ONLY) + private String kubernetesVersion; + + /* + * The version of node image. + */ + @JsonProperty(value = "nodeImageVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeImageVersion; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType", access = JsonProperty.Access.WRITE_ONLY) + private OSType osType; + + /* + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is + * Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + */ + @JsonProperty(value = "osSku", access = JsonProperty.Access.WRITE_ONLY) + private Ossku osSku; + + /* + * The size of the VM. + */ + @JsonProperty(value = "vmSize", access = JsonProperty.Access.WRITE_ONLY) + private String vmSize; + + /* + * Whether to use a FIPS-enabled OS. + */ + @JsonProperty(value = "enableFIPS", access = JsonProperty.Access.WRITE_ONLY) + private Boolean enableFips; + + /** Creates an instance of SnapshotProperties class. */ + public SnapshotProperties() { + } + + /** + * Get the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @param creationData the creationData value to set. + * @return the SnapshotProperties object itself. + */ + public SnapshotProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.snapshotType; + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the SnapshotProperties object itself. + */ + public SnapshotProperties withSnapshotType(SnapshotType snapshotType) { + this.snapshotType = snapshotType; + return this; + } + + /** + * Get the kubernetesVersion property: The version of Kubernetes. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + public Ossku osSku() { + return this.osSku; + } + + /** + * Get the vmSize property: The size of the VM. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (creationData() != null) { + creationData().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingInner.java new file mode 100644 index 0000000000000..6c85ca6cd189b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingInner.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines binding between a resource and role. */ +@Fluent +public final class TrustedAccessRoleBindingInner extends ProxyResource { + /* + * Properties for trusted access role binding + */ + @JsonProperty(value = "properties", required = true) + private TrustedAccessRoleBindingProperties innerProperties = new TrustedAccessRoleBindingProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of TrustedAccessRoleBindingInner class. */ + public TrustedAccessRoleBindingInner() { + } + + /** + * Get the innerProperties property: Properties for trusted access role binding. + * + * @return the innerProperties value. + */ + private TrustedAccessRoleBindingProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The current provisioning state of trusted access role binding. + * + * @return the provisioningState value. + */ + public TrustedAccessRoleBindingProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @return the sourceResourceId value. + */ + public String sourceResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().sourceResourceId(); + } + + /** + * Set the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @param sourceResourceId the sourceResourceId value to set. + * @return the TrustedAccessRoleBindingInner object itself. + */ + public TrustedAccessRoleBindingInner withSourceResourceId(String sourceResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new TrustedAccessRoleBindingProperties(); + } + this.innerProperties().withSourceResourceId(sourceResourceId); + return this; + } + + /** + * Get the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @return the roles value. + */ + public List roles() { + return this.innerProperties() == null ? null : this.innerProperties().roles(); + } + + /** + * Set the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @param roles the roles value to set. + * @return the TrustedAccessRoleBindingInner object itself. + */ + public TrustedAccessRoleBindingInner withRoles(List roles) { + if (this.innerProperties() == null) { + this.innerProperties = new TrustedAccessRoleBindingProperties(); + } + this.innerProperties().withRoles(roles); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model TrustedAccessRoleBindingInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingProperties.java new file mode 100644 index 0000000000000..473793a331d3a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingProperties.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties for trusted access role binding. */ +@Fluent +public final class TrustedAccessRoleBindingProperties { + /* + * The current provisioning state of trusted access role binding. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private TrustedAccessRoleBindingProvisioningState provisioningState; + + /* + * The ARM resource ID of source resource that trusted access is configured for. + */ + @JsonProperty(value = "sourceResourceId", required = true) + private String sourceResourceId; + + /* + * A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + */ + @JsonProperty(value = "roles", required = true) + private List roles; + + /** Creates an instance of TrustedAccessRoleBindingProperties class. */ + public TrustedAccessRoleBindingProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of trusted access role binding. + * + * @return the provisioningState value. + */ + public TrustedAccessRoleBindingProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @return the sourceResourceId value. + */ + public String sourceResourceId() { + return this.sourceResourceId; + } + + /** + * Set the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @param sourceResourceId the sourceResourceId value to set. + * @return the TrustedAccessRoleBindingProperties object itself. + */ + public TrustedAccessRoleBindingProperties withSourceResourceId(String sourceResourceId) { + this.sourceResourceId = sourceResourceId; + return this; + } + + /** + * Get the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @return the roles value. + */ + public List roles() { + return this.roles; + } + + /** + * Set the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @param roles the roles value to set. + * @return the TrustedAccessRoleBindingProperties object itself. + */ + public TrustedAccessRoleBindingProperties withRoles(List roles) { + this.roles = roles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceResourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceResourceId in model TrustedAccessRoleBindingProperties")); + } + if (roles() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property roles in model TrustedAccessRoleBindingProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleInner.java new file mode 100644 index 0000000000000..e99aa1d88f6de --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleRule; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Trusted access role definition. */ +@Immutable +public final class TrustedAccessRoleInner { + /* + * Resource type of Azure resource + */ + @JsonProperty(value = "sourceResourceType", access = JsonProperty.Access.WRITE_ONLY) + private String sourceResourceType; + + /* + * Name of role, name is unique under a source resource type + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster + * Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). + */ + @JsonProperty(value = "rules", access = JsonProperty.Access.WRITE_ONLY) + private List rules; + + /** Creates an instance of TrustedAccessRoleInner class. */ + public TrustedAccessRoleInner() { + } + + /** + * Get the sourceResourceType property: Resource type of Azure resource. + * + * @return the sourceResourceType value. + */ + public String sourceResourceType() { + return this.sourceResourceType; + } + + /** + * Get the name property: Name of role, name is unique under a source resource type. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the rules property: List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster + * Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/package-info.java new file mode 100644 index 0000000000000..d25db3c4dbcee --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the inner data models for ContainerServiceManagementClient. Container Service Client. */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/package-info.java new file mode 100644 index 0000000000000..d13321a16b166 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the service clients for ContainerServiceManagementClient. Container Service Client. */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolAvailableVersionsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolAvailableVersionsImpl.java new file mode 100644 index 0000000000000..4417e0ae55f1b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolAvailableVersionsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersions; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import java.util.Collections; +import java.util.List; + +public final class AgentPoolAvailableVersionsImpl implements AgentPoolAvailableVersions { + private AgentPoolAvailableVersionsInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + AgentPoolAvailableVersionsImpl( + AgentPoolAvailableVersionsInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public List agentPoolVersions() { + List inner = this.innerModel().agentPoolVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AgentPoolAvailableVersionsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolImpl.java new file mode 100644 index 0000000000000..40c53d5c4b10a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolImpl.java @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPool; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class AgentPoolImpl implements AgentPool, AgentPool.Definition, AgentPool.Update { + private AgentPoolInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public Integer count() { + return this.innerModel().count(); + } + + public String vmSize() { + return this.innerModel().vmSize(); + } + + public Integer osDiskSizeGB() { + return this.innerModel().osDiskSizeGB(); + } + + public OSDiskType osDiskType() { + return this.innerModel().osDiskType(); + } + + public KubeletDiskType kubeletDiskType() { + return this.innerModel().kubeletDiskType(); + } + + public WorkloadRuntime workloadRuntime() { + return this.innerModel().workloadRuntime(); + } + + public String vnetSubnetId() { + return this.innerModel().vnetSubnetId(); + } + + public String podSubnetId() { + return this.innerModel().podSubnetId(); + } + + public Integer maxPods() { + return this.innerModel().maxPods(); + } + + public OSType osType() { + return this.innerModel().osType(); + } + + public Ossku osSku() { + return this.innerModel().osSku(); + } + + public Integer maxCount() { + return this.innerModel().maxCount(); + } + + public Integer minCount() { + return this.innerModel().minCount(); + } + + public Boolean enableAutoScaling() { + return this.innerModel().enableAutoScaling(); + } + + public ScaleDownMode scaleDownMode() { + return this.innerModel().scaleDownMode(); + } + + public AgentPoolType typePropertiesType() { + return this.innerModel().typePropertiesType(); + } + + public AgentPoolMode mode() { + return this.innerModel().mode(); + } + + public String orchestratorVersion() { + return this.innerModel().orchestratorVersion(); + } + + public String currentOrchestratorVersion() { + return this.innerModel().currentOrchestratorVersion(); + } + + public String nodeImageVersion() { + return this.innerModel().nodeImageVersion(); + } + + public AgentPoolUpgradeSettings upgradeSettings() { + return this.innerModel().upgradeSettings(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public PowerState powerState() { + return this.innerModel().powerState(); + } + + public List availabilityZones() { + List inner = this.innerModel().availabilityZones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean enableNodePublicIp() { + return this.innerModel().enableNodePublicIp(); + } + + public String nodePublicIpPrefixId() { + return this.innerModel().nodePublicIpPrefixId(); + } + + public ScaleSetPriority scaleSetPriority() { + return this.innerModel().scaleSetPriority(); + } + + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.innerModel().scaleSetEvictionPolicy(); + } + + public Float spotMaxPrice() { + return this.innerModel().spotMaxPrice(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map nodeLabels() { + Map inner = this.innerModel().nodeLabels(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public List nodeTaints() { + List inner = this.innerModel().nodeTaints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String proximityPlacementGroupId() { + return this.innerModel().proximityPlacementGroupId(); + } + + public KubeletConfig kubeletConfig() { + return this.innerModel().kubeletConfig(); + } + + public LinuxOSConfig linuxOSConfig() { + return this.innerModel().linuxOSConfig(); + } + + public Boolean enableEncryptionAtHost() { + return this.innerModel().enableEncryptionAtHost(); + } + + public Boolean enableUltraSsd() { + return this.innerModel().enableUltraSsd(); + } + + public Boolean enableFips() { + return this.innerModel().enableFips(); + } + + public GpuInstanceProfile gpuInstanceProfile() { + return this.innerModel().gpuInstanceProfile(); + } + + public CreationData creationData() { + return this.innerModel().creationData(); + } + + public String hostGroupId() { + return this.innerModel().hostGroupId(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AgentPoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String agentPoolName; + + public AgentPoolImpl withExistingManagedCluster(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public AgentPool create() { + this.innerObject = + serviceManager + .serviceClient() + .getAgentPools() + .createOrUpdate(resourceGroupName, resourceName, agentPoolName, this.innerModel(), Context.NONE); + return this; + } + + public AgentPool create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAgentPools() + .createOrUpdate(resourceGroupName, resourceName, agentPoolName, this.innerModel(), context); + return this; + } + + AgentPoolImpl( + String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = new AgentPoolInner(); + this.serviceManager = serviceManager; + this.agentPoolName = name; + } + + public AgentPoolImpl update() { + return this; + } + + public AgentPool apply() { + this.innerObject = + serviceManager + .serviceClient() + .getAgentPools() + .createOrUpdate(resourceGroupName, resourceName, agentPoolName, this.innerModel(), Context.NONE); + return this; + } + + public AgentPool apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAgentPools() + .createOrUpdate(resourceGroupName, resourceName, agentPoolName, this.innerModel(), context); + return this; + } + + AgentPoolImpl( + AgentPoolInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedClusters"); + this.agentPoolName = Utils.getValueFromIdByName(innerObject.id(), "agentPools"); + } + + public AgentPool refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getAgentPools() + .getWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE) + .getValue(); + return this; + } + + public AgentPool refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAgentPools() + .getWithResponse(resourceGroupName, resourceName, agentPoolName, context) + .getValue(); + return this; + } + + public AgentPool upgradeNodeImageVersion() { + return serviceManager.agentPools().upgradeNodeImageVersion(resourceGroupName, resourceName, agentPoolName); + } + + public AgentPool upgradeNodeImageVersion(Context context) { + return serviceManager + .agentPools() + .upgradeNodeImageVersion(resourceGroupName, resourceName, agentPoolName, context); + } + + public AgentPoolImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public AgentPoolImpl withCount(Integer count) { + this.innerModel().withCount(count); + return this; + } + + public AgentPoolImpl withVmSize(String vmSize) { + this.innerModel().withVmSize(vmSize); + return this; + } + + public AgentPoolImpl withOsDiskSizeGB(Integer osDiskSizeGB) { + this.innerModel().withOsDiskSizeGB(osDiskSizeGB); + return this; + } + + public AgentPoolImpl withOsDiskType(OSDiskType osDiskType) { + this.innerModel().withOsDiskType(osDiskType); + return this; + } + + public AgentPoolImpl withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.innerModel().withKubeletDiskType(kubeletDiskType); + return this; + } + + public AgentPoolImpl withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + this.innerModel().withWorkloadRuntime(workloadRuntime); + return this; + } + + public AgentPoolImpl withVnetSubnetId(String vnetSubnetId) { + this.innerModel().withVnetSubnetId(vnetSubnetId); + return this; + } + + public AgentPoolImpl withPodSubnetId(String podSubnetId) { + this.innerModel().withPodSubnetId(podSubnetId); + return this; + } + + public AgentPoolImpl withMaxPods(Integer maxPods) { + this.innerModel().withMaxPods(maxPods); + return this; + } + + public AgentPoolImpl withOsType(OSType osType) { + this.innerModel().withOsType(osType); + return this; + } + + public AgentPoolImpl withOsSku(Ossku osSku) { + this.innerModel().withOsSku(osSku); + return this; + } + + public AgentPoolImpl withMaxCount(Integer maxCount) { + this.innerModel().withMaxCount(maxCount); + return this; + } + + public AgentPoolImpl withMinCount(Integer minCount) { + this.innerModel().withMinCount(minCount); + return this; + } + + public AgentPoolImpl withEnableAutoScaling(Boolean enableAutoScaling) { + this.innerModel().withEnableAutoScaling(enableAutoScaling); + return this; + } + + public AgentPoolImpl withScaleDownMode(ScaleDownMode scaleDownMode) { + this.innerModel().withScaleDownMode(scaleDownMode); + return this; + } + + public AgentPoolImpl withTypePropertiesType(AgentPoolType typePropertiesType) { + this.innerModel().withTypePropertiesType(typePropertiesType); + return this; + } + + public AgentPoolImpl withMode(AgentPoolMode mode) { + this.innerModel().withMode(mode); + return this; + } + + public AgentPoolImpl withOrchestratorVersion(String orchestratorVersion) { + this.innerModel().withOrchestratorVersion(orchestratorVersion); + return this; + } + + public AgentPoolImpl withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + this.innerModel().withUpgradeSettings(upgradeSettings); + return this; + } + + public AgentPoolImpl withPowerState(PowerState powerState) { + this.innerModel().withPowerState(powerState); + return this; + } + + public AgentPoolImpl withAvailabilityZones(List availabilityZones) { + this.innerModel().withAvailabilityZones(availabilityZones); + return this; + } + + public AgentPoolImpl withEnableNodePublicIp(Boolean enableNodePublicIp) { + this.innerModel().withEnableNodePublicIp(enableNodePublicIp); + return this; + } + + public AgentPoolImpl withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + this.innerModel().withNodePublicIpPrefixId(nodePublicIpPrefixId); + return this; + } + + public AgentPoolImpl withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + this.innerModel().withScaleSetPriority(scaleSetPriority); + return this; + } + + public AgentPoolImpl withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + this.innerModel().withScaleSetEvictionPolicy(scaleSetEvictionPolicy); + return this; + } + + public AgentPoolImpl withSpotMaxPrice(Float spotMaxPrice) { + this.innerModel().withSpotMaxPrice(spotMaxPrice); + return this; + } + + public AgentPoolImpl withNodeLabels(Map nodeLabels) { + this.innerModel().withNodeLabels(nodeLabels); + return this; + } + + public AgentPoolImpl withNodeTaints(List nodeTaints) { + this.innerModel().withNodeTaints(nodeTaints); + return this; + } + + public AgentPoolImpl withProximityPlacementGroupId(String proximityPlacementGroupId) { + this.innerModel().withProximityPlacementGroupId(proximityPlacementGroupId); + return this; + } + + public AgentPoolImpl withKubeletConfig(KubeletConfig kubeletConfig) { + this.innerModel().withKubeletConfig(kubeletConfig); + return this; + } + + public AgentPoolImpl withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + this.innerModel().withLinuxOSConfig(linuxOSConfig); + return this; + } + + public AgentPoolImpl withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + this.innerModel().withEnableEncryptionAtHost(enableEncryptionAtHost); + return this; + } + + public AgentPoolImpl withEnableUltraSsd(Boolean enableUltraSsd) { + this.innerModel().withEnableUltraSsd(enableUltraSsd); + return this; + } + + public AgentPoolImpl withEnableFips(Boolean enableFips) { + this.innerModel().withEnableFips(enableFips); + return this; + } + + public AgentPoolImpl withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.innerModel().withGpuInstanceProfile(gpuInstanceProfile); + return this; + } + + public AgentPoolImpl withCreationData(CreationData creationData) { + this.innerModel().withCreationData(creationData); + return this; + } + + public AgentPoolImpl withHostGroupId(String hostGroupId) { + this.innerModel().withHostGroupId(hostGroupId); + return this; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolUpgradeProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolUpgradeProfileImpl.java new file mode 100644 index 0000000000000..bfef0e881be1b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolUpgradeProfileImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import java.util.Collections; +import java.util.List; + +public final class AgentPoolUpgradeProfileImpl implements AgentPoolUpgradeProfile { + private AgentPoolUpgradeProfileInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + AgentPoolUpgradeProfileImpl( + AgentPoolUpgradeProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kubernetesVersion() { + return this.innerModel().kubernetesVersion(); + } + + public OSType osType() { + return this.innerModel().osType(); + } + + public List upgrades() { + List inner = this.innerModel().upgrades(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String latestNodeImageVersion() { + return this.innerModel().latestNodeImageVersion(); + } + + public AgentPoolUpgradeProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsClientImpl.java new file mode 100644 index 0000000000000..422dea87472a0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsClientImpl.java @@ -0,0 +1,2106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AgentPoolsClient. */ +public final class AgentPoolsClientImpl implements AgentPoolsClient { + /** The proxy service used to perform REST calls. */ + private final AgentPoolsService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of AgentPoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AgentPoolsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy.create(AgentPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientAgentPools to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface AgentPoolsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> abortLatestOperation( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, + @BodyParam("application/json") AgentPoolInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getUpgradeProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAvailableAgentPoolVersions( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> upgradeNodeImageVersion( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> abortLatestOperationWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .abortLatestOperation( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> abortLatestOperationWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .abortLatestOperation( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> beginAbortLatestOperationAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + Mono>> mono = + abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, agentPoolName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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> beginAbortLatestOperationAsync( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation( + String resourceGroupName, String resourceName, String agentPoolName) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return this + .beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context) + .getSyncPoller(); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 abortLatestOperationAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 abortLatestOperationAsync( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName) { + abortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortLatestOperation( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + abortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + 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())); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 specified managed cluster agent pool along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 specified managed cluster agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 specified managed cluster agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName) { + return getWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + parameters, + accept, + context); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AgentPoolInner.class, + AgentPoolInner.class, + this.client.getContext()); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), AgentPoolInner.class, AgentPoolInner.class, context); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginCreateOrUpdate( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner createOrUpdate( + String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters).block(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner createOrUpdate( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, context).block(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resourceName, String agentPoolName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 resourceName, String agentPoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String agentPoolName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, context).getSyncPoller(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resourceName, String agentPoolName) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 resourceName, String agentPoolName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String agentPoolName) { + deleteAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String agentPoolName, Context context) { + deleteAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 upgrade profile for an agent pool along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getUpgradeProfileWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getUpgradeProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getUpgradeProfileWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getUpgradeProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 upgrade profile for an agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getUpgradeProfileAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 upgrade profile for an agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolUpgradeProfileInner getUpgradeProfile( + String resourceGroupName, String resourceName, String agentPoolName) { + return getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list of available versions for an agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableAgentPoolVersionsWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getAvailableAgentPoolVersions( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableAgentPoolVersionsWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getAvailableAgentPoolVersions( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list of available versions for an agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAvailableAgentPoolVersionsAsync( + String resourceGroupName, String resourceName) { + return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAvailableAgentPoolVersionsWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list of available versions for an agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions( + String resourceGroupName, String resourceName) { + return getAvailableAgentPoolVersionsWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeNodeImageVersionWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .upgradeNodeImageVersion( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeNodeImageVersionWithResponseAsync( + String resourceGroupName, String resourceName, String agentPoolName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .upgradeNodeImageVersion( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, AgentPoolInner> beginUpgradeNodeImageVersionAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + Mono>> mono = + upgradeNodeImageVersionWithResponseAsync(resourceGroupName, resourceName, agentPoolName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AgentPoolInner.class, + AgentPoolInner.class, + this.client.getContext()); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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, AgentPoolInner> beginUpgradeNodeImageVersionAsync( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + upgradeNodeImageVersionWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), AgentPoolInner.class, AgentPoolInner.class, context); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName) { + return this.beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return this + .beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context) + .getSyncPoller(); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeNodeImageVersionAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeNodeImageVersionAsync( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { + return upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner upgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Agent Pools operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Agent Pools operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsImpl.java new file mode 100644 index 0000000000000..1d41fa65fd43e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsImpl.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPool; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersions; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPools; + +public final class AgentPoolsImpl implements AgentPools { + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolsImpl.class); + + private final AgentPoolsClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public AgentPoolsImpl( + AgentPoolsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName) { + this.serviceClient().abortLatestOperation(resourceGroupName, resourceName, agentPoolName); + } + + public void abortLatestOperation( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + this.serviceClient().abortLatestOperation(resourceGroupName, resourceName, agentPoolName, context); + } + + public PagedIterable list(String resourceGroupName, String resourceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, resourceName, agentPoolName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AgentPoolImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AgentPool get(String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolInner inner = this.serviceClient().get(resourceGroupName, resourceName, agentPoolName); + if (inner != null) { + return new AgentPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String resourceName, String agentPoolName) { + this.serviceClient().delete(resourceGroupName, resourceName, agentPoolName); + } + + public void delete(String resourceGroupName, String resourceName, String agentPoolName, Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, agentPoolName, context); + } + + public Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + Response inner = + this.serviceClient().getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AgentPoolUpgradeProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AgentPoolUpgradeProfile getUpgradeProfile( + String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolUpgradeProfileInner inner = + this.serviceClient().getUpgradeProfile(resourceGroupName, resourceName, agentPoolName); + if (inner != null) { + return new AgentPoolUpgradeProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAvailableAgentPoolVersionsWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().getAvailableAgentPoolVersionsWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AgentPoolAvailableVersionsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AgentPoolAvailableVersions getAvailableAgentPoolVersions(String resourceGroupName, String resourceName) { + AgentPoolAvailableVersionsInner inner = + this.serviceClient().getAvailableAgentPoolVersions(resourceGroupName, resourceName); + if (inner != null) { + return new AgentPoolAvailableVersionsImpl(inner, this.manager()); + } else { + return null; + } + } + + public AgentPool upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolInner inner = + this.serviceClient().upgradeNodeImageVersion(resourceGroupName, resourceName, agentPoolName); + if (inner != null) { + return new AgentPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public AgentPool upgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + AgentPoolInner inner = + this.serviceClient().upgradeNodeImageVersion(resourceGroupName, resourceName, agentPoolName, context); + if (inner != null) { + return new AgentPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public AgentPool getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String agentPoolName = Utils.getValueFromIdByName(id, "agentPools"); + if (agentPoolName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String agentPoolName = Utils.getValueFromIdByName(id, "agentPools"); + if (agentPoolName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, agentPoolName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String agentPoolName = Utils.getValueFromIdByName(id, "agentPools"); + if (agentPoolName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); + } + this.delete(resourceGroupName, resourceName, agentPoolName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String agentPoolName = Utils.getValueFromIdByName(id, "agentPools"); + if (agentPoolName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); + } + this.delete(resourceGroupName, resourceName, agentPoolName, context); + } + + private AgentPoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public AgentPoolImpl define(String name) { + return new AgentPoolImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientBuilder.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientBuilder.java new file mode 100644 index 0000000000000..98bae7da6d92d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientBuilder.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the ContainerServiceManagementClientImpl type. */ +@ServiceClientBuilder(serviceClients = {ContainerServiceManagementClientImpl.class}) +public final class ContainerServiceManagementClientBuilder { + /* + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. + */ + private String subscriptionId; + + /** + * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of ContainerServiceManagementClientImpl with the provided parameters. + * + * @return an instance of ContainerServiceManagementClientImpl. + */ + public ContainerServiceManagementClientImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ContainerServiceManagementClientImpl client = + new ContainerServiceManagementClientImpl( + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + this.subscriptionId, + localEndpoint); + return client; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientImpl.java new file mode 100644 index 0000000000000..6f5ab79320dfd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientImpl.java @@ -0,0 +1,436 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +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.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.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OpenShiftManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.SnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRoleBindingsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRolesClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the ContainerServiceManagementClientImpl type. */ +@ServiceClient(builder = ContainerServiceManagementClientBuilder.class) +public final class ContainerServiceManagementClientImpl implements ContainerServiceManagementClient { + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. + */ + private final String subscriptionId; + + /** + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The OpenShiftManagedClustersClient object to access its operations. */ + private final OpenShiftManagedClustersClient openShiftManagedClusters; + + /** + * Gets the OpenShiftManagedClustersClient object to access its operations. + * + * @return the OpenShiftManagedClustersClient object. + */ + public OpenShiftManagedClustersClient getOpenShiftManagedClusters() { + return this.openShiftManagedClusters; + } + + /** The ContainerServicesClient object to access its operations. */ + private final ContainerServicesClient containerServices; + + /** + * Gets the ContainerServicesClient object to access its operations. + * + * @return the ContainerServicesClient object. + */ + public ContainerServicesClient getContainerServices() { + return this.containerServices; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** The ManagedClustersClient object to access its operations. */ + private final ManagedClustersClient managedClusters; + + /** + * Gets the ManagedClustersClient object to access its operations. + * + * @return the ManagedClustersClient object. + */ + public ManagedClustersClient getManagedClusters() { + return this.managedClusters; + } + + /** The MaintenanceConfigurationsClient object to access its operations. */ + private final MaintenanceConfigurationsClient maintenanceConfigurations; + + /** + * Gets the MaintenanceConfigurationsClient object to access its operations. + * + * @return the MaintenanceConfigurationsClient object. + */ + public MaintenanceConfigurationsClient getMaintenanceConfigurations() { + return this.maintenanceConfigurations; + } + + /** The AgentPoolsClient object to access its operations. */ + private final AgentPoolsClient agentPools; + + /** + * Gets the AgentPoolsClient object to access its operations. + * + * @return the AgentPoolsClient object. + */ + public AgentPoolsClient getAgentPools() { + return this.agentPools; + } + + /** The PrivateEndpointConnectionsClient object to access its operations. */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** The PrivateLinkResourcesClient object to access its operations. */ + private final PrivateLinkResourcesClient privateLinkResources; + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + + /** The ResolvePrivateLinkServiceIdsClient object to access its operations. */ + private final ResolvePrivateLinkServiceIdsClient resolvePrivateLinkServiceIds; + + /** + * Gets the ResolvePrivateLinkServiceIdsClient object to access its operations. + * + * @return the ResolvePrivateLinkServiceIdsClient object. + */ + public ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds() { + return this.resolvePrivateLinkServiceIds; + } + + /** The SnapshotsClient object to access its operations. */ + private final SnapshotsClient snapshots; + + /** + * Gets the SnapshotsClient object to access its operations. + * + * @return the SnapshotsClient object. + */ + public SnapshotsClient getSnapshots() { + return this.snapshots; + } + + /** The TrustedAccessRoleBindingsClient object to access its operations. */ + private final TrustedAccessRoleBindingsClient trustedAccessRoleBindings; + + /** + * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * + * @return the TrustedAccessRoleBindingsClient object. + */ + public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { + return this.trustedAccessRoleBindings; + } + + /** The TrustedAccessRolesClient object to access its operations. */ + private final TrustedAccessRolesClient trustedAccessRoles; + + /** + * Gets the TrustedAccessRolesClient object to access its operations. + * + * @return the TrustedAccessRolesClient object. + */ + public TrustedAccessRolesClient getTrustedAccessRoles() { + return this.trustedAccessRoles; + } + + /** + * Initializes an instance of ContainerServiceManagementClient 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 Subscription credentials which uniquely identify Microsoft Azure subscription. The + * subscription ID forms part of the URI for every service call. + * @param endpoint server parameter. + */ + ContainerServiceManagementClientImpl( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.openShiftManagedClusters = new OpenShiftManagedClustersClientImpl(this); + this.containerServices = new ContainerServicesClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.managedClusters = new ManagedClustersClientImpl(this); + this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); + this.agentPools = new AgentPoolsClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); + this.snapshots = new SnapshotsClientImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult( + Mono>> activationResponse, + HttpPipeline httpPipeline, + Type pollResultType, + Type finalResultType, + Context context) { + return PollerFactory + .create( + serializerAdapter, + httpPipeline, + pollResultType, + finalResultType, + defaultPollInterval, + activationResponse, + context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = + new HttpResponseImpl( + lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = + this + .getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceManagementClientImpl.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesClientImpl.java new file mode 100644 index 0000000000000..cd268efb18807 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesClientImpl.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ContainerServicesClient. */ +public final class ContainerServicesClientImpl implements ContainerServicesClient { + /** The proxy service used to perform REST calls. */ + private final ContainerServicesService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ContainerServicesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerServicesClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy.create(ContainerServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientContainerServices to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface ContainerServicesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOrchestrators( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("resource-type") String resourceType, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOrchestratorsWithResponseAsync( + String location, String resourceType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2019-08-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listOrchestrators( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + resourceType, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOrchestratorsWithResponseAsync( + String location, String resourceType, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2019-08-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listOrchestrators( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + resourceType, + accept, + context); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listOrchestratorsAsync(String location) { + final String resourceType = null; + return listOrchestratorsWithResponseAsync(location, resourceType) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listOrchestratorsWithResponse( + String location, String resourceType, Context context) { + return listOrchestratorsWithResponseAsync(location, resourceType, context).block(); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OrchestratorVersionProfileListResultInner listOrchestrators(String location) { + final String resourceType = null; + return listOrchestratorsWithResponse(location, resourceType, Context.NONE).getValue(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesImpl.java new file mode 100644 index 0000000000000..3af7c4dd8b17b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesImpl.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServices; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfileListResult; + +public final class ContainerServicesImpl implements ContainerServices { + private static final ClientLogger LOGGER = new ClientLogger(ContainerServicesImpl.class); + + private final ContainerServicesClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public ContainerServicesImpl( + ContainerServicesClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listOrchestratorsWithResponse( + String location, String resourceType, Context context) { + Response inner = + this.serviceClient().listOrchestratorsWithResponse(location, resourceType, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OrchestratorVersionProfileListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OrchestratorVersionProfileListResult listOrchestrators(String location) { + OrchestratorVersionProfileListResultInner inner = this.serviceClient().listOrchestrators(location); + if (inner != null) { + return new OrchestratorVersionProfileListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private ContainerServicesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/CredentialResultsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/CredentialResultsImpl.java new file mode 100644 index 0000000000000..7c4ee477b93ba --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/CredentialResultsImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResults; +import java.util.Collections; +import java.util.List; + +public final class CredentialResultsImpl implements CredentialResults { + private CredentialResultsInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + CredentialResultsImpl( + CredentialResultsInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List kubeconfigs() { + List inner = this.innerModel().kubeconfigs(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public CredentialResultsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/KubernetesVersionListResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/KubernetesVersionListResultImpl.java new file mode 100644 index 0000000000000..7ea357f9e983b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/KubernetesVersionListResultImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersion; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersionListResult; +import java.util.Collections; +import java.util.List; + +public final class KubernetesVersionListResultImpl implements KubernetesVersionListResult { + private KubernetesVersionListResultInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + KubernetesVersionListResultImpl( + KubernetesVersionListResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List values() { + List inner = this.innerModel().values(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public KubernetesVersionListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationImpl.java new file mode 100644 index 0000000000000..a4f66196a4d45 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationImpl.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfiguration; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan; +import java.util.Collections; +import java.util.List; + +public final class MaintenanceConfigurationImpl + implements MaintenanceConfiguration, MaintenanceConfiguration.Definition, MaintenanceConfiguration.Update { + private MaintenanceConfigurationInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public List timeInWeek() { + List inner = this.innerModel().timeInWeek(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List notAllowedTime() { + List inner = this.innerModel().notAllowedTime(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public MaintenanceWindow maintenanceWindow() { + return this.innerModel().maintenanceWindow(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public MaintenanceConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String configName; + + public MaintenanceConfigurationImpl withExistingManagedCluster(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public MaintenanceConfiguration create() { + this.innerObject = + serviceManager + .serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse( + resourceGroupName, resourceName, configName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public MaintenanceConfiguration create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, resourceName, configName, this.innerModel(), context) + .getValue(); + return this; + } + + MaintenanceConfigurationImpl( + String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = new MaintenanceConfigurationInner(); + this.serviceManager = serviceManager; + this.configName = name; + } + + public MaintenanceConfigurationImpl update() { + return this; + } + + public MaintenanceConfiguration apply() { + this.innerObject = + serviceManager + .serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse( + resourceGroupName, resourceName, configName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public MaintenanceConfiguration apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, resourceName, configName, this.innerModel(), context) + .getValue(); + return this; + } + + MaintenanceConfigurationImpl( + MaintenanceConfigurationInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedClusters"); + this.configName = Utils.getValueFromIdByName(innerObject.id(), "maintenanceConfigurations"); + } + + public MaintenanceConfiguration refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getMaintenanceConfigurations() + .getWithResponse(resourceGroupName, resourceName, configName, Context.NONE) + .getValue(); + return this; + } + + public MaintenanceConfiguration refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getMaintenanceConfigurations() + .getWithResponse(resourceGroupName, resourceName, configName, context) + .getValue(); + return this; + } + + public MaintenanceConfigurationImpl withTimeInWeek(List timeInWeek) { + this.innerModel().withTimeInWeek(timeInWeek); + return this; + } + + public MaintenanceConfigurationImpl withNotAllowedTime(List notAllowedTime) { + this.innerModel().withNotAllowedTime(notAllowedTime); + return this; + } + + public MaintenanceConfigurationImpl withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + this.innerModel().withMaintenanceWindow(maintenanceWindow); + return this; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsClientImpl.java new file mode 100644 index 0000000000000..c618eb6219ac2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsClientImpl.java @@ -0,0 +1,907 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfigurationListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. */ +public final class MaintenanceConfigurationsClientImpl implements MaintenanceConfigurationsClient { + /** The proxy service used to perform REST calls. */ + private final MaintenanceConfigurationsService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of MaintenanceConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MaintenanceConfigurationsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy + .create( + MaintenanceConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientMaintenanceConfigurations to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface MaintenanceConfigurationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("configName") String configName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("configName") String configName, + @BodyParam("application/json") MaintenanceConfigurationInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("configName") String configName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByManagedCluster( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + 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())); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync( + String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync( + String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster( + String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster( + String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String configName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String configName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + accept, + context); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String resourceName, String configName) { + return getWithResponseAsync(resourceGroupName, resourceName, configName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String configName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, configName, context).block(); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceConfigurationInner get(String resourceGroupName, String resourceName, String configName) { + return getWithResponse(resourceGroupName, resourceName, configName, Context.NONE).getValue(); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters The maintenance configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, String configName, MaintenanceConfigurationInner parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String resourceName, + String configName, + MaintenanceConfigurationInner parameters, + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + parameters, + accept, + context); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters The maintenance configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, String configName, MaintenanceConfigurationInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + String configName, + MaintenanceConfigurationInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configName, parameters, context) + .block(); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters The maintenance configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceConfigurationInner createOrUpdate( + String resourceGroupName, String resourceName, String configName, MaintenanceConfigurationInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, configName, parameters, Context.NONE) + .getValue(); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String configName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String configName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + accept, + context); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String configName) { + return deleteWithResponseAsync(resourceGroupName, resourceName, configName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String configName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, configName, context).block(); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String configName) { + deleteWithResponse(resourceGroupName, resourceName, configName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List maintenance configurations operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List maintenance configurations operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsImpl.java new file mode 100644 index 0000000000000..40b542b9ea9dd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsImpl.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfiguration; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfigurations; + +public final class MaintenanceConfigurationsImpl implements MaintenanceConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceConfigurationsImpl.class); + + private final MaintenanceConfigurationsClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public MaintenanceConfigurationsImpl( + MaintenanceConfigurationsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + PagedIterable inner = + this.serviceClient().listByManagedCluster(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new MaintenanceConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable listByManagedCluster( + String resourceGroupName, String resourceName, Context context) { + PagedIterable inner = + this.serviceClient().listByManagedCluster(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new MaintenanceConfigurationImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String resourceName, String configName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, resourceName, configName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MaintenanceConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MaintenanceConfiguration get(String resourceGroupName, String resourceName, String configName) { + MaintenanceConfigurationInner inner = this.serviceClient().get(resourceGroupName, resourceName, configName); + if (inner != null) { + return new MaintenanceConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String configName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, configName, context); + } + + public void delete(String resourceGroupName, String resourceName, String configName) { + this.serviceClient().delete(resourceGroupName, resourceName, configName); + } + + public MaintenanceConfiguration getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String configName = Utils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", + id))); + } + return this.getWithResponse(resourceGroupName, resourceName, configName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String configName = Utils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", + id))); + } + return this.getWithResponse(resourceGroupName, resourceName, configName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String configName = Utils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", + id))); + } + this.deleteWithResponse(resourceGroupName, resourceName, configName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String configName = Utils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", + id))); + } + return this.deleteWithResponse(resourceGroupName, resourceName, configName, context); + } + + private MaintenanceConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public MaintenanceConfigurationImpl define(String name) { + return new MaintenanceConfigurationImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterAccessProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterAccessProfileImpl.java new file mode 100644 index 0000000000000..2dc3a739ac325 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterAccessProfileImpl.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAccessProfile; +import java.util.Collections; +import java.util.Map; + +public final class ManagedClusterAccessProfileImpl implements ManagedClusterAccessProfile { + private ManagedClusterAccessProfileInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + ManagedClusterAccessProfileImpl( + ManagedClusterAccessProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public byte[] kubeConfig() { + return this.innerModel().kubeConfig(); + } + + public ManagedClusterAccessProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterImpl.java new file mode 100644 index 0000000000000..afbb5b963766d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterImpl.java @@ -0,0 +1,681 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResults; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ExtendedLocation; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedCluster; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterOidcIssuerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UserAssignedIdentity; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public final class ManagedClusterImpl implements ManagedCluster, ManagedCluster.Definition, ManagedCluster.Update { + private ManagedClusterInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedClusterSku sku() { + return this.innerModel().sku(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public ManagedClusterIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public PowerState powerState() { + return this.innerModel().powerState(); + } + + public Integer maxAgentPools() { + return this.innerModel().maxAgentPools(); + } + + public String kubernetesVersion() { + return this.innerModel().kubernetesVersion(); + } + + public String currentKubernetesVersion() { + return this.innerModel().currentKubernetesVersion(); + } + + public String dnsPrefix() { + return this.innerModel().dnsPrefix(); + } + + public String fqdnSubdomain() { + return this.innerModel().fqdnSubdomain(); + } + + public String fqdn() { + return this.innerModel().fqdn(); + } + + public String privateFqdn() { + return this.innerModel().privateFqdn(); + } + + public String azurePortalFqdn() { + return this.innerModel().azurePortalFqdn(); + } + + public List agentPoolProfiles() { + List inner = this.innerModel().agentPoolProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ContainerServiceLinuxProfile linuxProfile() { + return this.innerModel().linuxProfile(); + } + + public ManagedClusterWindowsProfile windowsProfile() { + return this.innerModel().windowsProfile(); + } + + public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { + return this.innerModel().servicePrincipalProfile(); + } + + public Map addonProfiles() { + Map inner = this.innerModel().addonProfiles(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.innerModel().podIdentityProfile(); + } + + public ManagedClusterOidcIssuerProfile oidcIssuerProfile() { + return this.innerModel().oidcIssuerProfile(); + } + + public String nodeResourceGroup() { + return this.innerModel().nodeResourceGroup(); + } + + public Boolean enableRbac() { + return this.innerModel().enableRbac(); + } + + public KubernetesSupportPlan supportPlan() { + return this.innerModel().supportPlan(); + } + + public Boolean enablePodSecurityPolicy() { + return this.innerModel().enablePodSecurityPolicy(); + } + + public ContainerServiceNetworkProfile networkProfile() { + return this.innerModel().networkProfile(); + } + + public ManagedClusterAadProfile aadProfile() { + return this.innerModel().aadProfile(); + } + + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.innerModel().autoUpgradeProfile(); + } + + public ClusterUpgradeSettings upgradeSettings() { + return this.innerModel().upgradeSettings(); + } + + public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { + return this.innerModel().autoScalerProfile(); + } + + public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { + return this.innerModel().apiServerAccessProfile(); + } + + public String diskEncryptionSetId() { + return this.innerModel().diskEncryptionSetId(); + } + + public Map identityProfile() { + Map inner = this.innerModel().identityProfile(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public List privateLinkResources() { + List inner = this.innerModel().privateLinkResources(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Boolean disableLocalAccounts() { + return this.innerModel().disableLocalAccounts(); + } + + public ManagedClusterHttpProxyConfig httpProxyConfig() { + return this.innerModel().httpProxyConfig(); + } + + public ManagedClusterSecurityProfile securityProfile() { + return this.innerModel().securityProfile(); + } + + public ManagedClusterStorageProfile storageProfile() { + return this.innerModel().storageProfile(); + } + + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { + return this.innerModel().workloadAutoScalerProfile(); + } + + public ManagedClusterAzureMonitorProfile azureMonitorProfile() { + return this.innerModel().azureMonitorProfile(); + } + + public ServiceMeshProfile serviceMeshProfile() { + return this.innerModel().serviceMeshProfile(); + } + + public String resourceUid() { + return this.innerModel().resourceUid(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ManagedClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private TagsObject updateParameters; + + public ManagedClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ManagedCluster create() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedClusters() + .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), Context.NONE); + return this; + } + + public ManagedCluster create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedClusters() + .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), context); + return this; + } + + ManagedClusterImpl( + String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = new ManagedClusterInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public ManagedClusterImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public ManagedCluster apply() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedClusters() + .updateTags(resourceGroupName, resourceName, updateParameters, Context.NONE); + return this; + } + + public ManagedCluster apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedClusters() + .updateTags(resourceGroupName, resourceName, updateParameters, context); + return this; + } + + ManagedClusterImpl( + ManagedClusterInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedClusters"); + } + + public ManagedCluster refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedClusters() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) + .getValue(); + return this; + } + + public ManagedCluster refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedClusters() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) + .getValue(); + return this; + } + + public Response listClusterAdminCredentialsWithResponse(String serverFqdn, Context context) { + return serviceManager + .managedClusters() + .listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, context); + } + + public CredentialResults listClusterAdminCredentials() { + return serviceManager.managedClusters().listClusterAdminCredentials(resourceGroupName, resourceName); + } + + public Response listClusterUserCredentialsWithResponse( + String serverFqdn, Format format, Context context) { + return serviceManager + .managedClusters() + .listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, format, context); + } + + public CredentialResults listClusterUserCredentials() { + return serviceManager.managedClusters().listClusterUserCredentials(resourceGroupName, resourceName); + } + + public Response listClusterMonitoringUserCredentialsWithResponse( + String serverFqdn, Context context) { + return serviceManager + .managedClusters() + .listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, context); + } + + public CredentialResults listClusterMonitoringUserCredentials() { + return serviceManager.managedClusters().listClusterMonitoringUserCredentials(resourceGroupName, resourceName); + } + + public void resetServicePrincipalProfile(ManagedClusterServicePrincipalProfile parameters) { + serviceManager.managedClusters().resetServicePrincipalProfile(resourceGroupName, resourceName, parameters); + } + + public void resetServicePrincipalProfile(ManagedClusterServicePrincipalProfile parameters, Context context) { + serviceManager + .managedClusters() + .resetServicePrincipalProfile(resourceGroupName, resourceName, parameters, context); + } + + public void resetAadProfile(ManagedClusterAadProfile parameters) { + serviceManager.managedClusters().resetAadProfile(resourceGroupName, resourceName, parameters); + } + + public void resetAadProfile(ManagedClusterAadProfile parameters, Context context) { + serviceManager.managedClusters().resetAadProfile(resourceGroupName, resourceName, parameters, context); + } + + public void rotateClusterCertificates() { + serviceManager.managedClusters().rotateClusterCertificates(resourceGroupName, resourceName); + } + + public void rotateClusterCertificates(Context context) { + serviceManager.managedClusters().rotateClusterCertificates(resourceGroupName, resourceName, context); + } + + public void rotateServiceAccountSigningKeys() { + serviceManager.managedClusters().rotateServiceAccountSigningKeys(resourceGroupName, resourceName); + } + + public void rotateServiceAccountSigningKeys(Context context) { + serviceManager.managedClusters().rotateServiceAccountSigningKeys(resourceGroupName, resourceName, context); + } + + public void stop() { + serviceManager.managedClusters().stop(resourceGroupName, resourceName); + } + + public void stop(Context context) { + serviceManager.managedClusters().stop(resourceGroupName, resourceName, context); + } + + public void start() { + serviceManager.managedClusters().start(resourceGroupName, resourceName); + } + + public void start(Context context) { + serviceManager.managedClusters().start(resourceGroupName, resourceName, context); + } + + public RunCommandResult runCommand(RunCommandRequest requestPayload) { + return serviceManager.managedClusters().runCommand(resourceGroupName, resourceName, requestPayload); + } + + public RunCommandResult runCommand(RunCommandRequest requestPayload, Context context) { + return serviceManager.managedClusters().runCommand(resourceGroupName, resourceName, requestPayload, context); + } + + public ManagedClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ManagedClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ManagedClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public ManagedClusterImpl withSku(ManagedClusterSku sku) { + this.innerModel().withSku(sku); + return this; + } + + public ManagedClusterImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public ManagedClusterImpl withIdentity(ManagedClusterIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public ManagedClusterImpl withKubernetesVersion(String kubernetesVersion) { + this.innerModel().withKubernetesVersion(kubernetesVersion); + return this; + } + + public ManagedClusterImpl withDnsPrefix(String dnsPrefix) { + this.innerModel().withDnsPrefix(dnsPrefix); + return this; + } + + public ManagedClusterImpl withFqdnSubdomain(String fqdnSubdomain) { + this.innerModel().withFqdnSubdomain(fqdnSubdomain); + return this; + } + + public ManagedClusterImpl withAgentPoolProfiles(List agentPoolProfiles) { + this.innerModel().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + public ManagedClusterImpl withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.innerModel().withLinuxProfile(linuxProfile); + return this; + } + + public ManagedClusterImpl withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { + this.innerModel().withWindowsProfile(windowsProfile); + return this; + } + + public ManagedClusterImpl withServicePrincipalProfile( + ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + this.innerModel().withServicePrincipalProfile(servicePrincipalProfile); + return this; + } + + public ManagedClusterImpl withAddonProfiles(Map addonProfiles) { + this.innerModel().withAddonProfiles(addonProfiles); + return this; + } + + public ManagedClusterImpl withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + this.innerModel().withPodIdentityProfile(podIdentityProfile); + return this; + } + + public ManagedClusterImpl withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile) { + this.innerModel().withOidcIssuerProfile(oidcIssuerProfile); + return this; + } + + public ManagedClusterImpl withNodeResourceGroup(String nodeResourceGroup) { + this.innerModel().withNodeResourceGroup(nodeResourceGroup); + return this; + } + + public ManagedClusterImpl withEnableRbac(Boolean enableRbac) { + this.innerModel().withEnableRbac(enableRbac); + return this; + } + + public ManagedClusterImpl withSupportPlan(KubernetesSupportPlan supportPlan) { + this.innerModel().withSupportPlan(supportPlan); + return this; + } + + public ManagedClusterImpl withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + this.innerModel().withEnablePodSecurityPolicy(enablePodSecurityPolicy); + return this; + } + + public ManagedClusterImpl withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + this.innerModel().withNetworkProfile(networkProfile); + return this; + } + + public ManagedClusterImpl withAadProfile(ManagedClusterAadProfile aadProfile) { + this.innerModel().withAadProfile(aadProfile); + return this; + } + + public ManagedClusterImpl withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + this.innerModel().withAutoUpgradeProfile(autoUpgradeProfile); + return this; + } + + public ManagedClusterImpl withUpgradeSettings(ClusterUpgradeSettings upgradeSettings) { + this.innerModel().withUpgradeSettings(upgradeSettings); + return this; + } + + public ManagedClusterImpl withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + this.innerModel().withAutoScalerProfile(autoScalerProfile); + return this; + } + + public ManagedClusterImpl withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { + this.innerModel().withApiServerAccessProfile(apiServerAccessProfile); + return this; + } + + public ManagedClusterImpl withDiskEncryptionSetId(String diskEncryptionSetId) { + this.innerModel().withDiskEncryptionSetId(diskEncryptionSetId); + return this; + } + + public ManagedClusterImpl withIdentityProfile(Map identityProfile) { + this.innerModel().withIdentityProfile(identityProfile); + return this; + } + + public ManagedClusterImpl withPrivateLinkResources(List privateLinkResources) { + this.innerModel().withPrivateLinkResources(privateLinkResources); + return this; + } + + public ManagedClusterImpl withDisableLocalAccounts(Boolean disableLocalAccounts) { + this.innerModel().withDisableLocalAccounts(disableLocalAccounts); + return this; + } + + public ManagedClusterImpl withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { + this.innerModel().withHttpProxyConfig(httpProxyConfig); + return this; + } + + public ManagedClusterImpl withSecurityProfile(ManagedClusterSecurityProfile securityProfile) { + this.innerModel().withSecurityProfile(securityProfile); + return this; + } + + public ManagedClusterImpl withStorageProfile(ManagedClusterStorageProfile storageProfile) { + this.innerModel().withStorageProfile(storageProfile); + return this; + } + + public ManagedClusterImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + public ManagedClusterImpl withWorkloadAutoScalerProfile( + ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile) { + this.innerModel().withWorkloadAutoScalerProfile(workloadAutoScalerProfile); + return this; + } + + public ManagedClusterImpl withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile) { + this.innerModel().withAzureMonitorProfile(azureMonitorProfile); + return this; + } + + public ManagedClusterImpl withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile) { + this.innerModel().withServiceMeshProfile(serviceMeshProfile); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterUpgradeProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterUpgradeProfileImpl.java new file mode 100644 index 0000000000000..d5a43ce41c4ca --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterUpgradeProfileImpl.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterUpgradeProfile; +import java.util.Collections; +import java.util.List; + +public final class ManagedClusterUpgradeProfileImpl implements ManagedClusterUpgradeProfile { + private ManagedClusterUpgradeProfileInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + ManagedClusterUpgradeProfileImpl( + ManagedClusterUpgradeProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { + return this.innerModel().controlPlaneProfile(); + } + + public List agentPoolProfiles() { + List inner = this.innerModel().agentPoolProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ManagedClusterUpgradeProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersClientImpl.java new file mode 100644 index 0000000000000..ebbd81064df0f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersClientImpl.java @@ -0,0 +1,6470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileList; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileList; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ManagedClustersClient. */ +public final class ManagedClustersClientImpl implements ManagedClustersClient { + /** The proxy service used to perform REST calls. */ + private final ManagedClustersService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ManagedClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedClustersClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy.create(ManagedClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientManagedClusters to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface ManagedClustersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getOSOptions( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("resource-type") String resourceType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKubernetesVersions( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") 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.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getUpgradeProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAccessProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("roleName") String roleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listClusterAdminCredentials( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listClusterUserCredentials( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, + @QueryParam("format") Format format, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listClusterMonitoringUserCredentials( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") ManagedClusterInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateTags( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") TagsObject parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resetServicePrincipalProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") ManagedClusterServicePrincipalProfile parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resetAadProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") ManagedClusterAadProfile parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rotateClusterCertificates( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> abortLatestOperation( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rotateServiceAccountSigningKeys( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stop( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> runCommand( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") RunCommandRequest requestPayload, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getCommandResult( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("commandId") String commandId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpoints( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMeshRevisionProfiles( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMeshRevisionProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @PathParam("mode") String mode, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMeshUpgradeProfiles( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMeshUpgradeProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("mode") String mode, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @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, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpointsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMeshRevisionProfilesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMeshUpgradeProfilesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options needs to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported OS options in the specified subscription along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getOSOptionsWithResponseAsync(String location, String resourceType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getOSOptions( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + resourceType, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options needs to be returned. + * @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 supported OS options in the specified subscription along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getOSOptionsWithResponseAsync( + String location, String resourceType, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getOSOptions( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + resourceType, + accept, + context); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported OS options in the specified subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getOSOptionsAsync(String location) { + final String resourceType = null; + return getOSOptionsWithResponseAsync(location, resourceType).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options needs to be returned. + * @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 supported OS options in the specified subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOSOptionsWithResponse( + String location, String resourceType, Context context) { + return getOSOptionsWithResponseAsync(location, resourceType, context).block(); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported OS options in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OSOptionProfileInner getOSOptions(String location) { + final String resourceType = null; + return getOSOptionsWithResponse(location, resourceType, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKubernetesVersionsWithResponseAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listKubernetesVersions( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKubernetesVersionsWithResponseAsync( + String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listKubernetesVersions( + this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, accept, context); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKubernetesVersionsAsync(String location) { + return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKubernetesVersionsWithResponse( + String location, Context context) { + return listKubernetesVersionsWithResponseAsync(location, context).block(); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubernetesVersionListResultInner listKubernetesVersions(String location) { + return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list(this.client.getEndpoint(), apiVersion, 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())); + } + + /** + * Gets a list of managed clusters in the specified 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 a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed clusters in the specified 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 a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of managed clusters in the specified 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 a list of managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List Managed Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + 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 apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + 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 managed clusters in the specified subscription and 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 response from the List Managed Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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 apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List Managed Clusters operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists managed clusters in the specified subscription and 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 response from the List Managed Clusters operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List Managed Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists managed clusters in the specified subscription and 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 response from the List Managed Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 upgrade profile of a managed cluster along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getUpgradeProfileWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getUpgradeProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getUpgradeProfileWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getUpgradeProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 upgrade profile of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getUpgradeProfileAsync( + String resourceGroupName, String resourceName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 upgrade profile of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { + return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile 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 managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAccessProfileWithResponseAsync( + String resourceGroupName, String resourceName, String roleName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getAccessProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + roleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAccessProfileWithResponseAsync( + String resourceGroupName, String resourceName, String roleName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getAccessProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + roleName, + accept, + context); + } + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile 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 managed cluster Access Profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAccessProfileAsync( + String resourceGroupName, String resourceName, String roleName) { + return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccessProfileWithResponse( + String resourceGroupName, String resourceName, String roleName, Context context) { + return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName, context).block(); + } + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile 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 managed cluster Access Profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterAccessProfileInner getAccessProfile( + String resourceGroupName, String resourceName, String roleName) { + return getAccessProfileWithResponse(resourceGroupName, resourceName, roleName, Context.NONE).getValue(); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterAdminCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listClusterAdminCredentials( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + serverFqdn, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterAdminCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listClusterAdminCredentials( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + serverFqdn, + accept, + context); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listClusterAdminCredentialsAsync( + String resourceGroupName, String resourceName) { + final String serverFqdn = null; + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterAdminCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, context) + .block(); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + return listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, Context.NONE) + .getValue(); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin + * binary in the path. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn, Format format) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listClusterUserCredentials( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + serverFqdn, + format, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin + * binary in the path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn, Format format, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listClusterUserCredentials( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + serverFqdn, + format, + accept, + context); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listClusterUserCredentialsAsync( + String resourceGroupName, String resourceName) { + final String serverFqdn = null; + final Format format = null; + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin + * binary in the path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterUserCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Format format, Context context) { + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format, context) + .block(); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + final Format format = null; + return listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, format, Context.NONE) + .getValue(); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listClusterMonitoringUserCredentials( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + serverFqdn, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listClusterMonitoringUserCredentials( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + serverFqdn, + accept, + context); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listClusterMonitoringUserCredentialsAsync( + String resourceGroupName, String resourceName) { + final String serverFqdn = null; + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterMonitoringUserCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + return listClusterMonitoringUserCredentialsWithResponseAsync( + resourceGroupName, resourceName, serverFqdn, context) + .block(); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + return listClusterMonitoringUserCredentialsWithResponse( + resourceGroupName, resourceName, serverFqdn, Context.NONE) + .getValue(); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedClusterInner.class, + ManagedClusterInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ManagedClusterInner.class, ManagedClusterInner.class, context); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner createOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner createOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync( + String resourceGroupName, String resourceName, TagsObject parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateTags( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync( + String resourceGroupName, String resourceName, TagsObject parameters, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateTags( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginUpdateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters) { + Mono>> mono = + updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedClusterInner.class, + ManagedClusterInner.class, + this.client.getContext()); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginUpdateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ManagedClusterInner.class, ManagedClusterInner.class, context); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { + return updateTagsAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner updateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return updateTagsAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { + return this.beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return beginDeleteAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + deleteAsync(resourceGroupName, resourceName).block(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, Context context) { + deleteAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resetServicePrincipalProfileWithResponseAsync( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resetServicePrincipalProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resetServicePrincipalProfileWithResponseAsync( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resetServicePrincipalProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResetServicePrincipalProfileAsync( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + Mono>> mono = + resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed 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 PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResetServicePrincipalProfileAsync( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetServicePrincipalProfile( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context) { + return this + .beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context) + .getSyncPoller(); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetServicePrincipalProfileAsync( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetServicePrincipalProfileAsync( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetServicePrincipalProfile( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context) { + resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resetAadProfileWithResponseAsync( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resetAadProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resetAadProfileWithResponseAsync( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resetAadProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResetAadProfileAsync( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + Mono>> mono = + resetAadProfileWithResponseAsync(resourceGroupName, resourceName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed 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 PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResetAadProfileAsync( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + resetAadProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + return this.beginResetAadProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context) { + return this.beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetAadProfileAsync( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetAadProfileAsync( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context) { + return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + resetAadProfileAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context) { + resetAadProfileAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rotateClusterCertificatesWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .rotateClusterCertificates( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rotateClusterCertificatesWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .rotateClusterCertificates( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateClusterCertificatesAsync( + String resourceGroupName, String resourceName) { + Mono>> mono = + rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateClusterCertificatesAsync( + String resourceGroupName, String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateClusterCertificates( + String resourceGroupName, String resourceName) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateClusterCertificates( + String resourceGroupName, String resourceName, Context context) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateClusterCertificates(String resourceGroupName, String resourceName) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); + } + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> abortLatestOperationWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .abortLatestOperation( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> abortLatestOperationWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .abortLatestOperation( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginAbortLatestOperationAsync( + String resourceGroupName, String resourceName) { + Mono>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginAbortLatestOperationAsync( + String resourceGroupName, String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation( + String resourceGroupName, String resourceName, Context context) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono abortLatestOperationAsync(String resourceGroupName, String resourceName) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortLatestOperation(String resourceGroupName, String resourceName) { + abortLatestOperationAsync(resourceGroupName, resourceName).block(); + } + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { + abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rotateServiceAccountSigningKeysWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .rotateServiceAccountSigningKeys( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rotateServiceAccountSigningKeysWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .rotateServiceAccountSigningKeys( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync( + String resourceGroupName, String resourceName) { + Mono>> mono = + rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync( + String resourceGroupName, String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateServiceAccountSigningKeys( + String resourceGroupName, String resourceName) { + return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateServiceAccountSigningKeys( + String resourceGroupName, String resourceName, Context context) { + return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName) { + return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateServiceAccountSigningKeysAsync( + String resourceGroupName, String resourceName, Context context) { + return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName) { + rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).block(); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context) { + rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .stop( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .stop( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName) { + Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopAsync( + String resourceGroupName, String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName) { + return this.beginStopAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStop( + String resourceGroupName, String resourceName, Context context) { + return this.beginStopAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String resourceName) { + return beginStopAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String resourceName, Context context) { + return beginStopAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String resourceGroupName, String resourceName) { + stopAsync(resourceGroupName, resourceName).block(); + } + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String resourceGroupName, String resourceName, Context context) { + stopAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .start( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .start( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStartAsync( + String resourceGroupName, String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName) { + return this.beginStartAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStart( + String resourceGroupName, String resourceName, Context context) { + return this.beginStartAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String resourceGroupName, String resourceName) { + return beginStartAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String resourceGroupName, String resourceName, Context context) { + return beginStartAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String resourceName) { + startAsync(resourceGroupName, resourceName).block(); + } + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String resourceName, Context context) { + startAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> runCommandWithResponseAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (requestPayload == null) { + return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); + } else { + requestPayload.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .runCommand( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + requestPayload, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> runCommandWithResponseAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (requestPayload == null) { + return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); + } else { + requestPayload.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .runCommand( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + requestPayload, + accept, + context); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RunCommandResultInner> beginRunCommandAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + Mono>> mono = + runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + RunCommandResultInner.class, + RunCommandResultInner.class, + this.client.getContext()); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RunCommandResultInner> beginRunCommandAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, context); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).getSyncPoller(); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).getSyncPoller(); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runCommandAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runCommandAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunCommandResultInner runCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + return runCommandAsync(resourceGroupName, resourceName, requestPayload).block(); + } + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunCommandResultInner runCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + return runCommandAsync(resourceGroupName, resourceName, requestPayload, context).block(); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 results of a command which has been run on the Managed Cluster on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCommandResultWithResponseAsync( + String resourceGroupName, String resourceName, String commandId) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (commandId == null) { + return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getCommandResult( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + commandId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCommandResultWithResponseAsync( + String resourceGroupName, String resourceName, String commandId, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (commandId == null) { + return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getCommandResult( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + commandId, + accept, + context); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 results of a command which has been run on the Managed Cluster on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCommandResultAsync( + String resourceGroupName, String resourceName, String commandId) { + return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClustersGetCommandResultResponse getCommandResultWithResponse( + String resourceGroupName, String resourceName, String commandId, Context context) { + return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId, context).block(); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 results of a command which has been run on the Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId) { + return getCommandResultWithResponse(resourceGroupName, resourceName, commandId, Context.NONE).getValue(); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listOutboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + 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())); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listOutboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName) { + return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>( + listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName, context)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listMeshRevisionProfiles( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + 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 mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesSinglePageAsync( + String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshRevisionProfiles( + this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMeshRevisionProfilesAsync(String location) { + return new PagedFlux<>( + () -> listMeshRevisionProfilesSinglePageAsync(location), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMeshRevisionProfilesAsync(String location, Context context) { + return new PagedFlux<>( + () -> listMeshRevisionProfilesSinglePageAsync(location, context), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshRevisionProfiles(String location) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshRevisionProfiles(String location, Context context) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMeshRevisionProfileWithResponseAsync( + String location, String mode) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getMeshRevisionProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + mode, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMeshRevisionProfileWithResponseAsync( + String location, String mode, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getMeshRevisionProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + mode, + accept, + context); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh revision profile for a mesh on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMeshRevisionProfileAsync(String location, String mode) { + return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMeshRevisionProfileWithResponse( + String location, String mode, Context context) { + return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh revision profile for a mesh. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { + return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshUpgradeProfilesSinglePageAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listMeshUpgradeProfiles( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + 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 available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshUpgradeProfilesSinglePageAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshUpgradeProfiles( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMeshUpgradeProfilesAsync( + String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMeshUpgradeProfilesAsync( + String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshUpgradeProfiles( + String resourceGroupName, String resourceName) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshUpgradeProfiles( + String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMeshUpgradeProfileWithResponseAsync( + String resourceGroupName, String resourceName, String mode) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getMeshUpgradeProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + mode, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMeshUpgradeProfileWithResponseAsync( + String resourceGroupName, String resourceName, String mode, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getMeshUpgradeProfile( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + mode, + accept, + context); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMeshUpgradeProfileAsync( + String resourceGroupName, String resourceName, String mode) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMeshUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String mode, Context context) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available upgrades for a service mesh in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { + return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of OutboundEnvironmentEndpoint along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listOutboundNetworkDependenciesEndpointsNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of OutboundEnvironmentEndpoint along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listOutboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshUpgradeProfilesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersImpl.java new file mode 100644 index 0000000000000..04542797cb399 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersImpl.java @@ -0,0 +1,576 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResults; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersionListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedCluster; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusters; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundEnvironmentEndpoint; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandResult; + +public final class ManagedClustersImpl implements ManagedClusters { + private static final ClientLogger LOGGER = new ClientLogger(ManagedClustersImpl.class); + + private final ManagedClustersClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public ManagedClustersImpl( + ManagedClustersClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getOSOptionsWithResponse(String location, String resourceType, Context context) { + Response inner = + this.serviceClient().getOSOptionsWithResponse(location, resourceType, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OSOptionProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OSOptionProfile getOSOptions(String location) { + OSOptionProfileInner inner = this.serviceClient().getOSOptions(location); + if (inner != null) { + return new OSOptionProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listKubernetesVersionsWithResponse(String location, Context context) { + Response inner = + this.serviceClient().listKubernetesVersionsWithResponse(location, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new KubernetesVersionListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public KubernetesVersionListResult listKubernetesVersions(String location) { + KubernetesVersionListResultInner inner = this.serviceClient().listKubernetesVersions(location); + if (inner != null) { + return new KubernetesVersionListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); + } + + public Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().getUpgradeProfileWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ManagedClusterUpgradeProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedClusterUpgradeProfile getUpgradeProfile(String resourceGroupName, String resourceName) { + ManagedClusterUpgradeProfileInner inner = + this.serviceClient().getUpgradeProfile(resourceGroupName, resourceName); + if (inner != null) { + return new ManagedClusterUpgradeProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAccessProfileWithResponse( + String resourceGroupName, String resourceName, String roleName, Context context) { + Response inner = + this.serviceClient().getAccessProfileWithResponse(resourceGroupName, resourceName, roleName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ManagedClusterAccessProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedClusterAccessProfile getAccessProfile( + String resourceGroupName, String resourceName, String roleName) { + ManagedClusterAccessProfileInner inner = + this.serviceClient().getAccessProfile(resourceGroupName, resourceName, roleName); + if (inner != null) { + return new ManagedClusterAccessProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listClusterAdminCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + Response inner = + this + .serviceClient() + .listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CredentialResultsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CredentialResults listClusterAdminCredentials(String resourceGroupName, String resourceName) { + CredentialResultsInner inner = + this.serviceClient().listClusterAdminCredentials(resourceGroupName, resourceName); + if (inner != null) { + return new CredentialResultsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listClusterUserCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Format format, Context context) { + Response inner = + this + .serviceClient() + .listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, format, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CredentialResultsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CredentialResults listClusterUserCredentials(String resourceGroupName, String resourceName) { + CredentialResultsInner inner = this.serviceClient().listClusterUserCredentials(resourceGroupName, resourceName); + if (inner != null) { + return new CredentialResultsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listClusterMonitoringUserCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + Response inner = + this + .serviceClient() + .listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CredentialResultsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CredentialResults listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { + CredentialResultsInner inner = + this.serviceClient().listClusterMonitoringUserCredentials(resourceGroupName, resourceName); + if (inner != null) { + return new CredentialResultsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ManagedClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedCluster getByResourceGroup(String resourceGroupName, String resourceName) { + ManagedClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new ManagedClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + + public void delete(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, context); + } + + public void resetServicePrincipalProfile( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + this.serviceClient().resetServicePrincipalProfile(resourceGroupName, resourceName, parameters); + } + + public void resetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context) { + this.serviceClient().resetServicePrincipalProfile(resourceGroupName, resourceName, parameters, context); + } + + public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + this.serviceClient().resetAadProfile(resourceGroupName, resourceName, parameters); + } + + public void resetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context) { + this.serviceClient().resetAadProfile(resourceGroupName, resourceName, parameters, context); + } + + public void rotateClusterCertificates(String resourceGroupName, String resourceName) { + this.serviceClient().rotateClusterCertificates(resourceGroupName, resourceName); + } + + public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().rotateClusterCertificates(resourceGroupName, resourceName, context); + } + + public void abortLatestOperation(String resourceGroupName, String resourceName) { + this.serviceClient().abortLatestOperation(resourceGroupName, resourceName); + } + + public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().abortLatestOperation(resourceGroupName, resourceName, context); + } + + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName) { + this.serviceClient().rotateServiceAccountSigningKeys(resourceGroupName, resourceName); + } + + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().rotateServiceAccountSigningKeys(resourceGroupName, resourceName, context); + } + + public void stop(String resourceGroupName, String resourceName) { + this.serviceClient().stop(resourceGroupName, resourceName); + } + + public void stop(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().stop(resourceGroupName, resourceName, context); + } + + public void start(String resourceGroupName, String resourceName) { + this.serviceClient().start(resourceGroupName, resourceName); + } + + public void start(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().start(resourceGroupName, resourceName, context); + } + + public RunCommandResult runCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + RunCommandResultInner inner = this.serviceClient().runCommand(resourceGroupName, resourceName, requestPayload); + if (inner != null) { + return new RunCommandResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public RunCommandResult runCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + RunCommandResultInner inner = + this.serviceClient().runCommand(resourceGroupName, resourceName, requestPayload, context); + if (inner != null) { + return new RunCommandResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getCommandResultWithResponse( + String resourceGroupName, String resourceName, String commandId, Context context) { + ManagedClustersGetCommandResultResponse inner = + this.serviceClient().getCommandResultWithResponse(resourceGroupName, resourceName, commandId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RunCommandResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RunCommandResult getCommandResult(String resourceGroupName, String resourceName, String commandId) { + RunCommandResultInner inner = this.serviceClient().getCommandResult(resourceGroupName, resourceName, commandId); + if (inner != null) { + return new RunCommandResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName) { + PagedIterable inner = + this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName, Context context) { + PagedIterable inner = + this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public PagedIterable listMeshRevisionProfiles(String location) { + PagedIterable inner = this.serviceClient().listMeshRevisionProfiles(location); + return Utils.mapPage(inner, inner1 -> new MeshRevisionProfileImpl(inner1, this.manager())); + } + + public PagedIterable listMeshRevisionProfiles(String location, Context context) { + PagedIterable inner = + this.serviceClient().listMeshRevisionProfiles(location, context); + return Utils.mapPage(inner, inner1 -> new MeshRevisionProfileImpl(inner1, this.manager())); + } + + public Response getMeshRevisionProfileWithResponse( + String location, String mode, Context context) { + Response inner = + this.serviceClient().getMeshRevisionProfileWithResponse(location, mode, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MeshRevisionProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MeshRevisionProfile getMeshRevisionProfile(String location, String mode) { + MeshRevisionProfileInner inner = this.serviceClient().getMeshRevisionProfile(location, mode); + if (inner != null) { + return new MeshRevisionProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName) { + PagedIterable inner = + this.serviceClient().listMeshUpgradeProfiles(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new MeshUpgradeProfileImpl(inner1, this.manager())); + } + + public PagedIterable listMeshUpgradeProfiles( + String resourceGroupName, String resourceName, Context context) { + PagedIterable inner = + this.serviceClient().listMeshUpgradeProfiles(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new MeshUpgradeProfileImpl(inner1, this.manager())); + } + + public Response getMeshUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String mode, Context context) { + Response inner = + this.serviceClient().getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MeshUpgradeProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MeshUpgradeProfile getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { + MeshUpgradeProfileInner inner = + this.serviceClient().getMeshUpgradeProfile(resourceGroupName, resourceName, mode); + if (inner != null) { + return new MeshUpgradeProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public ManagedCluster getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + this.delete(resourceGroupName, resourceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + this.delete(resourceGroupName, resourceName, context); + } + + private ManagedClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public ManagedClusterImpl define(String name) { + return new ManagedClusterImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshRevisionProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshRevisionProfileImpl.java new file mode 100644 index 0000000000000..396ecfa09c04d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshRevisionProfileImpl.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileProperties; + +public final class MeshRevisionProfileImpl implements MeshRevisionProfile { + private MeshRevisionProfileInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + MeshRevisionProfileImpl( + MeshRevisionProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public MeshRevisionProfileProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MeshRevisionProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshUpgradeProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshUpgradeProfileImpl.java new file mode 100644 index 0000000000000..cc2751b5a9b81 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshUpgradeProfileImpl.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileProperties; + +public final class MeshUpgradeProfileImpl implements MeshUpgradeProfile { + private MeshUpgradeProfileInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + MeshUpgradeProfileImpl( + MeshUpgradeProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public MeshUpgradeProfileProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MeshUpgradeProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OSOptionProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OSOptionProfileImpl.java new file mode 100644 index 0000000000000..06fa852df5d82 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OSOptionProfileImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProperty; +import java.util.Collections; +import java.util.List; + +public final class OSOptionProfileImpl implements OSOptionProfile { + private OSOptionProfileInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + OSOptionProfileImpl( + OSOptionProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public List osOptionPropertyList() { + List inner = this.innerModel().osOptionPropertyList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OSOptionProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClusterImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClusterImpl.java new file mode 100644 index 0000000000000..d99df7b2d4fab --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClusterImpl.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedCluster; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PurchasePlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class OpenShiftManagedClusterImpl + implements OpenShiftManagedCluster, OpenShiftManagedCluster.Definition, OpenShiftManagedCluster.Update { + private OpenShiftManagedClusterInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public PurchasePlan plan() { + return this.innerModel().plan(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public String openShiftVersion() { + return this.innerModel().openShiftVersion(); + } + + public String clusterVersion() { + return this.innerModel().clusterVersion(); + } + + public String publicHostname() { + return this.innerModel().publicHostname(); + } + + public String fqdn() { + return this.innerModel().fqdn(); + } + + public NetworkProfile networkProfile() { + return this.innerModel().networkProfile(); + } + + public List routerProfiles() { + List inner = this.innerModel().routerProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OpenShiftManagedClusterMasterPoolProfile masterPoolProfile() { + return this.innerModel().masterPoolProfile(); + } + + public List agentPoolProfiles() { + List inner = this.innerModel().agentPoolProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OpenShiftManagedClusterAuthProfile authProfile() { + return this.innerModel().authProfile(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public OpenShiftManagedClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private TagsObject updateParameters; + + public OpenShiftManagedClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public OpenShiftManagedCluster create() { + this.innerObject = + serviceManager + .serviceClient() + .getOpenShiftManagedClusters() + .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), Context.NONE); + return this; + } + + public OpenShiftManagedCluster create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOpenShiftManagedClusters() + .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), context); + return this; + } + + OpenShiftManagedClusterImpl( + String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = new OpenShiftManagedClusterInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public OpenShiftManagedClusterImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public OpenShiftManagedCluster apply() { + this.innerObject = + serviceManager + .serviceClient() + .getOpenShiftManagedClusters() + .updateTags(resourceGroupName, resourceName, updateParameters, Context.NONE); + return this; + } + + public OpenShiftManagedCluster apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOpenShiftManagedClusters() + .updateTags(resourceGroupName, resourceName, updateParameters, context); + return this; + } + + OpenShiftManagedClusterImpl( + OpenShiftManagedClusterInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "openShiftManagedClusters"); + } + + public OpenShiftManagedCluster refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getOpenShiftManagedClusters() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) + .getValue(); + return this; + } + + public OpenShiftManagedCluster refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOpenShiftManagedClusters() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) + .getValue(); + return this; + } + + public OpenShiftManagedClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public OpenShiftManagedClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public OpenShiftManagedClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public OpenShiftManagedClusterImpl withPlan(PurchasePlan plan) { + this.innerModel().withPlan(plan); + return this; + } + + public OpenShiftManagedClusterImpl withOpenShiftVersion(String openShiftVersion) { + this.innerModel().withOpenShiftVersion(openShiftVersion); + return this; + } + + public OpenShiftManagedClusterImpl withNetworkProfile(NetworkProfile networkProfile) { + this.innerModel().withNetworkProfile(networkProfile); + return this; + } + + public OpenShiftManagedClusterImpl withRouterProfiles(List routerProfiles) { + this.innerModel().withRouterProfiles(routerProfiles); + return this; + } + + public OpenShiftManagedClusterImpl withMasterPoolProfile( + OpenShiftManagedClusterMasterPoolProfile masterPoolProfile) { + this.innerModel().withMasterPoolProfile(masterPoolProfile); + return this; + } + + public OpenShiftManagedClusterImpl withAgentPoolProfiles( + List agentPoolProfiles) { + this.innerModel().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + public OpenShiftManagedClusterImpl withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile) { + this.innerModel().withAuthProfile(authProfile); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersClientImpl.java new file mode 100644 index 0000000000000..c1538a1cd0a0d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersClientImpl.java @@ -0,0 +1,1675 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OpenShiftManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OpenShiftManagedClustersClient. */ +public final class OpenShiftManagedClustersClientImpl implements OpenShiftManagedClustersClient { + /** The proxy service used to perform REST calls. */ + private final OpenShiftManagedClustersService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OpenShiftManagedClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OpenShiftManagedClustersClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy + .create(OpenShiftManagedClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientOpenShiftManagedClusters to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface OpenShiftManagedClustersService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") 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.ContainerService/openShiftManagedClusters/{resourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") OpenShiftManagedClusterInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateTags( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") TagsObject parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @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, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed cluster. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list(this.client.getEndpoint(), apiVersion, 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())); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed 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 a list of OpenShift managed clusters in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed cluster. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed 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 a list of OpenShift managed clusters in the specified subscription as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed cluster. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed 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 a list of OpenShift managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List OpenShift Managed Clusters operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName) { + 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 apiVersion = "2019-04-30"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + 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 OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response from the List OpenShift Managed Clusters operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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 apiVersion = "2019-04-30"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List OpenShift Managed Clusters operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response from the List OpenShift Managed Clusters operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List OpenShift Managed Clusters operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response from the List OpenShift Managed Clusters operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster 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 details of the managed OpenShift cluster with a specified resource group and name along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster 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 details of the managed OpenShift cluster with a specified resource group and name on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name along with {@link + * Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster 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 details of the managed OpenShift cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @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 openShift Managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OpenShiftManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OpenShiftManagedClusterInner.class, + OpenShiftManagedClusterInner.class, + this.client.getContext()); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OpenShiftManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OpenShiftManagedClusterInner.class, + OpenShiftManagedClusterInner.class, + context); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OpenShiftManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OpenShiftManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @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 openShift Managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner createOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + *

Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift + * version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner createOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags 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 openShift Managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync( + String resourceGroupName, String resourceName, TagsObject parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateTags( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @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 openShift Managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync( + String resourceGroupName, String resourceName, TagsObject parameters, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateTags( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OpenShiftManagedClusterInner> beginUpdateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters) { + Mono>> mono = + updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OpenShiftManagedClusterInner.class, + OpenShiftManagedClusterInner.class, + this.client.getContext()); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OpenShiftManagedClusterInner> beginUpdateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OpenShiftManagedClusterInner.class, + OpenShiftManagedClusterInner.class, + context); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OpenShiftManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OpenShiftManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags 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 openShift Managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @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 openShift Managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner updateTags( + String resourceGroupName, String resourceName, TagsObject parameters) { + return updateTagsAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + *

Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner updateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return updateTagsAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2019-04-30"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { + return this.beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return beginDeleteAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + deleteAsync(resourceGroupName, resourceName).block(); + } + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, Context context) { + deleteAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List OpenShift Managed Clusters operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List OpenShift Managed Clusters operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List OpenShift Managed Clusters operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List OpenShift Managed Clusters operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersImpl.java new file mode 100644 index 0000000000000..bcece8cf266c3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersImpl.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OpenShiftManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedCluster; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusters; + +public final class OpenShiftManagedClustersImpl implements OpenShiftManagedClusters { + private static final ClientLogger LOGGER = new ClientLogger(OpenShiftManagedClustersImpl.class); + + private final OpenShiftManagedClustersClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public OpenShiftManagedClustersImpl( + OpenShiftManagedClustersClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OpenShiftManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OpenShiftManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new OpenShiftManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new OpenShiftManagedClusterImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OpenShiftManagedClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OpenShiftManagedCluster getByResourceGroup(String resourceGroupName, String resourceName) { + OpenShiftManagedClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new OpenShiftManagedClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + + public void delete(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, context); + } + + public OpenShiftManagedCluster getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "openShiftManagedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'openShiftManagedClusters'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "openShiftManagedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'openShiftManagedClusters'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "openShiftManagedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'openShiftManagedClusters'.", + id))); + } + this.delete(resourceGroupName, resourceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "openShiftManagedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'openShiftManagedClusters'.", + id))); + } + this.delete(resourceGroupName, resourceName, context); + } + + private OpenShiftManagedClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public OpenShiftManagedClusterImpl define(String name) { + return new OpenShiftManagedClusterImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationValueImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationValueImpl.java new file mode 100644 index 0000000000000..2853256cf14e6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationValueImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationValue; + +public final class OperationValueImpl implements OperationValue { + private OperationValueInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + OperationValueImpl( + OperationValueInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String origin() { + return this.innerModel().origin(); + } + + public String name() { + return this.innerModel().name(); + } + + public String operation() { + return this.innerModel().operation(); + } + + public String resource() { + return this.innerModel().resource(); + } + + public String description() { + return this.innerModel().description(); + } + + public String provider() { + return this.innerModel().provider(); + } + + public OperationValueInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsClientImpl.java new file mode 100644 index 0000000000000..c58bac73e63ad --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsClientImpl.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationsClient. */ +public final class OperationsClientImpl implements OperationsClient { + /** The proxy service used to perform REST calls. */ + private final OperationsService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface OperationsService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.ContainerService/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), apiVersion, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Gets a list of operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync()); + } + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context)); + } + + /** + * Gets a list of operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..e6ca85505ec06 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsImpl.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationValue; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public OperationsImpl( + OperationsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationValueImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OperationValueImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OrchestratorVersionProfileListResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OrchestratorVersionProfileListResultImpl.java new file mode 100644 index 0000000000000..108cddda5e998 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OrchestratorVersionProfileListResultImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfileListResult; +import java.util.Collections; +import java.util.List; + +public final class OrchestratorVersionProfileListResultImpl implements OrchestratorVersionProfileListResult { + private OrchestratorVersionProfileListResultInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + OrchestratorVersionProfileListResultImpl( + OrchestratorVersionProfileListResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public List orchestrators() { + List inner = this.innerModel().orchestrators(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OrchestratorVersionProfileListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OutboundEnvironmentEndpointImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OutboundEnvironmentEndpointImpl.java new file mode 100644 index 0000000000000..dbb9e450de547 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OutboundEnvironmentEndpointImpl.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EndpointDependency; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundEnvironmentEndpoint; +import java.util.Collections; +import java.util.List; + +public final class OutboundEnvironmentEndpointImpl implements OutboundEnvironmentEndpoint { + private OutboundEnvironmentEndpointInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + OutboundEnvironmentEndpointImpl( + OutboundEnvironmentEndpointInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String category() { + return this.innerModel().category(); + } + + public List endpoints() { + List inner = this.innerModel().endpoints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OutboundEnvironmentEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 0000000000000..1c34aaf2629c5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; + +public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection { + private PrivateEndpointConnectionInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + PrivateEndpointConnectionImpl( + PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PrivateEndpoint privateEndpoint() { + return this.innerModel().privateEndpoint(); + } + + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerModel().privateLinkServiceConnectionState(); + } + + public PrivateEndpointConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionListResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionListResultImpl.java new file mode 100644 index 0000000000000..0a74647a8aaff --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionListResultImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class PrivateEndpointConnectionListResultImpl implements PrivateEndpointConnectionListResult { + private PrivateEndpointConnectionListResultInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + PrivateEndpointConnectionListResultImpl( + PrivateEndpointConnectionListResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public PrivateEndpointConnectionListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 0000000000000..c6bf57b9ef68c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,923 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { + /** The proxy service used to perform REST calls. */ + private final PrivateEndpointConnectionsService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateEndpointConnectionsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy + .create( + PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientPrivateEndpointConnections to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface PrivateEndpointConnectionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String resourceName) { + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName) { + return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + accept, + context); + } + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); + } + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE).getValue(); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + parameters, + accept, + context); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + return updateWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @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 private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, + Context context) { + return updateWithResponseAsync( + resourceGroupName, resourceName, privateEndpointConnectionName, parameters, context) + .block(); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner update( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + return updateWithResponse( + resourceGroupName, resourceName, privateEndpointConnectionName, parameters, Context.NONE) + .getValue(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + accept, + context); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resourceName, String privateEndpointConnectionName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 resourceName, String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).getSyncPoller(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resourceName, String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 resourceName, String privateEndpointConnectionName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).block(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { + deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 0000000000000..d31b66d8c41ae --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnections; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public PrivateEndpointConnectionsImpl( + PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnectionListResult list(String resourceGroupName, String resourceName) { + PrivateEndpointConnectionListResultInner inner = this.serviceClient().list(resourceGroupName, resourceName); + if (inner != null) { + return new PrivateEndpointConnectionListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnection get( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner = + this.serviceClient().get(resourceGroupName, resourceName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, + Context context) { + Response inner = + this + .serviceClient() + .updateWithResponse( + resourceGroupName, resourceName, privateEndpointConnectionName, parameters, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnection update( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + PrivateEndpointConnectionInner inner = + this.serviceClient().update(resourceGroupName, resourceName, privateEndpointConnectionName, parameters); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, resourceName, privateEndpointConnectionName); + } + + public void delete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, privateEndpointConnectionName, context); + } + + private PrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourceImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 0000000000000..c00dab553d54f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResource; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + PrivateLinkResourceImpl( + PrivateLinkResourceInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String groupId() { + return this.innerModel().groupId(); + } + + public List requiredMembers() { + List inner = this.innerModel().requiredMembers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String privateLinkServiceId() { + return this.innerModel().privateLinkServiceId(); + } + + public PrivateLinkResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesClientImpl.java new file mode 100644 index 0000000000000..d5d1de9aae58a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesClientImpl.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { + /** The proxy service used to perform REST calls. */ + private final PrivateLinkResourcesService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateLinkResourcesClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy + .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientPrivateLinkResources to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface PrivateLinkResourcesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String resourceName) { + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName) { + return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 0000000000000..85b42127aa6be --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesImpl.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResources; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResourcesListResult; + +public final class PrivateLinkResourcesImpl implements PrivateLinkResources { + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); + + private final PrivateLinkResourcesClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public PrivateLinkResourcesImpl( + PrivateLinkResourcesClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourcesListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateLinkResourcesListResult list(String resourceGroupName, String resourceName) { + PrivateLinkResourcesListResultInner inner = this.serviceClient().list(resourceGroupName, resourceName); + if (inner != null) { + return new PrivateLinkResourcesListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private PrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesListResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesListResultImpl.java new file mode 100644 index 0000000000000..f0c4a25f0d3dd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesListResultImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResourcesListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class PrivateLinkResourcesListResultImpl implements PrivateLinkResourcesListResult { + private PrivateLinkResourcesListResultInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + PrivateLinkResourcesListResultImpl( + PrivateLinkResourcesListResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourcesListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java new file mode 100644 index 0000000000000..2e1166aa6f086 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ResolvePrivateLinkServiceIdsClient. */ +public final class ResolvePrivateLinkServiceIdsClientImpl implements ResolvePrivateLinkServiceIdsClient { + /** The proxy service used to perform REST calls. */ + private final ResolvePrivateLinkServiceIdsService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ResolvePrivateLinkServiceIdsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ResolvePrivateLinkServiceIdsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy + .create( + ResolvePrivateLinkServiceIdsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientResolvePrivateLinkServiceIds to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface ResolvePrivateLinkServiceIdsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> post( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") PrivateLinkResourceInner parameters, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> postWithResponseAsync( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .post( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> postWithResponseAsync( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .post( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono postAsync( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + return postWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response postWithResponse( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context) { + return postWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner post( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + return postWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java new file mode 100644 index 0000000000000..c24e6040bf864 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResolvePrivateLinkServiceIds; + +public final class ResolvePrivateLinkServiceIdsImpl implements ResolvePrivateLinkServiceIds { + private static final ClientLogger LOGGER = new ClientLogger(ResolvePrivateLinkServiceIdsImpl.class); + + private final ResolvePrivateLinkServiceIdsClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public ResolvePrivateLinkServiceIdsImpl( + ResolvePrivateLinkServiceIdsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response postWithResponse( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context) { + Response inner = + this.serviceClient().postWithResponse(resourceGroupName, resourceName, parameters, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateLinkResource post( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + PrivateLinkResourceInner inner = this.serviceClient().post(resourceGroupName, resourceName, parameters); + if (inner != null) { + return new PrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private ResolvePrivateLinkServiceIdsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/RunCommandResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/RunCommandResultImpl.java new file mode 100644 index 0000000000000..4f426377e4b59 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/RunCommandResultImpl.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandResult; +import java.time.OffsetDateTime; + +public final class RunCommandResultImpl implements RunCommandResult { + private RunCommandResultInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + RunCommandResultImpl( + RunCommandResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public Integer exitCode() { + return this.innerModel().exitCode(); + } + + public OffsetDateTime startedAt() { + return this.innerModel().startedAt(); + } + + public OffsetDateTime finishedAt() { + return this.innerModel().finishedAt(); + } + + public String logs() { + return this.innerModel().logs(); + } + + public String reason() { + return this.innerModel().reason(); + } + + public RunCommandResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotImpl.java new file mode 100644 index 0000000000000..ad600d314c9e7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotImpl.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import java.util.Collections; +import java.util.Map; + +public final class SnapshotImpl implements Snapshot, Snapshot.Definition, Snapshot.Update { + private SnapshotInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public CreationData creationData() { + return this.innerModel().creationData(); + } + + public SnapshotType snapshotType() { + return this.innerModel().snapshotType(); + } + + public String kubernetesVersion() { + return this.innerModel().kubernetesVersion(); + } + + public String nodeImageVersion() { + return this.innerModel().nodeImageVersion(); + } + + public OSType osType() { + return this.innerModel().osType(); + } + + public Ossku osSku() { + return this.innerModel().osSku(); + } + + public String vmSize() { + return this.innerModel().vmSize(); + } + + public Boolean enableFips() { + return this.innerModel().enableFips(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private TagsObject updateParameters; + + public SnapshotImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Snapshot create() { + this.innerObject = + serviceManager + .serviceClient() + .getSnapshots() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Snapshot create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSnapshots() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context) + .getValue(); + return this; + } + + SnapshotImpl( + String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = new SnapshotInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public SnapshotImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public Snapshot apply() { + this.innerObject = + serviceManager + .serviceClient() + .getSnapshots() + .updateTagsWithResponse(resourceGroupName, resourceName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public Snapshot apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSnapshots() + .updateTagsWithResponse(resourceGroupName, resourceName, updateParameters, context) + .getValue(); + return this; + } + + SnapshotImpl( + SnapshotInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "snapshots"); + } + + public Snapshot refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getSnapshots() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) + .getValue(); + return this; + } + + public Snapshot refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSnapshots() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) + .getValue(); + return this; + } + + public SnapshotImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SnapshotImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SnapshotImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public SnapshotImpl withCreationData(CreationData creationData) { + this.innerModel().withCreationData(creationData); + return this; + } + + public SnapshotImpl withSnapshotType(SnapshotType snapshotType) { + this.innerModel().withSnapshotType(snapshotType); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsClientImpl.java new file mode 100644 index 0000000000000..f61629c49c6d1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsClientImpl.java @@ -0,0 +1,1226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.SnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in SnapshotsClient. */ +public final class SnapshotsClientImpl implements SnapshotsClient { + /** The proxy service used to perform REST calls. */ + private final SnapshotsService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of SnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SnapshotsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy.create(SnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientSnapshots to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface SnapshotsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") 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.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") SnapshotInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @BodyParam("application/json") TagsObject parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @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, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list(this.client.getEndpoint(), apiVersion, 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())); + } + + /** + * Gets a list of snapshots in the specified 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 a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of snapshots in the specified 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 a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of snapshots in the specified 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 a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List Snapshots operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + 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 apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + 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 snapshots in the specified subscription and 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 response from the List Snapshots operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @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 apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List Snapshots operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists snapshots in the specified subscription and 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 response from the List Snapshots operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response from the List Snapshots operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists snapshots in the specified subscription and 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 response from the List Snapshots operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, SnapshotInner parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @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 node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, SnapshotInner parameters, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 node pool snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, SnapshotInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @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 node pool snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, String resourceName, SnapshotInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 node pool snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner createOrUpdate(String resourceGroupName, String resourceName, SnapshotInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags 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 node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync( + String resourceGroupName, String resourceName, TagsObject parameters) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateTags( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @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 node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync( + String resourceGroupName, String resourceName, TagsObject parameters, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateTags( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags 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 node pool snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @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 node pool snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags 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 node pool snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Snapshots operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Snapshots operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Snapshots operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Snapshots operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsImpl.java new file mode 100644 index 0000000000000..faa73d4530a9a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsImpl.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.SnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshots; + +public final class SnapshotsImpl implements Snapshots { + private static final ClientLogger LOGGER = new ClientLogger(SnapshotsImpl.class); + + private final SnapshotsClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public SnapshotsImpl( + SnapshotsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SnapshotImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Snapshot getByResourceGroup(String resourceGroupName, String resourceName) { + SnapshotInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new SnapshotImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + + public Snapshot getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "snapshots"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "snapshots"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "snapshots"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "snapshots"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + private SnapshotsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public SnapshotImpl define(String name) { + return new SnapshotImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingImpl.java new file mode 100644 index 0000000000000..70eb1934ce63d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingImpl.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBinding; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class TrustedAccessRoleBindingImpl + implements TrustedAccessRoleBinding, TrustedAccessRoleBinding.Definition, TrustedAccessRoleBinding.Update { + private TrustedAccessRoleBindingInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public TrustedAccessRoleBindingProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String sourceResourceId() { + return this.innerModel().sourceResourceId(); + } + + public List roles() { + List inner = this.innerModel().roles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public TrustedAccessRoleBindingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String trustedAccessRoleBindingName; + + public TrustedAccessRoleBindingImpl withExistingManagedCluster(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public TrustedAccessRoleBinding create() { + this.innerObject = + serviceManager + .serviceClient() + .getTrustedAccessRoleBindings() + .createOrUpdate( + resourceGroupName, resourceName, trustedAccessRoleBindingName, this.innerModel(), Context.NONE); + return this; + } + + public TrustedAccessRoleBinding create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTrustedAccessRoleBindings() + .createOrUpdate( + resourceGroupName, resourceName, trustedAccessRoleBindingName, this.innerModel(), context); + return this; + } + + TrustedAccessRoleBindingImpl( + String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = new TrustedAccessRoleBindingInner(); + this.serviceManager = serviceManager; + this.trustedAccessRoleBindingName = name; + } + + public TrustedAccessRoleBindingImpl update() { + return this; + } + + public TrustedAccessRoleBinding apply() { + this.innerObject = + serviceManager + .serviceClient() + .getTrustedAccessRoleBindings() + .createOrUpdate( + resourceGroupName, resourceName, trustedAccessRoleBindingName, this.innerModel(), Context.NONE); + return this; + } + + public TrustedAccessRoleBinding apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTrustedAccessRoleBindings() + .createOrUpdate( + resourceGroupName, resourceName, trustedAccessRoleBindingName, this.innerModel(), context); + return this; + } + + TrustedAccessRoleBindingImpl( + TrustedAccessRoleBindingInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedClusters"); + this.trustedAccessRoleBindingName = Utils.getValueFromIdByName(innerObject.id(), "trustedAccessRoleBindings"); + } + + public TrustedAccessRoleBinding refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getTrustedAccessRoleBindings() + .getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE) + .getValue(); + return this; + } + + public TrustedAccessRoleBinding refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTrustedAccessRoleBindings() + .getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, context) + .getValue(); + return this; + } + + public TrustedAccessRoleBindingImpl withSourceResourceId(String sourceResourceId) { + this.innerModel().withSourceResourceId(sourceResourceId); + return this; + } + + public TrustedAccessRoleBindingImpl withRoles(List roles) { + this.innerModel().withRoles(roles); + return this; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsClientImpl.java new file mode 100644 index 0000000000000..eb3493d1fb320 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsClientImpl.java @@ -0,0 +1,1181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRoleBindingsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in TrustedAccessRoleBindingsClient. */ +public final class TrustedAccessRoleBindingsClientImpl implements TrustedAccessRoleBindingsClient { + /** The proxy service used to perform REST calls. */ + private final TrustedAccessRoleBindingsService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of TrustedAccessRoleBindingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TrustedAccessRoleBindingsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy + .create( + TrustedAccessRoleBindingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientTrustedAccessRoleBindings to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface TrustedAccessRoleBindingsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, + @BodyParam("application/json") TrustedAccessRoleBindingInner trustedAccessRoleBinding, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list of trusted access role bindings along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String resourceName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list of trusted access role bindings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster 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 list of trusted access role bindings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 trusted access role binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @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 trusted access role binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + accept, + context); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 trusted access role binding on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + return getWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @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 trusted access role binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).block(); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 trusted access role binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrustedAccessRoleBindingInner get( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + return getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE).getValue(); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines binding between a resource and role along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + if (trustedAccessRoleBinding == null) { + return Mono + .error( + new IllegalArgumentException("Parameter trustedAccessRoleBinding is required and cannot be null.")); + } else { + trustedAccessRoleBinding.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + trustedAccessRoleBinding, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + if (trustedAccessRoleBinding == null) { + return Mono + .error( + new IllegalArgumentException("Parameter trustedAccessRoleBinding is required and cannot be null.")); + } else { + trustedAccessRoleBinding.validate(); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + trustedAccessRoleBinding, + accept, + context); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TrustedAccessRoleBindingInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + TrustedAccessRoleBindingInner.class, + TrustedAccessRoleBindingInner.class, + this.client.getContext()); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TrustedAccessRoleBindingInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + TrustedAccessRoleBindingInner.class, + TrustedAccessRoleBindingInner.class, + context); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + return this + .beginCreateOrUpdateAsync( + resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding) + .getSyncPoller(); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, + Context context) { + return this + .beginCreateOrUpdateAsync( + resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding, context) + .getSyncPoller(); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines binding between a resource and role on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + return beginCreateOrUpdateAsync( + resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrustedAccessRoleBindingInner createOrUpdate( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + return createOrUpdateAsync( + resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding) + .block(); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrustedAccessRoleBindingInner createOrUpdate( + String resourceGroupName, + String resourceName, + String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, + Context context) { + return createOrUpdateAsync( + resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding, context) + .block(); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + accept, + context); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resourceName, String trustedAccessRoleBindingName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @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 resourceName, String trustedAccessRoleBindingName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName).getSyncPoller(); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context) + .getSyncPoller(); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resourceName, String trustedAccessRoleBindingName) { + return beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @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 resourceName, String trustedAccessRoleBindingName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + deleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName).block(); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context) { + deleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsImpl.java new file mode 100644 index 0000000000000..883f23af2a68a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRoleBindingsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBinding; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindings; + +public final class TrustedAccessRoleBindingsImpl implements TrustedAccessRoleBindings { + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingsImpl.class); + + private final TrustedAccessRoleBindingsClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public TrustedAccessRoleBindingsImpl( + TrustedAccessRoleBindingsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String resourceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new TrustedAccessRoleBindingImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String resourceName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new TrustedAccessRoleBindingImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TrustedAccessRoleBindingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TrustedAccessRoleBinding get( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + TrustedAccessRoleBindingInner inner = + this.serviceClient().get(resourceGroupName, resourceName, trustedAccessRoleBindingName); + if (inner != null) { + return new TrustedAccessRoleBindingImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + this.serviceClient().delete(resourceGroupName, resourceName, trustedAccessRoleBindingName); + } + + public void delete( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + } + + public TrustedAccessRoleBinding getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String trustedAccessRoleBindingName = Utils.getValueFromIdByName(id, "trustedAccessRoleBindings"); + if (trustedAccessRoleBindingName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'trustedAccessRoleBindings'.", + id))); + } + return this + .getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String trustedAccessRoleBindingName = Utils.getValueFromIdByName(id, "trustedAccessRoleBindings"); + if (trustedAccessRoleBindingName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'trustedAccessRoleBindings'.", + id))); + } + return this.getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String trustedAccessRoleBindingName = Utils.getValueFromIdByName(id, "trustedAccessRoleBindings"); + if (trustedAccessRoleBindingName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'trustedAccessRoleBindings'.", + id))); + } + this.delete(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String trustedAccessRoleBindingName = Utils.getValueFromIdByName(id, "trustedAccessRoleBindings"); + if (trustedAccessRoleBindingName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'trustedAccessRoleBindings'.", + id))); + } + this.delete(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + } + + private TrustedAccessRoleBindingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public TrustedAccessRoleBindingImpl define(String name) { + return new TrustedAccessRoleBindingImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleImpl.java new file mode 100644 index 0000000000000..358fe96a5b514 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRole; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleRule; +import java.util.Collections; +import java.util.List; + +public final class TrustedAccessRoleImpl implements TrustedAccessRole { + private TrustedAccessRoleInner innerObject; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + TrustedAccessRoleImpl( + TrustedAccessRoleInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String sourceResourceType() { + return this.innerModel().sourceResourceType(); + } + + public String name() { + return this.innerModel().name(); + } + + public List rules() { + List inner = this.innerModel().rules(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public TrustedAccessRoleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesClientImpl.java new file mode 100644 index 0000000000000..67cc94c894e0b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesClientImpl.java @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRolesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in TrustedAccessRolesClient. */ +public final class TrustedAccessRolesClientImpl implements TrustedAccessRolesClient { + /** The proxy service used to perform REST calls. */ + private final TrustedAccessRolesService service; + + /** The service client containing this operation class. */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of TrustedAccessRolesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TrustedAccessRolesClientImpl(ContainerServiceManagementClientImpl client) { + this.service = + RestProxy.create(TrustedAccessRolesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientTrustedAccessRoles to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface TrustedAccessRolesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + location, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2023-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(listAsync(location)); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(listAsync(location, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesImpl.java new file mode 100644 index 0000000000000..41c3cac87f4ff --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesImpl.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRolesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRole; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoles; + +public final class TrustedAccessRolesImpl implements TrustedAccessRoles { + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRolesImpl.class); + + private final TrustedAccessRolesClient innerClient; + + private final com + .azure + .resourcemanager + .containerservicemicrosoftcontainerserviceaks + .generated + .ContainerServiceManager + serviceManager; + + public TrustedAccessRolesImpl( + TrustedAccessRolesClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return Utils.mapPage(inner, inner1 -> new TrustedAccessRoleImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return Utils.mapPage(inner, inner1 -> new TrustedAccessRoleImpl(inner1, this.manager())); + } + + private TrustedAccessRolesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/Utils.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/Utils.java new file mode 100644 index 0000000000000..bf68e6a3d37f6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/Utils.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class Utils { + private Utils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super( + PagedFlux + .create( + () -> + (continuationToken, pageSize) -> + Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> + new PagedResponseBase( + page.getRequest(), + page.getStatusCode(), + page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), + page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/package-info.java new file mode 100644 index 0000000000000..3b88e5c3fab9b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the implementations for ContainerServiceManagementClient. Container Service Client. */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AbsoluteMonthlySchedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AbsoluteMonthlySchedule.java new file mode 100644 index 0000000000000..b4a7ecb8e001c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AbsoluteMonthlySchedule.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. */ +@Fluent +public final class AbsoluteMonthlySchedule { + /* + * Specifies the number of months between each set of occurrences. + */ + @JsonProperty(value = "intervalMonths", required = true) + private int intervalMonths; + + /* + * The date of the month. + */ + @JsonProperty(value = "dayOfMonth", required = true) + private int dayOfMonth; + + /** Creates an instance of AbsoluteMonthlySchedule class. */ + public AbsoluteMonthlySchedule() { + } + + /** + * Get the intervalMonths property: Specifies the number of months between each set of occurrences. + * + * @return the intervalMonths value. + */ + public int intervalMonths() { + return this.intervalMonths; + } + + /** + * Set the intervalMonths property: Specifies the number of months between each set of occurrences. + * + * @param intervalMonths the intervalMonths value to set. + * @return the AbsoluteMonthlySchedule object itself. + */ + public AbsoluteMonthlySchedule withIntervalMonths(int intervalMonths) { + this.intervalMonths = intervalMonths; + return this; + } + + /** + * Get the dayOfMonth property: The date of the month. + * + * @return the dayOfMonth value. + */ + public int dayOfMonth() { + return this.dayOfMonth; + } + + /** + * Set the dayOfMonth property: The date of the month. + * + * @param dayOfMonth the dayOfMonth value to set. + * @return the AbsoluteMonthlySchedule object itself. + */ + public AbsoluteMonthlySchedule withDayOfMonth(int dayOfMonth) { + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPool.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPool.java new file mode 100644 index 0000000000000..a08c509312923 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPool.java @@ -0,0 +1,1746 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of AgentPool. */ +public interface AgentPool { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Resource type. + * + * @return the type value. + */ + String type(); + + /** + * Gets the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @return the count value. + */ + Integer count(); + + /** + * Gets the vmSize property: The size of the agent pool VMs. + * + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) + * pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @return the vmSize value. + */ + String vmSize(); + + /** + * Gets the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @return the osDiskSizeGB value. + */ + Integer osDiskSizeGB(); + + /** + * Gets the osDiskType property: The OS disk type to be used for machines in the agent pool. + * + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + * Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @return the osDiskType value. + */ + OSDiskType osDiskType(); + + /** + * Gets the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + KubeletDiskType kubeletDiskType(); + + /** + * Gets the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + WorkloadRuntime workloadRuntime(); + + /** + * Gets the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. + * + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this + * applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the vnetSubnetId value. + */ + String vnetSubnetId(); + + /** + * Gets the podSubnetId property: The ID of the subnet which pods will join when launched. + * + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of + * the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the podSubnetId value. + */ + String podSubnetId(); + + /** + * Gets the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + Integer maxPods(); + + /** + * Gets the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + OSType osType(); + + /** + * Gets the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + Ossku osSku(); + + /** + * Gets the maxCount property: The maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + Integer maxCount(); + + /** + * Gets the minCount property: The minimum number of nodes for auto-scaling. + * + * @return the minCount value. + */ + Integer minCount(); + + /** + * Gets the enableAutoScaling property: Whether to enable auto-scaler. + * + * @return the enableAutoScaling value. + */ + Boolean enableAutoScaling(); + + /** + * Gets the scaleDownMode property: This also effects the cluster autoscaler behavior. If not specified, it defaults + * to Delete. + * + * @return the scaleDownMode value. + */ + ScaleDownMode scaleDownMode(); + + /** + * Gets the typePropertiesType property: The type of Agent Pool. + * + * @return the typePropertiesType value. + */ + AgentPoolType typePropertiesType(); + + /** + * Gets the mode property: The mode of an agent pool. + * + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool + * restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @return the mode value. + */ + AgentPoolMode mode(); + + /** + * Gets the orchestratorVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in + * an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the + * control plane. The node pool minor version must be within two minor versions of the control plane version. The + * node pool version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @return the orchestratorVersion value. + */ + String orchestratorVersion(); + + /** + * Gets the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. + * + *

If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly + * equal to it. If orchestratorVersion is <major.minor>, this field will contain the full + * <major.minor.patch> version being used. + * + * @return the currentOrchestratorVersion value. + */ + String currentOrchestratorVersion(); + + /** + * Gets the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + String nodeImageVersion(); + + /** + * Gets the upgradeSettings property: Settings for upgrading the agentpool. + * + * @return the upgradeSettings value. + */ + AgentPoolUpgradeSettings upgradeSettings(); + + /** + * Gets the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the powerState property: When an Agent Pool is first created it is initially Running. The Agent Pool can be + * stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing + * charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. + * + * @return the powerState value. + */ + PowerState powerState(); + + /** + * Gets the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @return the availabilityZones value. + */ + List availabilityZones(); + + /** + * Gets the enableNodePublicIp property: Whether each node is allocated its own public IP. + * + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common + * scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to + * minimize hops. For more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @return the enableNodePublicIp value. + */ + Boolean enableNodePublicIp(); + + /** + * Gets the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @return the nodePublicIpPrefixId value. + */ + String nodePublicIpPrefixId(); + + /** + * Gets the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * + * @return the scaleSetPriority value. + */ + ScaleSetPriority scaleSetPriority(); + + /** + * Gets the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + * + * @return the scaleSetEvictionPolicy value. + */ + ScaleSetEvictionPolicy scaleSetEvictionPolicy(); + + /** + * Gets the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @return the spotMaxPrice value. + */ + Float spotMaxPrice(); + + /** + * Gets the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value. + */ + Map nodeLabels(); + + /** + * Gets the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + List nodeTaints(); + + /** + * Gets the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @return the proximityPlacementGroupId value. + */ + String proximityPlacementGroupId(); + + /** + * Gets the kubeletConfig property: Kubelet configurations of agent nodes. + * + *

The Kubelet configuration on the agent pool nodes. + * + * @return the kubeletConfig value. + */ + KubeletConfig kubeletConfig(); + + /** + * Gets the linuxOSConfig property: OS configurations of Linux agent nodes. + * + *

The OS configuration of Linux agent nodes. + * + * @return the linuxOSConfig value. + */ + LinuxOSConfig linuxOSConfig(); + + /** + * Gets the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. + * + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @return the enableEncryptionAtHost value. + */ + Boolean enableEncryptionAtHost(); + + /** + * Gets the enableUltraSsd property: Whether to enable UltraSSD. + * + * @return the enableUltraSsd value. + */ + Boolean enableUltraSsd(); + + /** + * Gets the enableFips property: Whether to use a FIPS-enabled OS. + * + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @return the enableFips value. + */ + Boolean enableFips(); + + /** + * Gets the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + GpuInstanceProfile gpuInstanceProfile(); + + /** + * Gets the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will + * be created/upgraded using a snapshot. + * + * @return the creationData value. + */ + CreationData creationData(); + + /** + * Gets the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @return the hostGroupId value. + */ + String hostGroupId(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner + * object. + * + * @return the inner object. + */ + AgentPoolInner innerModel(); + + /** The entirety of the AgentPool definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** The AgentPool definition stages. */ + interface DefinitionStages { + /** The first stage of the AgentPool definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the AgentPool definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @return the next definition stage. + */ + WithCreate withExistingManagedCluster(String resourceGroupName, String resourceName); + } + + /** + * The stage of the AgentPool definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithCount, + DefinitionStages.WithVmSize, + DefinitionStages.WithOsDiskSizeGB, + DefinitionStages.WithOsDiskType, + DefinitionStages.WithKubeletDiskType, + DefinitionStages.WithWorkloadRuntime, + DefinitionStages.WithVnetSubnetId, + DefinitionStages.WithPodSubnetId, + DefinitionStages.WithMaxPods, + DefinitionStages.WithOsType, + DefinitionStages.WithOsSku, + DefinitionStages.WithMaxCount, + DefinitionStages.WithMinCount, + DefinitionStages.WithEnableAutoScaling, + DefinitionStages.WithScaleDownMode, + DefinitionStages.WithTypePropertiesType, + DefinitionStages.WithMode, + DefinitionStages.WithOrchestratorVersion, + DefinitionStages.WithUpgradeSettings, + DefinitionStages.WithPowerState, + DefinitionStages.WithAvailabilityZones, + DefinitionStages.WithEnableNodePublicIp, + DefinitionStages.WithNodePublicIpPrefixId, + DefinitionStages.WithScaleSetPriority, + DefinitionStages.WithScaleSetEvictionPolicy, + DefinitionStages.WithSpotMaxPrice, + DefinitionStages.WithNodeLabels, + DefinitionStages.WithNodeTaints, + DefinitionStages.WithProximityPlacementGroupId, + DefinitionStages.WithKubeletConfig, + DefinitionStages.WithLinuxOSConfig, + DefinitionStages.WithEnableEncryptionAtHost, + DefinitionStages.WithEnableUltraSsd, + DefinitionStages.WithEnableFips, + DefinitionStages.WithGpuInstanceProfile, + DefinitionStages.WithCreationData, + DefinitionStages.WithHostGroupId { + /** + * Executes the create request. + * + * @return the created resource. + */ + AgentPool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AgentPool create(Context context); + } + + /** The stage of the AgentPool definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: The tags to be persisted on the agent pool virtual machine scale set.. + * + * @param tags The tags to be persisted on the agent pool virtual machine scale set. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** The stage of the AgentPool definition allowing to specify count. */ + interface WithCount { + /** + * Specifies the count property: Number of agents (VMs) to host docker containers. Allowed values must be in + * the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system + * pools. The default value is 1.. + * + * @param count Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 + * to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The + * default value is 1. + * @return the next definition stage. + */ + WithCreate withCount(Integer count); + } + + /** The stage of the AgentPool definition allowing to specify vmSize. */ + interface WithVmSize { + /** + * Specifies the vmSize property: The size of the agent pool VMs. + * + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, + * etc) pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize The size of the agent pool VMs. + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, + * cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * @return the next definition stage. + */ + WithCreate withVmSize(String vmSize); + } + + /** The stage of the AgentPool definition allowing to specify osDiskSizeGB. */ + interface WithOsDiskSizeGB { + /** + * Specifies the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every + * machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + * the vmSize specified.. + * + * @param osDiskSizeGB OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize + * specified. + * @return the next definition stage. + */ + WithCreate withOsDiskSizeGB(Integer osDiskSizeGB); + } + + /** The stage of the AgentPool definition allowing to specify osDiskType. */ + interface WithOsDiskType { + /** + * Specifies the osDiskType property: The OS disk type to be used for machines in the agent pool. + * + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested + * OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information + * see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).. + * + * @param osDiskType The OS disk type to be used for machines in the agent pool. + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested + * OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more + * information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * @return the next definition stage. + */ + WithCreate withOsDiskType(OSDiskType osDiskType); + } + + /** The stage of the AgentPool definition allowing to specify kubeletDiskType. */ + interface WithKubeletDiskType { + /** + * Specifies the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage.. + * + * @param kubeletDiskType Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * @return the next definition stage. + */ + WithCreate withKubeletDiskType(KubeletDiskType kubeletDiskType); + } + + /** The stage of the AgentPool definition allowing to specify workloadRuntime. */ + interface WithWorkloadRuntime { + /** + * Specifies the workloadRuntime property: Determines the type of workload a node can run.. + * + * @param workloadRuntime Determines the type of workload a node can run. + * @return the next definition stage. + */ + WithCreate withWorkloadRuntime(WorkloadRuntime workloadRuntime); + } + + /** The stage of the AgentPool definition allowing to specify vnetSubnetId. */ + interface WithVnetSubnetId { + /** + * Specifies the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will + * join on startup. + * + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is + * specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId The ID of the subnet which agent pool nodes and optionally pods will join on startup. + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is + * specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * @return the next definition stage. + */ + WithCreate withVnetSubnetId(String vnetSubnetId); + } + + /** The stage of the AgentPool definition allowing to specify podSubnetId. */ + interface WithPodSubnetId { + /** + * Specifies the podSubnetId property: The ID of the subnet which pods will join when launched. + * + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). + * This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId The ID of the subnet which pods will join when launched. + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more + * details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * @return the next definition stage. + */ + WithCreate withPodSubnetId(String podSubnetId); + } + + /** The stage of the AgentPool definition allowing to specify maxPods. */ + interface WithMaxPods { + /** + * Specifies the maxPods property: The maximum number of pods that can run on a node.. + * + * @param maxPods The maximum number of pods that can run on a node. + * @return the next definition stage. + */ + WithCreate withMaxPods(Integer maxPods); + } + + /** The stage of the AgentPool definition allowing to specify osType. */ + interface WithOsType { + /** + * Specifies the osType property: OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux.. + * + * @param osType OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * @return the next definition stage. + */ + WithCreate withOsType(OSType osType); + } + + /** The stage of the AgentPool definition allowing to specify osSku. */ + interface WithOsSku { + /** + * Specifies the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if + * OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes + * >= 1.25 if OSType is Windows.. + * + * @param osSku Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The + * default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType + * is Windows. + * @return the next definition stage. + */ + WithCreate withOsSku(Ossku osSku); + } + + /** The stage of the AgentPool definition allowing to specify maxCount. */ + interface WithMaxCount { + /** + * Specifies the maxCount property: The maximum number of nodes for auto-scaling. + * + * @param maxCount The maximum number of nodes for auto-scaling. + * @return the next definition stage. + */ + WithCreate withMaxCount(Integer maxCount); + } + + /** The stage of the AgentPool definition allowing to specify minCount. */ + interface WithMinCount { + /** + * Specifies the minCount property: The minimum number of nodes for auto-scaling. + * + * @param minCount The minimum number of nodes for auto-scaling. + * @return the next definition stage. + */ + WithCreate withMinCount(Integer minCount); + } + + /** The stage of the AgentPool definition allowing to specify enableAutoScaling. */ + interface WithEnableAutoScaling { + /** + * Specifies the enableAutoScaling property: Whether to enable auto-scaler. + * + * @param enableAutoScaling Whether to enable auto-scaler. + * @return the next definition stage. + */ + WithCreate withEnableAutoScaling(Boolean enableAutoScaling); + } + + /** The stage of the AgentPool definition allowing to specify scaleDownMode. */ + interface WithScaleDownMode { + /** + * Specifies the scaleDownMode property: This also effects the cluster autoscaler behavior. If not + * specified, it defaults to Delete.. + * + * @param scaleDownMode This also effects the cluster autoscaler behavior. If not specified, it defaults to + * Delete. + * @return the next definition stage. + */ + WithCreate withScaleDownMode(ScaleDownMode scaleDownMode); + } + + /** The stage of the AgentPool definition allowing to specify typePropertiesType. */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: The type of Agent Pool.. + * + * @param typePropertiesType The type of Agent Pool. + * @return the next definition stage. + */ + WithCreate withTypePropertiesType(AgentPoolType typePropertiesType); + } + + /** The stage of the AgentPool definition allowing to specify mode. */ + interface WithMode { + /** + * Specifies the mode property: The mode of an agent pool. + * + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent + * pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @param mode The mode of an agent pool. + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on + * agent pool restrictions and best practices, see: + * https://docs.microsoft.com/azure/aks/use-system-pools. + * @return the next definition stage. + */ + WithCreate withMode(AgentPoolMode mode); + } + + /** The stage of the AgentPool definition allowing to specify orchestratorVersion. */ + interface WithOrchestratorVersion { + /** + * Specifies the orchestratorVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are + * supported. When <major.minor> is specified, the latest supported GA patch version is chosen + * automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. + * 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best + * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + * pool version must have the same major version as the control plane. The node pool minor version must be + * within two minor versions of the control plane version. The node pool version cannot be greater than the + * control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).. + * + * @param orchestratorVersion The version of Kubernetes specified by the user. + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) + * are supported. When <major.minor> is specified, the latest supported GA patch version is chosen + * automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. + * 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best + * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The + * node pool version must have the same major version as the control plane. The node pool minor version + * must be within two minor versions of the control plane version. The node pool version cannot be + * greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * @return the next definition stage. + */ + WithCreate withOrchestratorVersion(String orchestratorVersion); + } + + /** The stage of the AgentPool definition allowing to specify upgradeSettings. */ + interface WithUpgradeSettings { + /** + * Specifies the upgradeSettings property: Settings for upgrading the agentpool. + * + * @param upgradeSettings Settings for upgrading the agentpool. + * @return the next definition stage. + */ + WithCreate withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings); + } + + /** The stage of the AgentPool definition allowing to specify powerState. */ + interface WithPowerState { + /** + * Specifies the powerState property: When an Agent Pool is first created it is initially Running. The Agent + * Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does + * not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is + * Succeeded. + * + * @param powerState When an Agent Pool is first created it is initially Running. The Agent Pool can be + * stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not + * accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is + * Succeeded. + * @return the next definition stage. + */ + WithCreate withPowerState(PowerState powerState); + } + + /** The stage of the AgentPool definition allowing to specify availabilityZones. */ + interface WithAvailabilityZones { + /** + * Specifies the availabilityZones property: The list of Availability zones to use for nodes. This can only + * be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.. + * + * @param availabilityZones The list of Availability zones to use for nodes. This can only be specified if + * the AgentPoolType property is 'VirtualMachineScaleSets'. + * @return the next definition stage. + */ + WithCreate withAvailabilityZones(List availabilityZones); + } + + /** The stage of the AgentPool definition allowing to specify enableNodePublicIp. */ + interface WithEnableNodePublicIp { + /** + * Specifies the enableNodePublicIp property: Whether each node is allocated its own public IP. + * + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A + * common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud + * virtual machine to minimize hops. For more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false.. + * + * @param enableNodePublicIp Whether each node is allocated its own public IP. + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP + * addresses. A common scenario is for gaming workloads, where a console needs to make a direct + * connection to a cloud virtual machine to minimize hops. For more information see [assigning a public + * IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * @return the next definition stage. + */ + WithCreate withEnableNodePublicIp(Boolean enableNodePublicIp); + } + + /** The stage of the AgentPool definition allowing to specify nodePublicIpPrefixId. */ + interface WithNodePublicIpPrefixId { + /** + * Specifies the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId The public IP prefix ID which VM nodes should use IPs from. + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * @return the next definition stage. + */ + WithCreate withNodePublicIpPrefixId(String nodePublicIpPrefixId); + } + + /** The stage of the AgentPool definition allowing to specify scaleSetPriority. */ + interface WithScaleSetPriority { + /** + * Specifies the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the + * default is 'Regular'.. + * + * @param scaleSetPriority The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * @return the next definition stage. + */ + WithCreate withScaleSetPriority(ScaleSetPriority scaleSetPriority); + } + + /** The stage of the AgentPool definition allowing to specify scaleSetEvictionPolicy. */ + interface WithScaleSetEvictionPolicy { + /** + * Specifies the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is + * 'Delete'.. + * + * @param scaleSetEvictionPolicy The Virtual Machine Scale Set eviction policy. + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is + * 'Delete'. + * @return the next definition stage. + */ + WithCreate withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy); + } + + /** The stage of the AgentPool definition allowing to specify spotMaxPrice. */ + interface WithSpotMaxPrice { + /** + * Specifies the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot + * instances. Possible values are any decimal value greater than zero or -1 which indicates default price to + * be up-to on-demand. + * + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay + * any on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @param spotMaxPrice The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to + * on-demand. + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to + * pay any on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * @return the next definition stage. + */ + WithCreate withSpotMaxPrice(Float spotMaxPrice); + } + + /** The stage of the AgentPool definition allowing to specify nodeLabels. */ + interface WithNodeLabels { + /** + * Specifies the nodeLabels property: The node labels to be persisted across all nodes in agent pool.. + * + * @param nodeLabels The node labels to be persisted across all nodes in agent pool. + * @return the next definition stage. + */ + WithCreate withNodeLabels(Map nodeLabels); + } + + /** The stage of the AgentPool definition allowing to specify nodeTaints. */ + interface WithNodeTaints { + /** + * Specifies the nodeTaints property: The taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule.. + * + * @param nodeTaints The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * @return the next definition stage. + */ + WithCreate withNodeTaints(List nodeTaints); + } + + /** The stage of the AgentPool definition allowing to specify proximityPlacementGroupId. */ + interface WithProximityPlacementGroupId { + /** + * Specifies the proximityPlacementGroupId property: The ID for Proximity Placement Group.. + * + * @param proximityPlacementGroupId The ID for Proximity Placement Group. + * @return the next definition stage. + */ + WithCreate withProximityPlacementGroupId(String proximityPlacementGroupId); + } + + /** The stage of the AgentPool definition allowing to specify kubeletConfig. */ + interface WithKubeletConfig { + /** + * Specifies the kubeletConfig property: Kubelet configurations of agent nodes. + * + *

The Kubelet configuration on the agent pool nodes.. + * + * @param kubeletConfig Kubelet configurations of agent nodes. + *

The Kubelet configuration on the agent pool nodes. + * @return the next definition stage. + */ + WithCreate withKubeletConfig(KubeletConfig kubeletConfig); + } + + /** The stage of the AgentPool definition allowing to specify linuxOSConfig. */ + interface WithLinuxOSConfig { + /** + * Specifies the linuxOSConfig property: OS configurations of Linux agent nodes. + * + *

The OS configuration of Linux agent nodes.. + * + * @param linuxOSConfig OS configurations of Linux agent nodes. + *

The OS configuration of Linux agent nodes. + * @return the next definition stage. + */ + WithCreate withLinuxOSConfig(LinuxOSConfig linuxOSConfig); + } + + /** The stage of the AgentPool definition allowing to specify enableEncryptionAtHost. */ + interface WithEnableEncryptionAtHost { + /** + * Specifies the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. + * + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @param enableEncryptionAtHost Whether to enable host based OS and data drive encryption. + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, + * see: https://docs.microsoft.com/azure/aks/enable-host-encryption. + * @return the next definition stage. + */ + WithCreate withEnableEncryptionAtHost(Boolean enableEncryptionAtHost); + } + + /** The stage of the AgentPool definition allowing to specify enableUltraSsd. */ + interface WithEnableUltraSsd { + /** + * Specifies the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd Whether to enable UltraSSD. + * @return the next definition stage. + */ + WithCreate withEnableUltraSsd(Boolean enableUltraSsd); + } + + /** The stage of the AgentPool definition allowing to specify enableFips. */ + interface WithEnableFips { + /** + * Specifies the enableFips property: Whether to use a FIPS-enabled OS. + * + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + * for more details.. + * + * @param enableFips Whether to use a FIPS-enabled OS. + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + * for more details. + * @return the next definition stage. + */ + WithCreate withEnableFips(Boolean enableFips); + } + + /** The stage of the AgentPool definition allowing to specify gpuInstanceProfile. */ + interface WithGpuInstanceProfile { + /** + * Specifies the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance + * profile for supported GPU VM SKU.. + * + * @param gpuInstanceProfile GPUInstanceProfile to be used to specify GPU MIG instance profile for supported + * GPU VM SKU. + * @return the next definition stage. + */ + WithCreate withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile); + } + + /** The stage of the AgentPool definition allowing to specify creationData. */ + interface WithCreationData { + /** + * Specifies the creationData property: CreationData to be used to specify the source Snapshot ID if the + * node pool will be created/upgraded using a snapshot.. + * + * @param creationData CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * @return the next definition stage. + */ + WithCreate withCreationData(CreationData creationData); + } + + /** The stage of the AgentPool definition allowing to specify hostGroupId. */ + interface WithHostGroupId { + /** + * Specifies the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to + * provision virtual machines from, used only in creation scenario and not allowed to changed once set. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).. + * + * @param hostGroupId The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * @return the next definition stage. + */ + WithCreate withHostGroupId(String hostGroupId); + } + } + + /** + * Begins update for the AgentPool resource. + * + * @return the stage of resource update. + */ + AgentPool.Update update(); + + /** The template for AgentPool update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithCount, + UpdateStages.WithVmSize, + UpdateStages.WithOsDiskSizeGB, + UpdateStages.WithOsDiskType, + UpdateStages.WithKubeletDiskType, + UpdateStages.WithWorkloadRuntime, + UpdateStages.WithVnetSubnetId, + UpdateStages.WithPodSubnetId, + UpdateStages.WithMaxPods, + UpdateStages.WithOsType, + UpdateStages.WithOsSku, + UpdateStages.WithMaxCount, + UpdateStages.WithMinCount, + UpdateStages.WithEnableAutoScaling, + UpdateStages.WithScaleDownMode, + UpdateStages.WithTypePropertiesType, + UpdateStages.WithMode, + UpdateStages.WithOrchestratorVersion, + UpdateStages.WithUpgradeSettings, + UpdateStages.WithPowerState, + UpdateStages.WithAvailabilityZones, + UpdateStages.WithEnableNodePublicIp, + UpdateStages.WithNodePublicIpPrefixId, + UpdateStages.WithScaleSetPriority, + UpdateStages.WithScaleSetEvictionPolicy, + UpdateStages.WithSpotMaxPrice, + UpdateStages.WithNodeLabels, + UpdateStages.WithNodeTaints, + UpdateStages.WithProximityPlacementGroupId, + UpdateStages.WithKubeletConfig, + UpdateStages.WithLinuxOSConfig, + UpdateStages.WithEnableEncryptionAtHost, + UpdateStages.WithEnableUltraSsd, + UpdateStages.WithEnableFips, + UpdateStages.WithGpuInstanceProfile, + UpdateStages.WithCreationData, + UpdateStages.WithHostGroupId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AgentPool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AgentPool apply(Context context); + } + + /** The AgentPool update stages. */ + interface UpdateStages { + /** The stage of the AgentPool update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: The tags to be persisted on the agent pool virtual machine scale set.. + * + * @param tags The tags to be persisted on the agent pool virtual machine scale set. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** The stage of the AgentPool update allowing to specify count. */ + interface WithCount { + /** + * Specifies the count property: Number of agents (VMs) to host docker containers. Allowed values must be in + * the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system + * pools. The default value is 1.. + * + * @param count Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 + * to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The + * default value is 1. + * @return the next definition stage. + */ + Update withCount(Integer count); + } + + /** The stage of the AgentPool update allowing to specify vmSize. */ + interface WithVmSize { + /** + * Specifies the vmSize property: The size of the agent pool VMs. + * + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, + * etc) pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize The size of the agent pool VMs. + *

VM size availability varies by region. If a node contains insufficient compute resources (memory, + * cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * @return the next definition stage. + */ + Update withVmSize(String vmSize); + } + + /** The stage of the AgentPool update allowing to specify osDiskSizeGB. */ + interface WithOsDiskSizeGB { + /** + * Specifies the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every + * machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + * the vmSize specified.. + * + * @param osDiskSizeGB OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize + * specified. + * @return the next definition stage. + */ + Update withOsDiskSizeGB(Integer osDiskSizeGB); + } + + /** The stage of the AgentPool update allowing to specify osDiskType. */ + interface WithOsDiskType { + /** + * Specifies the osDiskType property: The OS disk type to be used for machines in the agent pool. + * + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested + * OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information + * see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).. + * + * @param osDiskType The OS disk type to be used for machines in the agent pool. + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested + * OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more + * information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * @return the next definition stage. + */ + Update withOsDiskType(OSDiskType osDiskType); + } + + /** The stage of the AgentPool update allowing to specify kubeletDiskType. */ + interface WithKubeletDiskType { + /** + * Specifies the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage.. + * + * @param kubeletDiskType Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * @return the next definition stage. + */ + Update withKubeletDiskType(KubeletDiskType kubeletDiskType); + } + + /** The stage of the AgentPool update allowing to specify workloadRuntime. */ + interface WithWorkloadRuntime { + /** + * Specifies the workloadRuntime property: Determines the type of workload a node can run.. + * + * @param workloadRuntime Determines the type of workload a node can run. + * @return the next definition stage. + */ + Update withWorkloadRuntime(WorkloadRuntime workloadRuntime); + } + + /** The stage of the AgentPool update allowing to specify vnetSubnetId. */ + interface WithVnetSubnetId { + /** + * Specifies the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will + * join on startup. + * + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is + * specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId The ID of the subnet which agent pool nodes and optionally pods will join on startup. + *

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is + * specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * @return the next definition stage. + */ + Update withVnetSubnetId(String vnetSubnetId); + } + + /** The stage of the AgentPool update allowing to specify podSubnetId. */ + interface WithPodSubnetId { + /** + * Specifies the podSubnetId property: The ID of the subnet which pods will join when launched. + * + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). + * This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId The ID of the subnet which pods will join when launched. + *

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more + * details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * @return the next definition stage. + */ + Update withPodSubnetId(String podSubnetId); + } + + /** The stage of the AgentPool update allowing to specify maxPods. */ + interface WithMaxPods { + /** + * Specifies the maxPods property: The maximum number of pods that can run on a node.. + * + * @param maxPods The maximum number of pods that can run on a node. + * @return the next definition stage. + */ + Update withMaxPods(Integer maxPods); + } + + /** The stage of the AgentPool update allowing to specify osType. */ + interface WithOsType { + /** + * Specifies the osType property: OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux.. + * + * @param osType OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * @return the next definition stage. + */ + Update withOsType(OSType osType); + } + + /** The stage of the AgentPool update allowing to specify osSku. */ + interface WithOsSku { + /** + * Specifies the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if + * OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes + * >= 1.25 if OSType is Windows.. + * + * @param osSku Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The + * default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType + * is Windows. + * @return the next definition stage. + */ + Update withOsSku(Ossku osSku); + } + + /** The stage of the AgentPool update allowing to specify maxCount. */ + interface WithMaxCount { + /** + * Specifies the maxCount property: The maximum number of nodes for auto-scaling. + * + * @param maxCount The maximum number of nodes for auto-scaling. + * @return the next definition stage. + */ + Update withMaxCount(Integer maxCount); + } + + /** The stage of the AgentPool update allowing to specify minCount. */ + interface WithMinCount { + /** + * Specifies the minCount property: The minimum number of nodes for auto-scaling. + * + * @param minCount The minimum number of nodes for auto-scaling. + * @return the next definition stage. + */ + Update withMinCount(Integer minCount); + } + + /** The stage of the AgentPool update allowing to specify enableAutoScaling. */ + interface WithEnableAutoScaling { + /** + * Specifies the enableAutoScaling property: Whether to enable auto-scaler. + * + * @param enableAutoScaling Whether to enable auto-scaler. + * @return the next definition stage. + */ + Update withEnableAutoScaling(Boolean enableAutoScaling); + } + + /** The stage of the AgentPool update allowing to specify scaleDownMode. */ + interface WithScaleDownMode { + /** + * Specifies the scaleDownMode property: This also effects the cluster autoscaler behavior. If not + * specified, it defaults to Delete.. + * + * @param scaleDownMode This also effects the cluster autoscaler behavior. If not specified, it defaults to + * Delete. + * @return the next definition stage. + */ + Update withScaleDownMode(ScaleDownMode scaleDownMode); + } + + /** The stage of the AgentPool update allowing to specify typePropertiesType. */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: The type of Agent Pool.. + * + * @param typePropertiesType The type of Agent Pool. + * @return the next definition stage. + */ + Update withTypePropertiesType(AgentPoolType typePropertiesType); + } + + /** The stage of the AgentPool update allowing to specify mode. */ + interface WithMode { + /** + * Specifies the mode property: The mode of an agent pool. + * + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent + * pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @param mode The mode of an agent pool. + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on + * agent pool restrictions and best practices, see: + * https://docs.microsoft.com/azure/aks/use-system-pools. + * @return the next definition stage. + */ + Update withMode(AgentPoolMode mode); + } + + /** The stage of the AgentPool update allowing to specify orchestratorVersion. */ + interface WithOrchestratorVersion { + /** + * Specifies the orchestratorVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are + * supported. When <major.minor> is specified, the latest supported GA patch version is chosen + * automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. + * 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best + * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + * pool version must have the same major version as the control plane. The node pool minor version must be + * within two minor versions of the control plane version. The node pool version cannot be greater than the + * control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).. + * + * @param orchestratorVersion The version of Kubernetes specified by the user. + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) + * are supported. When <major.minor> is specified, the latest supported GA patch version is chosen + * automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. + * 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best + * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The + * node pool version must have the same major version as the control plane. The node pool minor version + * must be within two minor versions of the control plane version. The node pool version cannot be + * greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * @return the next definition stage. + */ + Update withOrchestratorVersion(String orchestratorVersion); + } + + /** The stage of the AgentPool update allowing to specify upgradeSettings. */ + interface WithUpgradeSettings { + /** + * Specifies the upgradeSettings property: Settings for upgrading the agentpool. + * + * @param upgradeSettings Settings for upgrading the agentpool. + * @return the next definition stage. + */ + Update withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings); + } + + /** The stage of the AgentPool update allowing to specify powerState. */ + interface WithPowerState { + /** + * Specifies the powerState property: When an Agent Pool is first created it is initially Running. The Agent + * Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does + * not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is + * Succeeded. + * + * @param powerState When an Agent Pool is first created it is initially Running. The Agent Pool can be + * stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not + * accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is + * Succeeded. + * @return the next definition stage. + */ + Update withPowerState(PowerState powerState); + } + + /** The stage of the AgentPool update allowing to specify availabilityZones. */ + interface WithAvailabilityZones { + /** + * Specifies the availabilityZones property: The list of Availability zones to use for nodes. This can only + * be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.. + * + * @param availabilityZones The list of Availability zones to use for nodes. This can only be specified if + * the AgentPoolType property is 'VirtualMachineScaleSets'. + * @return the next definition stage. + */ + Update withAvailabilityZones(List availabilityZones); + } + + /** The stage of the AgentPool update allowing to specify enableNodePublicIp. */ + interface WithEnableNodePublicIp { + /** + * Specifies the enableNodePublicIp property: Whether each node is allocated its own public IP. + * + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A + * common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud + * virtual machine to minimize hops. For more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false.. + * + * @param enableNodePublicIp Whether each node is allocated its own public IP. + *

Some scenarios may require nodes in a node pool to receive their own dedicated public IP + * addresses. A common scenario is for gaming workloads, where a console needs to make a direct + * connection to a cloud virtual machine to minimize hops. For more information see [assigning a public + * IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * @return the next definition stage. + */ + Update withEnableNodePublicIp(Boolean enableNodePublicIp); + } + + /** The stage of the AgentPool update allowing to specify nodePublicIpPrefixId. */ + interface WithNodePublicIpPrefixId { + /** + * Specifies the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId The public IP prefix ID which VM nodes should use IPs from. + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * @return the next definition stage. + */ + Update withNodePublicIpPrefixId(String nodePublicIpPrefixId); + } + + /** The stage of the AgentPool update allowing to specify scaleSetPriority. */ + interface WithScaleSetPriority { + /** + * Specifies the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the + * default is 'Regular'.. + * + * @param scaleSetPriority The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * @return the next definition stage. + */ + Update withScaleSetPriority(ScaleSetPriority scaleSetPriority); + } + + /** The stage of the AgentPool update allowing to specify scaleSetEvictionPolicy. */ + interface WithScaleSetEvictionPolicy { + /** + * Specifies the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is + * 'Delete'.. + * + * @param scaleSetEvictionPolicy The Virtual Machine Scale Set eviction policy. + *

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is + * 'Delete'. + * @return the next definition stage. + */ + Update withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy); + } + + /** The stage of the AgentPool update allowing to specify spotMaxPrice. */ + interface WithSpotMaxPrice { + /** + * Specifies the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot + * instances. Possible values are any decimal value greater than zero or -1 which indicates default price to + * be up-to on-demand. + * + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay + * any on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @param spotMaxPrice The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to + * on-demand. + *

Possible values are any decimal value greater than zero or -1 which indicates the willingness to + * pay any on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * @return the next definition stage. + */ + Update withSpotMaxPrice(Float spotMaxPrice); + } + + /** The stage of the AgentPool update allowing to specify nodeLabels. */ + interface WithNodeLabels { + /** + * Specifies the nodeLabels property: The node labels to be persisted across all nodes in agent pool.. + * + * @param nodeLabels The node labels to be persisted across all nodes in agent pool. + * @return the next definition stage. + */ + Update withNodeLabels(Map nodeLabels); + } + + /** The stage of the AgentPool update allowing to specify nodeTaints. */ + interface WithNodeTaints { + /** + * Specifies the nodeTaints property: The taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule.. + * + * @param nodeTaints The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * @return the next definition stage. + */ + Update withNodeTaints(List nodeTaints); + } + + /** The stage of the AgentPool update allowing to specify proximityPlacementGroupId. */ + interface WithProximityPlacementGroupId { + /** + * Specifies the proximityPlacementGroupId property: The ID for Proximity Placement Group.. + * + * @param proximityPlacementGroupId The ID for Proximity Placement Group. + * @return the next definition stage. + */ + Update withProximityPlacementGroupId(String proximityPlacementGroupId); + } + + /** The stage of the AgentPool update allowing to specify kubeletConfig. */ + interface WithKubeletConfig { + /** + * Specifies the kubeletConfig property: Kubelet configurations of agent nodes. + * + *

The Kubelet configuration on the agent pool nodes.. + * + * @param kubeletConfig Kubelet configurations of agent nodes. + *

The Kubelet configuration on the agent pool nodes. + * @return the next definition stage. + */ + Update withKubeletConfig(KubeletConfig kubeletConfig); + } + + /** The stage of the AgentPool update allowing to specify linuxOSConfig. */ + interface WithLinuxOSConfig { + /** + * Specifies the linuxOSConfig property: OS configurations of Linux agent nodes. + * + *

The OS configuration of Linux agent nodes.. + * + * @param linuxOSConfig OS configurations of Linux agent nodes. + *

The OS configuration of Linux agent nodes. + * @return the next definition stage. + */ + Update withLinuxOSConfig(LinuxOSConfig linuxOSConfig); + } + + /** The stage of the AgentPool update allowing to specify enableEncryptionAtHost. */ + interface WithEnableEncryptionAtHost { + /** + * Specifies the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. + * + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @param enableEncryptionAtHost Whether to enable host based OS and data drive encryption. + *

This is only supported on certain VM sizes and in certain Azure regions. For more information, + * see: https://docs.microsoft.com/azure/aks/enable-host-encryption. + * @return the next definition stage. + */ + Update withEnableEncryptionAtHost(Boolean enableEncryptionAtHost); + } + + /** The stage of the AgentPool update allowing to specify enableUltraSsd. */ + interface WithEnableUltraSsd { + /** + * Specifies the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd Whether to enable UltraSSD. + * @return the next definition stage. + */ + Update withEnableUltraSsd(Boolean enableUltraSsd); + } + + /** The stage of the AgentPool update allowing to specify enableFips. */ + interface WithEnableFips { + /** + * Specifies the enableFips property: Whether to use a FIPS-enabled OS. + * + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + * for more details.. + * + * @param enableFips Whether to use a FIPS-enabled OS. + *

See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + * for more details. + * @return the next definition stage. + */ + Update withEnableFips(Boolean enableFips); + } + + /** The stage of the AgentPool update allowing to specify gpuInstanceProfile. */ + interface WithGpuInstanceProfile { + /** + * Specifies the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance + * profile for supported GPU VM SKU.. + * + * @param gpuInstanceProfile GPUInstanceProfile to be used to specify GPU MIG instance profile for supported + * GPU VM SKU. + * @return the next definition stage. + */ + Update withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile); + } + + /** The stage of the AgentPool update allowing to specify creationData. */ + interface WithCreationData { + /** + * Specifies the creationData property: CreationData to be used to specify the source Snapshot ID if the + * node pool will be created/upgraded using a snapshot.. + * + * @param creationData CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * @return the next definition stage. + */ + Update withCreationData(CreationData creationData); + } + + /** The stage of the AgentPool update allowing to specify hostGroupId. */ + interface WithHostGroupId { + /** + * Specifies the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to + * provision virtual machines from, used only in creation scenario and not allowed to changed once set. + * + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).. + * + * @param hostGroupId The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. + *

This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * @return the next definition stage. + */ + Update withHostGroupId(String hostGroupId); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AgentPool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AgentPool refresh(Context context); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @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 response. + */ + AgentPool upgradeNodeImageVersion(); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @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 response. + */ + AgentPool upgradeNodeImageVersion(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersions.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersions.java new file mode 100644 index 0000000000000..85f0ce73f3d4c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersions.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import java.util.List; + +/** An immutable client-side representation of AgentPoolAvailableVersions. */ +public interface AgentPoolAvailableVersions { + /** + * Gets the id property: The ID of the agent pool version list. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the agent pool version list. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Type of the agent pool version list. + * + * @return the type value. + */ + String type(); + + /** + * Gets the agentPoolVersions property: List of versions available for agent pool. + * + * @return the agentPoolVersions value. + */ + List agentPoolVersions(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner + * object. + * + * @return the inner object. + */ + AgentPoolAvailableVersionsInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java new file mode 100644 index 0000000000000..96a2892f2aad6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem model. */ +@Fluent +public final class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem { + /* + * Whether this version is the default agent pool version. + */ + @JsonProperty(value = "default") + private Boolean defaultProperty; + + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** Creates an instance of AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. */ + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() { + } + + /** + * Get the defaultProperty property: Whether this version is the default agent pool version. + * + * @return the defaultProperty value. + */ + public Boolean defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: Whether this version is the default agent pool version. + * + * @param defaultProperty the defaultProperty value to set. + * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. + */ + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withDefaultProperty(Boolean defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. + */ + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the isPreview property: Whether Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. + */ + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolListResult.java new file mode 100644 index 0000000000000..641654139c71c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List Agent Pools operation. */ +@Fluent +public final class AgentPoolListResult { + /* + * The list of agent pools. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of agent pool results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of AgentPoolListResult class. */ + public AgentPoolListResult() { + } + + /** + * Get the value property: The list of agent pools. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of agent pools. + * + * @param value the value value to set. + * @return the AgentPoolListResult object itself. + */ + public AgentPoolListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of agent pool results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolMode.java new file mode 100644 index 0000000000000..b76e02f049965 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolMode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The mode of an agent pool. + * + *

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool + * restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. + */ +public final class AgentPoolMode extends ExpandableStringEnum { + /** Static value System for AgentPoolMode. */ + public static final AgentPoolMode SYSTEM = fromString("System"); + + /** Static value User for AgentPoolMode. */ + public static final AgentPoolMode USER = fromString("User"); + + /** + * Creates a new instance of AgentPoolMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AgentPoolMode() { + } + + /** + * Creates or finds a AgentPoolMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentPoolMode. + */ + @JsonCreator + public static AgentPoolMode fromString(String name) { + return fromString(name, AgentPoolMode.class); + } + + /** + * Gets known AgentPoolMode values. + * + * @return known AgentPoolMode values. + */ + public static Collection values() { + return values(AgentPoolMode.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolType.java new file mode 100644 index 0000000000000..638090288a2f7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type of Agent Pool. */ +public final class AgentPoolType extends ExpandableStringEnum { + /** Static value VirtualMachineScaleSets for AgentPoolType. */ + public static final AgentPoolType VIRTUAL_MACHINE_SCALE_SETS = fromString("VirtualMachineScaleSets"); + + /** Static value AvailabilitySet for AgentPoolType. */ + public static final AgentPoolType AVAILABILITY_SET = fromString("AvailabilitySet"); + + /** + * Creates a new instance of AgentPoolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AgentPoolType() { + } + + /** + * Creates or finds a AgentPoolType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentPoolType. + */ + @JsonCreator + public static AgentPoolType fromString(String name) { + return fromString(name, AgentPoolType.class); + } + + /** + * Gets known AgentPoolType values. + * + * @return known AgentPoolType values. + */ + public static Collection values() { + return values(AgentPoolType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfile.java new file mode 100644 index 0000000000000..3a464190aa750 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfile.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import java.util.List; + +/** An immutable client-side representation of AgentPoolUpgradeProfile. */ +public interface AgentPoolUpgradeProfile { + /** + * Gets the id property: The ID of the agent pool upgrade profile. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the agent pool upgrade profile. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the agent pool upgrade profile. + * + * @return the type value. + */ + String type(); + + /** + * Gets the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * Gets the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + OSType osType(); + + /** + * Gets the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @return the upgrades value. + */ + List upgrades(); + + /** + * Gets the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @return the latestNodeImageVersion value. + */ + String latestNodeImageVersion(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner + * object. + * + * @return the inner object. + */ + AgentPoolUpgradeProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java new file mode 100644 index 0000000000000..a86bdab2725a5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AgentPoolUpgradeProfilePropertiesUpgradesItem model. */ +@Fluent +public final class AgentPoolUpgradeProfilePropertiesUpgradesItem { + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether the Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** Creates an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem class. */ + public AgentPoolUpgradeProfilePropertiesUpgradesItem() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. + */ + public AgentPoolUpgradeProfilePropertiesUpgradesItem withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the isPreview property: Whether the Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether the Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. + */ + public AgentPoolUpgradeProfilePropertiesUpgradesItem withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeSettings.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeSettings.java new file mode 100644 index 0000000000000..3a16e8a42e53e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeSettings.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Settings for upgrading an agentpool. */ +@Fluent +public final class AgentPoolUpgradeSettings { + /* + * The maximum number or percentage of nodes that are surged during upgrade. + * + * This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it + * is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are + * rounded up. If not specified, the default is 1. For more information, including best practices, see: + * https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + */ + @JsonProperty(value = "maxSurge") + private String maxSurge; + + /* + * The drain timeout for a node + * + * The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction + * wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not + * specified, the default is 30 minutes. + */ + @JsonProperty(value = "drainTimeoutInMinutes") + private Integer drainTimeoutInMinutes; + + /** Creates an instance of AgentPoolUpgradeSettings class. */ + public AgentPoolUpgradeSettings() { + } + + /** + * Get the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade. + * + *

This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it + * is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are + * rounded up. If not specified, the default is 1. For more information, including best practices, see: + * https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + * + * @return the maxSurge value. + */ + public String maxSurge() { + return this.maxSurge; + } + + /** + * Set the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade. + * + *

This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it + * is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are + * rounded up. If not specified, the default is 1. For more information, including best practices, see: + * https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + * + * @param maxSurge the maxSurge value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withMaxSurge(String maxSurge) { + this.maxSurge = maxSurge; + return this; + } + + /** + * Get the drainTimeoutInMinutes property: The drain timeout for a node + * + *

The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction + * wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not + * specified, the default is 30 minutes. + * + * @return the drainTimeoutInMinutes value. + */ + public Integer drainTimeoutInMinutes() { + return this.drainTimeoutInMinutes; + } + + /** + * Set the drainTimeoutInMinutes property: The drain timeout for a node + * + *

The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction + * wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not + * specified, the default is 30 minutes. + * + * @param drainTimeoutInMinutes the drainTimeoutInMinutes value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes) { + this.drainTimeoutInMinutes = drainTimeoutInMinutes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPools.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPools.java new file mode 100644 index 0000000000000..bedf336d442e1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPools.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of AgentPools. */ +public interface AgentPools { + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Aborts last operation running on agent pool. + * + *

Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state + * and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool. + */ + AgentPool get(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response}. + */ + Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool. + */ + AgentPoolUpgradeProfile getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response}. + */ + Response getAvailableAgentPoolVersionsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + *

See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for + * more details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool. + */ + AgentPoolAvailableVersions getAvailableAgentPoolVersions(String resourceGroupName, String resourceName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 response. + */ + AgentPool upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + *

Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 response. + */ + AgentPool upgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets the specified managed cluster agent pool. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified managed cluster agent pool along with {@link Response}. + */ + AgentPool getById(String id); + + /** + * Gets the specified managed cluster agent pool. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified managed cluster agent pool along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AgentPool resource. + * + * @param name resource name. + * @return the first stage of the new AgentPool definition. + */ + AgentPool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AzureKeyVaultKms.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AzureKeyVaultKms.java new file mode 100644 index 0000000000000..bc60a29dba3f9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AzureKeyVaultKms.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Key Vault key management service settings for the security profile. */ +@Fluent +public final class AzureKeyVaultKms { + /* + * Whether to enable Azure Key Vault key management service. The default is false. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Identifier of Azure Key Vault key. See [key identifier + * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + * for more details. When Azure Key Vault key management service is enabled, this field is required and must be a + * valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. + */ + @JsonProperty(value = "keyId") + private String keyId; + + /* + * Network access of the key vault + * + * Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows + * public access from all networks. `Private` means the key vault disables public access and enables private link. + * The default value is `Public`. + */ + @JsonProperty(value = "keyVaultNetworkAccess") + private KeyVaultNetworkAccessTypes keyVaultNetworkAccess; + + /* + * Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid + * resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + */ + @JsonProperty(value = "keyVaultResourceId") + private String keyVaultResourceId; + + /** Creates an instance of AzureKeyVaultKms class. */ + public AzureKeyVaultKms() { + } + + /** + * Get the enabled property: Whether to enable Azure Key Vault key management service. The default is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Azure Key Vault key management service. The default is false. + * + * @param enabled the enabled value to set. + * @return the AzureKeyVaultKms object itself. + */ + public AzureKeyVaultKms withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the keyId property: Identifier of Azure Key Vault key. See [key identifier + * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + * for more details. When Azure Key Vault key management service is enabled, this field is required and must be a + * valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. + * + * @return the keyId value. + */ + public String keyId() { + return this.keyId; + } + + /** + * Set the keyId property: Identifier of Azure Key Vault key. See [key identifier + * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + * for more details. When Azure Key Vault key management service is enabled, this field is required and must be a + * valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. + * + * @param keyId the keyId value to set. + * @return the AzureKeyVaultKms object itself. + */ + public AzureKeyVaultKms withKeyId(String keyId) { + this.keyId = keyId; + return this; + } + + /** + * Get the keyVaultNetworkAccess property: Network access of the key vault + * + *

Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault + * allows public access from all networks. `Private` means the key vault disables public access and enables private + * link. The default value is `Public`. + * + * @return the keyVaultNetworkAccess value. + */ + public KeyVaultNetworkAccessTypes keyVaultNetworkAccess() { + return this.keyVaultNetworkAccess; + } + + /** + * Set the keyVaultNetworkAccess property: Network access of the key vault + * + *

Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault + * allows public access from all networks. `Private` means the key vault disables public access and enables private + * link. The default value is `Public`. + * + * @param keyVaultNetworkAccess the keyVaultNetworkAccess value to set. + * @return the AzureKeyVaultKms object itself. + */ + public AzureKeyVaultKms withKeyVaultNetworkAccess(KeyVaultNetworkAccessTypes keyVaultNetworkAccess) { + this.keyVaultNetworkAccess = keyVaultNetworkAccess; + return this; + } + + /** + * Get the keyVaultResourceId property: Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this + * field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + * + * @return the keyVaultResourceId value. + */ + public String keyVaultResourceId() { + return this.keyVaultResourceId; + } + + /** + * Set the keyVaultResourceId property: Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this + * field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + * + * @param keyVaultResourceId the keyVaultResourceId value to set. + * @return the AzureKeyVaultKms object itself. + */ + public AzureKeyVaultKms withKeyVaultResourceId(String keyVaultResourceId) { + this.keyVaultResourceId = keyVaultResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ClusterUpgradeSettings.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ClusterUpgradeSettings.java new file mode 100644 index 0000000000000..593b095b60623 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ClusterUpgradeSettings.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Settings for upgrading a cluster. */ +@Fluent +public final class ClusterUpgradeSettings { + /* + * Settings for overrides. + */ + @JsonProperty(value = "overrideSettings") + private UpgradeOverrideSettings overrideSettings; + + /** Creates an instance of ClusterUpgradeSettings class. */ + public ClusterUpgradeSettings() { + } + + /** + * Get the overrideSettings property: Settings for overrides. + * + * @return the overrideSettings value. + */ + public UpgradeOverrideSettings overrideSettings() { + return this.overrideSettings; + } + + /** + * Set the overrideSettings property: Settings for overrides. + * + * @param overrideSettings the overrideSettings value to set. + * @return the ClusterUpgradeSettings object itself. + */ + public ClusterUpgradeSettings withOverrideSettings(UpgradeOverrideSettings overrideSettings) { + this.overrideSettings = overrideSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (overrideSettings() != null) { + overrideSettings().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Code.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Code.java new file mode 100644 index 0000000000000..1b01a961814f2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Code.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Tells whether the cluster is Running or Stopped. */ +public final class Code extends ExpandableStringEnum { + /** Static value Running for Code. */ + public static final Code RUNNING = fromString("Running"); + + /** Static value Stopped for Code. */ + public static final Code STOPPED = fromString("Stopped"); + + /** + * Creates a new instance of Code value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Code() { + } + + /** + * Creates or finds a Code from its string representation. + * + * @param name a name to look for. + * @return the corresponding Code. + */ + @JsonCreator + public static Code fromString(String name) { + return fromString(name, Code.class); + } + + /** + * Gets known Code values. + * + * @return known Code values. + */ + public static Collection values() { + return values(Code.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CompatibleVersions.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CompatibleVersions.java new file mode 100644 index 0000000000000..ab963be46dcd8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CompatibleVersions.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Version information about a product/service that is compatible with a service mesh revision. */ +@Fluent +public final class CompatibleVersions { + /* + * The product/service name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Product/service versions compatible with a service mesh add-on revision. + */ + @JsonProperty(value = "versions") + private List versions; + + /** Creates an instance of CompatibleVersions class. */ + public CompatibleVersions() { + } + + /** + * Get the name property: The product/service name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The product/service name. + * + * @param name the name value to set. + * @return the CompatibleVersions object itself. + */ + public CompatibleVersions withName(String name) { + this.name = name; + return this; + } + + /** + * Get the versions property: Product/service versions compatible with a service mesh add-on revision. + * + * @return the versions value. + */ + public List versions() { + return this.versions; + } + + /** + * Set the versions property: Product/service versions compatible with a service mesh add-on revision. + * + * @param versions the versions value to set. + * @return the CompatibleVersions object itself. + */ + public CompatibleVersions withVersions(List versions) { + this.versions = versions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ConnectionStatus.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ConnectionStatus.java new file mode 100644 index 0000000000000..9eb3111953337 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ConnectionStatus.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The private link service connection status. */ +public final class ConnectionStatus extends ExpandableStringEnum { + /** Static value Pending for ConnectionStatus. */ + public static final ConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for ConnectionStatus. */ + public static final ConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for ConnectionStatus. */ + public static final ConnectionStatus REJECTED = fromString("Rejected"); + + /** Static value Disconnected for ConnectionStatus. */ + public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates a new instance of ConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectionStatus() { + } + + /** + * Creates or finds a ConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectionStatus. + */ + @JsonCreator + public static ConnectionStatus fromString(String name) { + return fromString(name, ConnectionStatus.class); + } + + /** + * Gets known ConnectionStatus values. + * + * @return known ConnectionStatus values. + */ + public static Collection values() { + return values(ConnectionStatus.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceLinuxProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceLinuxProfile.java new file mode 100644 index 0000000000000..8d98e5ab1f9d5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceLinuxProfile.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Profile for Linux VMs in the container service cluster. */ +@Fluent +public final class ContainerServiceLinuxProfile { + /* + * The administrator username to use for Linux VMs. + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /* + * The SSH configuration for Linux-based VMs running on Azure. + */ + @JsonProperty(value = "ssh", required = true) + private ContainerServiceSshConfiguration ssh; + + /** Creates an instance of ContainerServiceLinuxProfile class. */ + public ContainerServiceLinuxProfile() { + } + + /** + * Get the adminUsername property: The administrator username to use for Linux VMs. + * + * @return the adminUsername value. + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the adminUsername property: The administrator username to use for Linux VMs. + * + * @param adminUsername the adminUsername value to set. + * @return the ContainerServiceLinuxProfile object itself. + */ + public ContainerServiceLinuxProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the ssh property: The SSH configuration for Linux-based VMs running on Azure. + * + * @return the ssh value. + */ + public ContainerServiceSshConfiguration ssh() { + return this.ssh; + } + + /** + * Set the ssh property: The SSH configuration for Linux-based VMs running on Azure. + * + * @param ssh the ssh value to set. + * @return the ContainerServiceLinuxProfile object itself. + */ + public ContainerServiceLinuxProfile withSsh(ContainerServiceSshConfiguration ssh) { + this.ssh = ssh; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (adminUsername() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property adminUsername in model ContainerServiceLinuxProfile")); + } + if (ssh() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ssh in model ContainerServiceLinuxProfile")); + } else { + ssh().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceLinuxProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfile.java new file mode 100644 index 0000000000000..17c565121358e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfile.java @@ -0,0 +1,479 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Profile of network configuration. */ +@Fluent +public final class ContainerServiceNetworkProfile { + /* + * Network plugin used for building the Kubernetes network. + */ + @JsonProperty(value = "networkPlugin") + private NetworkPlugin networkPlugin; + + /* + * The mode the network plugin should use. + */ + @JsonProperty(value = "networkPluginMode") + private NetworkPluginMode networkPluginMode; + + /* + * Network policy used for building the Kubernetes network. + */ + @JsonProperty(value = "networkPolicy") + private NetworkPolicy networkPolicy; + + /* + * The network mode Azure CNI is configured with. + * + * This cannot be specified if networkPlugin is anything other than 'azure'. + */ + @JsonProperty(value = "networkMode") + private NetworkMode networkMode; + + /* + * Network dataplane used in the Kubernetes cluster. + */ + @JsonProperty(value = "networkDataplane") + private NetworkDataplane networkDataplane; + + /* + * A CIDR notation IP range from which to assign pod IPs when kubenet is used. + */ + @JsonProperty(value = "podCidr") + private String podCidr; + + /* + * A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP + * ranges. + */ + @JsonProperty(value = "serviceCidr") + private String serviceCidr; + + /* + * An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range + * specified in serviceCidr. + */ + @JsonProperty(value = "dnsServiceIP") + private String dnsServiceIp; + + /* + * The outbound (egress) routing method. + * + * This can only be set at cluster creation time and cannot be changed later. For more information see [egress + * outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + */ + @JsonProperty(value = "outboundType") + private OutboundType outboundType; + + /* + * The load balancer sku for the managed cluster. + * + * The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) + * for more information about the differences between load balancer SKUs. + */ + @JsonProperty(value = "loadBalancerSku") + private LoadBalancerSku loadBalancerSku; + + /* + * Profile of the cluster load balancer. + */ + @JsonProperty(value = "loadBalancerProfile") + private ManagedClusterLoadBalancerProfile loadBalancerProfile; + + /* + * Profile of the cluster NAT gateway. + */ + @JsonProperty(value = "natGatewayProfile") + private ManagedClusterNatGatewayProfile natGatewayProfile; + + /* + * The CIDR notation IP ranges from which to assign pod IPs. + * + * One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is + * expected for dual-stack networking. + */ + @JsonProperty(value = "podCidrs") + private List podCidrs; + + /* + * The CIDR notation IP ranges from which to assign service cluster IPs. + * + * One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is + * expected for dual-stack networking. They must not overlap with any Subnet IP ranges. + */ + @JsonProperty(value = "serviceCidrs") + private List serviceCidrs; + + /* + * The IP families used to specify IP versions available to the cluster. + * + * IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is + * IPv4. For dual-stack, the expected values are IPv4 and IPv6. + */ + @JsonProperty(value = "ipFamilies") + private List ipFamilies; + + /** Creates an instance of ContainerServiceNetworkProfile class. */ + public ContainerServiceNetworkProfile() { + } + + /** + * Get the networkPlugin property: Network plugin used for building the Kubernetes network. + * + * @return the networkPlugin value. + */ + public NetworkPlugin networkPlugin() { + return this.networkPlugin; + } + + /** + * Set the networkPlugin property: Network plugin used for building the Kubernetes network. + * + * @param networkPlugin the networkPlugin value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkPlugin(NetworkPlugin networkPlugin) { + this.networkPlugin = networkPlugin; + return this; + } + + /** + * Get the networkPluginMode property: The mode the network plugin should use. + * + * @return the networkPluginMode value. + */ + public NetworkPluginMode networkPluginMode() { + return this.networkPluginMode; + } + + /** + * Set the networkPluginMode property: The mode the network plugin should use. + * + * @param networkPluginMode the networkPluginMode value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkPluginMode(NetworkPluginMode networkPluginMode) { + this.networkPluginMode = networkPluginMode; + return this; + } + + /** + * Get the networkPolicy property: Network policy used for building the Kubernetes network. + * + * @return the networkPolicy value. + */ + public NetworkPolicy networkPolicy() { + return this.networkPolicy; + } + + /** + * Set the networkPolicy property: Network policy used for building the Kubernetes network. + * + * @param networkPolicy the networkPolicy value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkPolicy(NetworkPolicy networkPolicy) { + this.networkPolicy = networkPolicy; + return this; + } + + /** + * Get the networkMode property: The network mode Azure CNI is configured with. + * + *

This cannot be specified if networkPlugin is anything other than 'azure'. + * + * @return the networkMode value. + */ + public NetworkMode networkMode() { + return this.networkMode; + } + + /** + * Set the networkMode property: The network mode Azure CNI is configured with. + * + *

This cannot be specified if networkPlugin is anything other than 'azure'. + * + * @param networkMode the networkMode value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkMode(NetworkMode networkMode) { + this.networkMode = networkMode; + return this; + } + + /** + * Get the networkDataplane property: Network dataplane used in the Kubernetes cluster. + * + * @return the networkDataplane value. + */ + public NetworkDataplane networkDataplane() { + return this.networkDataplane; + } + + /** + * Set the networkDataplane property: Network dataplane used in the Kubernetes cluster. + * + * @param networkDataplane the networkDataplane value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkDataplane(NetworkDataplane networkDataplane) { + this.networkDataplane = networkDataplane; + return this; + } + + /** + * Get the podCidr property: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + * + * @return the podCidr value. + */ + public String podCidr() { + return this.podCidr; + } + + /** + * Set the podCidr property: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + * + * @param podCidr the podCidr value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withPodCidr(String podCidr) { + this.podCidr = podCidr; + return this; + } + + /** + * Get the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not + * overlap with any Subnet IP ranges. + * + * @return the serviceCidr value. + */ + public String serviceCidr() { + return this.serviceCidr; + } + + /** + * Set the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not + * overlap with any Subnet IP ranges. + * + * @param serviceCidr the serviceCidr value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withServiceCidr(String serviceCidr) { + this.serviceCidr = serviceCidr; + return this; + } + + /** + * Get the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the + * Kubernetes service address range specified in serviceCidr. + * + * @return the dnsServiceIp value. + */ + public String dnsServiceIp() { + return this.dnsServiceIp; + } + + /** + * Set the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the + * Kubernetes service address range specified in serviceCidr. + * + * @param dnsServiceIp the dnsServiceIp value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withDnsServiceIp(String dnsServiceIp) { + this.dnsServiceIp = dnsServiceIp; + return this; + } + + /** + * Get the outboundType property: The outbound (egress) routing method. + * + *

This can only be set at cluster creation time and cannot be changed later. For more information see [egress + * outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + * + * @return the outboundType value. + */ + public OutboundType outboundType() { + return this.outboundType; + } + + /** + * Set the outboundType property: The outbound (egress) routing method. + * + *

This can only be set at cluster creation time and cannot be changed later. For more information see [egress + * outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + * + * @param outboundType the outboundType value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withOutboundType(OutboundType outboundType) { + this.outboundType = outboundType; + return this; + } + + /** + * Get the loadBalancerSku property: The load balancer sku for the managed cluster. + * + *

The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) + * for more information about the differences between load balancer SKUs. + * + * @return the loadBalancerSku value. + */ + public LoadBalancerSku loadBalancerSku() { + return this.loadBalancerSku; + } + + /** + * Set the loadBalancerSku property: The load balancer sku for the managed cluster. + * + *

The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) + * for more information about the differences between load balancer SKUs. + * + * @param loadBalancerSku the loadBalancerSku value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withLoadBalancerSku(LoadBalancerSku loadBalancerSku) { + this.loadBalancerSku = loadBalancerSku; + return this; + } + + /** + * Get the loadBalancerProfile property: Profile of the cluster load balancer. + * + * @return the loadBalancerProfile value. + */ + public ManagedClusterLoadBalancerProfile loadBalancerProfile() { + return this.loadBalancerProfile; + } + + /** + * Set the loadBalancerProfile property: Profile of the cluster load balancer. + * + * @param loadBalancerProfile the loadBalancerProfile value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withLoadBalancerProfile( + ManagedClusterLoadBalancerProfile loadBalancerProfile) { + this.loadBalancerProfile = loadBalancerProfile; + return this; + } + + /** + * Get the natGatewayProfile property: Profile of the cluster NAT gateway. + * + * @return the natGatewayProfile value. + */ + public ManagedClusterNatGatewayProfile natGatewayProfile() { + return this.natGatewayProfile; + } + + /** + * Set the natGatewayProfile property: Profile of the cluster NAT gateway. + * + * @param natGatewayProfile the natGatewayProfile value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNatGatewayProfile(ManagedClusterNatGatewayProfile natGatewayProfile) { + this.natGatewayProfile = natGatewayProfile; + return this; + } + + /** + * Get the podCidrs property: The CIDR notation IP ranges from which to assign pod IPs. + * + *

One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is + * expected for dual-stack networking. + * + * @return the podCidrs value. + */ + public List podCidrs() { + return this.podCidrs; + } + + /** + * Set the podCidrs property: The CIDR notation IP ranges from which to assign pod IPs. + * + *

One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is + * expected for dual-stack networking. + * + * @param podCidrs the podCidrs value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withPodCidrs(List podCidrs) { + this.podCidrs = podCidrs; + return this; + } + + /** + * Get the serviceCidrs property: The CIDR notation IP ranges from which to assign service cluster IPs. + * + *

One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is + * expected for dual-stack networking. They must not overlap with any Subnet IP ranges. + * + * @return the serviceCidrs value. + */ + public List serviceCidrs() { + return this.serviceCidrs; + } + + /** + * Set the serviceCidrs property: The CIDR notation IP ranges from which to assign service cluster IPs. + * + *

One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is + * expected for dual-stack networking. They must not overlap with any Subnet IP ranges. + * + * @param serviceCidrs the serviceCidrs value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withServiceCidrs(List serviceCidrs) { + this.serviceCidrs = serviceCidrs; + return this; + } + + /** + * Get the ipFamilies property: The IP families used to specify IP versions available to the cluster. + * + *

IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is + * IPv4. For dual-stack, the expected values are IPv4 and IPv6. + * + * @return the ipFamilies value. + */ + public List ipFamilies() { + return this.ipFamilies; + } + + /** + * Set the ipFamilies property: The IP families used to specify IP versions available to the cluster. + * + *

IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is + * IPv4. For dual-stack, the expected values are IPv4 and IPv6. + * + * @param ipFamilies the ipFamilies value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withIpFamilies(List ipFamilies) { + this.ipFamilies = ipFamilies; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (loadBalancerProfile() != null) { + loadBalancerProfile().validate(); + } + if (natGatewayProfile() != null) { + natGatewayProfile().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshConfiguration.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshConfiguration.java new file mode 100644 index 0000000000000..2893261652f14 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshConfiguration.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** SSH configuration for Linux-based VMs running on Azure. */ +@Fluent +public final class ContainerServiceSshConfiguration { + /* + * The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + */ + @JsonProperty(value = "publicKeys", required = true) + private List publicKeys; + + /** Creates an instance of ContainerServiceSshConfiguration class. */ + public ContainerServiceSshConfiguration() { + } + + /** + * Get the publicKeys property: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of + * 1 key may be specified. + * + * @return the publicKeys value. + */ + public List publicKeys() { + return this.publicKeys; + } + + /** + * Set the publicKeys property: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of + * 1 key may be specified. + * + * @param publicKeys the publicKeys value to set. + * @return the ContainerServiceSshConfiguration object itself. + */ + public ContainerServiceSshConfiguration withPublicKeys(List publicKeys) { + this.publicKeys = publicKeys; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicKeys() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property publicKeys in model ContainerServiceSshConfiguration")); + } else { + publicKeys().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceSshConfiguration.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshPublicKey.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshPublicKey.java new file mode 100644 index 0000000000000..47dd1f51c7b2c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshPublicKey.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Contains information about SSH certificate public key data. */ +@Fluent +public final class ContainerServiceSshPublicKey { + /* + * Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or + * without headers. + */ + @JsonProperty(value = "keyData", required = true) + private String keyData; + + /** Creates an instance of ContainerServiceSshPublicKey class. */ + public ContainerServiceSshPublicKey() { + } + + /** + * Get the keyData property: Certificate public key used to authenticate with VMs through SSH. The certificate must + * be in PEM format with or without headers. + * + * @return the keyData value. + */ + public String keyData() { + return this.keyData; + } + + /** + * Set the keyData property: Certificate public key used to authenticate with VMs through SSH. The certificate must + * be in PEM format with or without headers. + * + * @param keyData the keyData value to set. + * @return the ContainerServiceSshPublicKey object itself. + */ + public ContainerServiceSshPublicKey withKeyData(String keyData) { + this.keyData = keyData; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property keyData in model ContainerServiceSshPublicKey")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceSshPublicKey.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServices.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServices.java new file mode 100644 index 0000000000000..6ff6bb6aeab29 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServices.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ContainerServices. */ +public interface ContainerServices { + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response}. + */ + Response listOrchestratorsWithResponse( + String location, String resourceType, Context context); + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + *

Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription. + */ + OrchestratorVersionProfileListResult listOrchestrators(String location); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CreationData.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CreationData.java new file mode 100644 index 0000000000000..8355e2a3402a7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CreationData.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Data used when creating a target resource from a source resource. */ +@Fluent +public final class CreationData { + /* + * This is the ARM ID of the source object to be used to create the target object. + */ + @JsonProperty(value = "sourceResourceId") + private String sourceResourceId; + + /** Creates an instance of CreationData class. */ + public CreationData() { + } + + /** + * Get the sourceResourceId property: This is the ARM ID of the source object to be used to create the target + * object. + * + * @return the sourceResourceId value. + */ + public String sourceResourceId() { + return this.sourceResourceId; + } + + /** + * Set the sourceResourceId property: This is the ARM ID of the source object to be used to create the target + * object. + * + * @param sourceResourceId the sourceResourceId value to set. + * @return the CreationData object itself. + */ + public CreationData withSourceResourceId(String sourceResourceId) { + this.sourceResourceId = sourceResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResult.java new file mode 100644 index 0000000000000..b34350c86822a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The credential result response. */ +@Immutable +public final class CredentialResult { + /* + * The name of the credential. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private byte[] value; + + /** Creates an instance of CredentialResult class. */ + public CredentialResult() { + } + + /** + * Get the name property: The name of the credential. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: Base64-encoded Kubernetes configuration file. + * + * @return the value value. + */ + public byte[] value() { + return CoreUtils.clone(this.value); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResults.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResults.java new file mode 100644 index 0000000000000..0338da3749de6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResults.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import java.util.List; + +/** An immutable client-side representation of CredentialResults. */ +public interface CredentialResults { + /** + * Gets the kubeconfigs property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeconfigs value. + */ + List kubeconfigs(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner + * object. + * + * @return the inner object. + */ + CredentialResultsInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DailySchedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DailySchedule.java new file mode 100644 index 0000000000000..16c9ce7025268 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DailySchedule.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** For schedules like: 'recur every day' or 'recur every 3 days'. */ +@Fluent +public final class DailySchedule { + /* + * Specifies the number of days between each set of occurrences. + */ + @JsonProperty(value = "intervalDays", required = true) + private int intervalDays; + + /** Creates an instance of DailySchedule class. */ + public DailySchedule() { + } + + /** + * Get the intervalDays property: Specifies the number of days between each set of occurrences. + * + * @return the intervalDays value. + */ + public int intervalDays() { + return this.intervalDays; + } + + /** + * Set the intervalDays property: Specifies the number of days between each set of occurrences. + * + * @param intervalDays the intervalDays value to set. + * @return the DailySchedule object itself. + */ + public DailySchedule withIntervalDays(int intervalDays) { + this.intervalDays = intervalDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DateSpan.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DateSpan.java new file mode 100644 index 0000000000000..6ccf07010c388 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DateSpan.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; + +/** + * A date range. + * + *

For example, between '2022-12-23' and '2023-01-05'. + */ +@Fluent +public final class DateSpan { + /* + * The start date of the date span. + */ + @JsonProperty(value = "start", required = true) + private LocalDate start; + + /* + * The end date of the date span. + */ + @JsonProperty(value = "end", required = true) + private LocalDate end; + + /** Creates an instance of DateSpan class. */ + public DateSpan() { + } + + /** + * Get the start property: The start date of the date span. + * + * @return the start value. + */ + public LocalDate start() { + return this.start; + } + + /** + * Set the start property: The start date of the date span. + * + * @param start the start value to set. + * @return the DateSpan object itself. + */ + public DateSpan withStart(LocalDate start) { + this.start = start; + return this; + } + + /** + * Get the end property: The end date of the date span. + * + * @return the end value. + */ + public LocalDate end() { + return this.end; + } + + /** + * Set the end property: The end date of the date span. + * + * @param end the end value to set. + * @return the DateSpan object itself. + */ + public DateSpan withEnd(LocalDate end) { + this.end = end; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (start() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property start in model DateSpan")); + } + if (end() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property end in model DateSpan")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DateSpan.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DelegatedResource.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DelegatedResource.java new file mode 100644 index 0000000000000..b3c2c323a5989 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DelegatedResource.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** Delegated resource properties - internal use only. */ +@Fluent +public final class DelegatedResource { + /* + * The ARM resource id of the delegated resource - internal use only. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * The tenant id of the delegated resource - internal use only. + */ + @JsonProperty(value = "tenantId") + private UUID tenantId; + + /* + * The delegation id of the referral delegation (optional) - internal use only. + */ + @JsonProperty(value = "referralResource") + private String referralResource; + + /* + * The source resource location - internal use only. + */ + @JsonProperty(value = "location") + private String location; + + /** Creates an instance of DelegatedResource class. */ + public DelegatedResource() { + } + + /** + * Get the resourceId property: The ARM resource id of the delegated resource - internal use only. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The ARM resource id of the delegated resource - internal use only. + * + * @param resourceId the resourceId value to set. + * @return the DelegatedResource object itself. + */ + public DelegatedResource withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the tenantId property: The tenant id of the delegated resource - internal use only. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant id of the delegated resource - internal use only. + * + * @param tenantId the tenantId value to set. + * @return the DelegatedResource object itself. + */ + public DelegatedResource withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the referralResource property: The delegation id of the referral delegation (optional) - internal use only. + * + * @return the referralResource value. + */ + public String referralResource() { + return this.referralResource; + } + + /** + * Set the referralResource property: The delegation id of the referral delegation (optional) - internal use only. + * + * @param referralResource the referralResource value to set. + * @return the DelegatedResource object itself. + */ + public DelegatedResource withReferralResource(String referralResource) { + this.referralResource = referralResource; + return this; + } + + /** + * Get the location property: The source resource location - internal use only. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The source resource location - internal use only. + * + * @param location the location value to set. + * @return the DelegatedResource object itself. + */ + public DelegatedResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDependency.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDependency.java new file mode 100644 index 0000000000000..dc65e15551c33 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDependency.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A domain name that AKS agent nodes are reaching at. */ +@Fluent +public final class EndpointDependency { + /* + * The domain name of the dependency. + */ + @JsonProperty(value = "domainName") + private String domainName; + + /* + * The Ports and Protocols used when connecting to domainName. + */ + @JsonProperty(value = "endpointDetails") + private List endpointDetails; + + /** Creates an instance of EndpointDependency class. */ + public EndpointDependency() { + } + + /** + * Get the domainName property: The domain name of the dependency. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Set the domainName property: The domain name of the dependency. + * + * @param domainName the domainName value to set. + * @return the EndpointDependency object itself. + */ + public EndpointDependency withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get the endpointDetails property: The Ports and Protocols used when connecting to domainName. + * + * @return the endpointDetails value. + */ + public List endpointDetails() { + return this.endpointDetails; + } + + /** + * Set the endpointDetails property: The Ports and Protocols used when connecting to domainName. + * + * @param endpointDetails the endpointDetails value to set. + * @return the EndpointDependency object itself. + */ + public EndpointDependency withEndpointDetails(List endpointDetails) { + this.endpointDetails = endpointDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpointDetails() != null) { + endpointDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDetail.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDetail.java new file mode 100644 index 0000000000000..b5aabf7cb757b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDetail.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** connect information from the AKS agent nodes to a single endpoint. */ +@Fluent +public final class EndpointDetail { + /* + * An IP Address that Domain Name currently resolves to. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /* + * The port an endpoint is connected to. + */ + @JsonProperty(value = "port") + private Integer port; + + /* + * The protocol used for connection + */ + @JsonProperty(value = "protocol") + private String protocol; + + /* + * Description of the detail + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of EndpointDetail class. */ + public EndpointDetail() { + } + + /** + * Get the ipAddress property: An IP Address that Domain Name currently resolves to. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: An IP Address that Domain Name currently resolves to. + * + * @param ipAddress the ipAddress value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the port property: The port an endpoint is connected to. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: The port an endpoint is connected to. + * + * @param port the port value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the protocol property: The protocol used for connection. + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The protocol used for connection. + * + * @param protocol the protocol value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the description property: Description of the detail. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the detail. + * + * @param description the description value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Expander.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Expander.java new file mode 100644 index 0000000000000..d05e906dda03e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Expander.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The expander to use when scaling up + * + *

If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for + * more information. + */ +public final class Expander extends ExpandableStringEnum { + /** Static value least-waste for Expander. */ + public static final Expander LEAST_WASTE = fromString("least-waste"); + + /** Static value most-pods for Expander. */ + public static final Expander MOST_PODS = fromString("most-pods"); + + /** Static value priority for Expander. */ + public static final Expander PRIORITY = fromString("priority"); + + /** Static value random for Expander. */ + public static final Expander RANDOM = fromString("random"); + + /** + * Creates a new instance of Expander value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Expander() { + } + + /** + * Creates or finds a Expander from its string representation. + * + * @param name a name to look for. + * @return the corresponding Expander. + */ + @JsonCreator + public static Expander fromString(String name) { + return fromString(name, Expander.class); + } + + /** + * Gets known Expander values. + * + * @return known Expander values. + */ + public static Collection values() { + return values(Expander.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocation.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocation.java new file mode 100644 index 0000000000000..8e4651dd59480 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocation.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The complex type of the extended location. */ +@Fluent +public final class ExtendedLocation { + /* + * The name of the extended location. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the extended location. + */ + @JsonProperty(value = "type") + private ExtendedLocationTypes type; + + /** Creates an instance of ExtendedLocation class. */ + public ExtendedLocation() { + } + + /** + * Get the name property: The name of the extended location. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the extended location. + * + * @param name the name value to set. + * @return the ExtendedLocation object itself. + */ + public ExtendedLocation withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the extended location. + * + * @return the type value. + */ + public ExtendedLocationTypes type() { + return this.type; + } + + /** + * Set the type property: The type of the extended location. + * + * @param type the type value to set. + * @return the ExtendedLocation object itself. + */ + public ExtendedLocation withType(ExtendedLocationTypes type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocationTypes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocationTypes.java new file mode 100644 index 0000000000000..a945dc5987ebb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocationTypes.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type of extendedLocation. */ +public final class ExtendedLocationTypes extends ExpandableStringEnum { + /** Static value EdgeZone for ExtendedLocationTypes. */ + public static final ExtendedLocationTypes EDGE_ZONE = fromString("EdgeZone"); + + /** + * Creates a new instance of ExtendedLocationTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtendedLocationTypes() { + } + + /** + * Creates or finds a ExtendedLocationTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtendedLocationTypes. + */ + @JsonCreator + public static ExtendedLocationTypes fromString(String name) { + return fromString(name, ExtendedLocationTypes.class); + } + + /** + * Gets known ExtendedLocationTypes values. + * + * @return known ExtendedLocationTypes values. + */ + public static Collection values() { + return values(ExtendedLocationTypes.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Format.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Format.java new file mode 100644 index 0000000000000..07471c782ec0d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Format.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Format. */ +public final class Format extends ExpandableStringEnum { + /** Static value azure for Format. */ + public static final Format AZURE = fromString("azure"); + + /** Static value exec for Format. */ + public static final Format EXEC = fromString("exec"); + + /** + * Creates a new instance of Format value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Format() { + } + + /** + * Creates or finds a Format from its string representation. + * + * @param name a name to look for. + * @return the corresponding Format. + */ + @JsonCreator + public static Format fromString(String name) { + return fromString(name, Format.class); + } + + /** + * Gets known Format values. + * + * @return known Format values. + */ + public static Collection values() { + return values(Format.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GpuInstanceProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GpuInstanceProfile.java new file mode 100644 index 0000000000000..63389cf6645d0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GpuInstanceProfile.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. */ +public final class GpuInstanceProfile extends ExpandableStringEnum { + /** Static value MIG1g for GpuInstanceProfile. */ + public static final GpuInstanceProfile MIG1G = fromString("MIG1g"); + + /** Static value MIG2g for GpuInstanceProfile. */ + public static final GpuInstanceProfile MIG2G = fromString("MIG2g"); + + /** Static value MIG3g for GpuInstanceProfile. */ + public static final GpuInstanceProfile MIG3G = fromString("MIG3g"); + + /** Static value MIG4g for GpuInstanceProfile. */ + public static final GpuInstanceProfile MIG4G = fromString("MIG4g"); + + /** Static value MIG7g for GpuInstanceProfile. */ + public static final GpuInstanceProfile MIG7G = fromString("MIG7g"); + + /** + * Creates a new instance of GpuInstanceProfile value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GpuInstanceProfile() { + } + + /** + * Creates or finds a GpuInstanceProfile from its string representation. + * + * @param name a name to look for. + * @return the corresponding GpuInstanceProfile. + */ + @JsonCreator + public static GpuInstanceProfile fromString(String name) { + return fromString(name, GpuInstanceProfile.class); + } + + /** + * Gets known GpuInstanceProfile values. + * + * @return known GpuInstanceProfile values. + */ + public static Collection values() { + return values(GpuInstanceProfile.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpFamily.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpFamily.java new file mode 100644 index 0000000000000..384c3de6c1fbe --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpFamily.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The IP version to use for cluster networking and IP assignment. */ +public final class IpFamily extends ExpandableStringEnum { + /** Static value IPv4 for IpFamily. */ + public static final IpFamily IPV4 = fromString("IPv4"); + + /** Static value IPv6 for IpFamily. */ + public static final IpFamily IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of IpFamily value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpFamily() { + } + + /** + * Creates or finds a IpFamily from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpFamily. + */ + @JsonCreator + public static IpFamily fromString(String name) { + return fromString(name, IpFamily.class); + } + + /** + * Gets known IpFamily values. + * + * @return known IpFamily values. + */ + public static Collection values() { + return values(IpFamily.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioCertificateAuthority.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioCertificateAuthority.java new file mode 100644 index 0000000000000..709122e86e312 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioCertificateAuthority.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as + * described here https://aka.ms/asm-plugin-ca. + */ +@Fluent +public final class IstioCertificateAuthority { + /* + * Plugin certificates information for Service Mesh. + */ + @JsonProperty(value = "plugin") + private IstioPluginCertificateAuthority plugin; + + /** Creates an instance of IstioCertificateAuthority class. */ + public IstioCertificateAuthority() { + } + + /** + * Get the plugin property: Plugin certificates information for Service Mesh. + * + * @return the plugin value. + */ + public IstioPluginCertificateAuthority plugin() { + return this.plugin; + } + + /** + * Set the plugin property: Plugin certificates information for Service Mesh. + * + * @param plugin the plugin value to set. + * @return the IstioCertificateAuthority object itself. + */ + public IstioCertificateAuthority withPlugin(IstioPluginCertificateAuthority plugin) { + this.plugin = plugin; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plugin() != null) { + plugin().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioComponents.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioComponents.java new file mode 100644 index 0000000000000..9e4cc24c10889 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioComponents.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Istio components configuration. */ +@Fluent +public final class IstioComponents { + /* + * Istio ingress gateways. + */ + @JsonProperty(value = "ingressGateways") + private List ingressGateways; + + /* + * Istio egress gateways. + */ + @JsonProperty(value = "egressGateways") + private List egressGateways; + + /** Creates an instance of IstioComponents class. */ + public IstioComponents() { + } + + /** + * Get the ingressGateways property: Istio ingress gateways. + * + * @return the ingressGateways value. + */ + public List ingressGateways() { + return this.ingressGateways; + } + + /** + * Set the ingressGateways property: Istio ingress gateways. + * + * @param ingressGateways the ingressGateways value to set. + * @return the IstioComponents object itself. + */ + public IstioComponents withIngressGateways(List ingressGateways) { + this.ingressGateways = ingressGateways; + return this; + } + + /** + * Get the egressGateways property: Istio egress gateways. + * + * @return the egressGateways value. + */ + public List egressGateways() { + return this.egressGateways; + } + + /** + * Set the egressGateways property: Istio egress gateways. + * + * @param egressGateways the egressGateways value to set. + * @return the IstioComponents object itself. + */ + public IstioComponents withEgressGateways(List egressGateways) { + this.egressGateways = egressGateways; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ingressGateways() != null) { + ingressGateways().forEach(e -> e.validate()); + } + if (egressGateways() != null) { + egressGateways().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioEgressGateway.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioEgressGateway.java new file mode 100644 index 0000000000000..586631c232942 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioEgressGateway.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Istio egress gateway configuration. */ +@Fluent +public final class IstioEgressGateway { + /* + * Whether to enable the egress gateway. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * NodeSelector for scheduling the egress gateway. + */ + @JsonProperty(value = "nodeSelector") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map nodeSelector; + + /** Creates an instance of IstioEgressGateway class. */ + public IstioEgressGateway() { + } + + /** + * Get the enabled property: Whether to enable the egress gateway. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable the egress gateway. + * + * @param enabled the enabled value to set. + * @return the IstioEgressGateway object itself. + */ + public IstioEgressGateway withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the nodeSelector property: NodeSelector for scheduling the egress gateway. + * + * @return the nodeSelector value. + */ + public Map nodeSelector() { + return this.nodeSelector; + } + + /** + * Set the nodeSelector property: NodeSelector for scheduling the egress gateway. + * + * @param nodeSelector the nodeSelector value to set. + * @return the IstioEgressGateway object itself. + */ + public IstioEgressGateway withNodeSelector(Map nodeSelector) { + this.nodeSelector = nodeSelector; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGateway.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGateway.java new file mode 100644 index 0000000000000..e47e89df639cb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGateway.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Istio ingress gateway configuration. For now, we support up to one external ingress gateway named + * `aks-istio-ingressgateway-external` and one internal ingress gateway named `aks-istio-ingressgateway-internal`. + */ +@Fluent +public final class IstioIngressGateway { + /* + * Mode of an ingress gateway. + */ + @JsonProperty(value = "mode", required = true) + private IstioIngressGatewayMode mode; + + /* + * Whether to enable the ingress gateway. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** Creates an instance of IstioIngressGateway class. */ + public IstioIngressGateway() { + } + + /** + * Get the mode property: Mode of an ingress gateway. + * + * @return the mode value. + */ + public IstioIngressGatewayMode mode() { + return this.mode; + } + + /** + * Set the mode property: Mode of an ingress gateway. + * + * @param mode the mode value to set. + * @return the IstioIngressGateway object itself. + */ + public IstioIngressGateway withMode(IstioIngressGatewayMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the enabled property: Whether to enable the ingress gateway. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable the ingress gateway. + * + * @param enabled the enabled value to set. + * @return the IstioIngressGateway object itself. + */ + public IstioIngressGateway withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mode() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property mode in model IstioIngressGateway")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IstioIngressGateway.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGatewayMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGatewayMode.java new file mode 100644 index 0000000000000..cddcb68169bbb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGatewayMode.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Mode of an ingress gateway. */ +public final class IstioIngressGatewayMode extends ExpandableStringEnum { + /** Static value External for IstioIngressGatewayMode. */ + public static final IstioIngressGatewayMode EXTERNAL = fromString("External"); + + /** Static value Internal for IstioIngressGatewayMode. */ + public static final IstioIngressGatewayMode INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of IstioIngressGatewayMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IstioIngressGatewayMode() { + } + + /** + * Creates or finds a IstioIngressGatewayMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding IstioIngressGatewayMode. + */ + @JsonCreator + public static IstioIngressGatewayMode fromString(String name) { + return fromString(name, IstioIngressGatewayMode.class); + } + + /** + * Gets known IstioIngressGatewayMode values. + * + * @return known IstioIngressGatewayMode values. + */ + public static Collection values() { + return values(IstioIngressGatewayMode.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioPluginCertificateAuthority.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioPluginCertificateAuthority.java new file mode 100644 index 0000000000000..da13636b0b9e5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioPluginCertificateAuthority.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Plugin certificates information for Service Mesh. */ +@Fluent +public final class IstioPluginCertificateAuthority { + /* + * The resource ID of the Key Vault. + */ + @JsonProperty(value = "keyVaultId") + private String keyVaultId; + + /* + * Intermediate certificate object name in Azure Key Vault. + */ + @JsonProperty(value = "certObjectName") + private String certObjectName; + + /* + * Intermediate certificate private key object name in Azure Key Vault. + */ + @JsonProperty(value = "keyObjectName") + private String keyObjectName; + + /* + * Root certificate object name in Azure Key Vault. + */ + @JsonProperty(value = "rootCertObjectName") + private String rootCertObjectName; + + /* + * Certificate chain object name in Azure Key Vault. + */ + @JsonProperty(value = "certChainObjectName") + private String certChainObjectName; + + /** Creates an instance of IstioPluginCertificateAuthority class. */ + public IstioPluginCertificateAuthority() { + } + + /** + * Get the keyVaultId property: The resource ID of the Key Vault. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId property: The resource ID of the Key Vault. + * + * @param keyVaultId the keyVaultId value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the certObjectName property: Intermediate certificate object name in Azure Key Vault. + * + * @return the certObjectName value. + */ + public String certObjectName() { + return this.certObjectName; + } + + /** + * Set the certObjectName property: Intermediate certificate object name in Azure Key Vault. + * + * @param certObjectName the certObjectName value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withCertObjectName(String certObjectName) { + this.certObjectName = certObjectName; + return this; + } + + /** + * Get the keyObjectName property: Intermediate certificate private key object name in Azure Key Vault. + * + * @return the keyObjectName value. + */ + public String keyObjectName() { + return this.keyObjectName; + } + + /** + * Set the keyObjectName property: Intermediate certificate private key object name in Azure Key Vault. + * + * @param keyObjectName the keyObjectName value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withKeyObjectName(String keyObjectName) { + this.keyObjectName = keyObjectName; + return this; + } + + /** + * Get the rootCertObjectName property: Root certificate object name in Azure Key Vault. + * + * @return the rootCertObjectName value. + */ + public String rootCertObjectName() { + return this.rootCertObjectName; + } + + /** + * Set the rootCertObjectName property: Root certificate object name in Azure Key Vault. + * + * @param rootCertObjectName the rootCertObjectName value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withRootCertObjectName(String rootCertObjectName) { + this.rootCertObjectName = rootCertObjectName; + return this; + } + + /** + * Get the certChainObjectName property: Certificate chain object name in Azure Key Vault. + * + * @return the certChainObjectName value. + */ + public String certChainObjectName() { + return this.certChainObjectName; + } + + /** + * Set the certChainObjectName property: Certificate chain object name in Azure Key Vault. + * + * @param certChainObjectName the certChainObjectName value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withCertChainObjectName(String certChainObjectName) { + this.certChainObjectName = certChainObjectName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioServiceMesh.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioServiceMesh.java new file mode 100644 index 0000000000000..7f7f677e4e643 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioServiceMesh.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Istio service mesh configuration. */ +@Fluent +public final class IstioServiceMesh { + /* + * Istio components configuration. + */ + @JsonProperty(value = "components") + private IstioComponents components; + + /* + * Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as + * described here https://aka.ms/asm-plugin-ca + */ + @JsonProperty(value = "certificateAuthority") + private IstioCertificateAuthority certificateAuthority; + + /* + * The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When + * canary upgrade is in progress, this can only hold two consecutive values. For more information, see: + * https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + */ + @JsonProperty(value = "revisions") + private List revisions; + + /** Creates an instance of IstioServiceMesh class. */ + public IstioServiceMesh() { + } + + /** + * Get the components property: Istio components configuration. + * + * @return the components value. + */ + public IstioComponents components() { + return this.components; + } + + /** + * Set the components property: Istio components configuration. + * + * @param components the components value to set. + * @return the IstioServiceMesh object itself. + */ + public IstioServiceMesh withComponents(IstioComponents components) { + this.components = components; + return this; + } + + /** + * Get the certificateAuthority property: Istio Service Mesh Certificate Authority (CA) configuration. For now, we + * only support plugin certificates as described here https://aka.ms/asm-plugin-ca. + * + * @return the certificateAuthority value. + */ + public IstioCertificateAuthority certificateAuthority() { + return this.certificateAuthority; + } + + /** + * Set the certificateAuthority property: Istio Service Mesh Certificate Authority (CA) configuration. For now, we + * only support plugin certificates as described here https://aka.ms/asm-plugin-ca. + * + * @param certificateAuthority the certificateAuthority value to set. + * @return the IstioServiceMesh object itself. + */ + public IstioServiceMesh withCertificateAuthority(IstioCertificateAuthority certificateAuthority) { + this.certificateAuthority = certificateAuthority; + return this; + } + + /** + * Get the revisions property: The list of revisions of the Istio control plane. When an upgrade is not in progress, + * this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more + * information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade. + * + * @return the revisions value. + */ + public List revisions() { + return this.revisions; + } + + /** + * Set the revisions property: The list of revisions of the Istio control plane. When an upgrade is not in progress, + * this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more + * information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade. + * + * @param revisions the revisions value to set. + * @return the IstioServiceMesh object itself. + */ + public IstioServiceMesh withRevisions(List revisions) { + this.revisions = revisions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (components() != null) { + components().validate(); + } + if (certificateAuthority() != null) { + certificateAuthority().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KeyVaultNetworkAccessTypes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KeyVaultNetworkAccessTypes.java new file mode 100644 index 0000000000000..6c2817e70771b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KeyVaultNetworkAccessTypes.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Network access of the key vault + * + *

Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows + * public access from all networks. `Private` means the key vault disables public access and enables private link. The + * default value is `Public`. + */ +public final class KeyVaultNetworkAccessTypes extends ExpandableStringEnum { + /** Static value Public for KeyVaultNetworkAccessTypes. */ + public static final KeyVaultNetworkAccessTypes PUBLIC = fromString("Public"); + + /** Static value Private for KeyVaultNetworkAccessTypes. */ + public static final KeyVaultNetworkAccessTypes PRIVATE = fromString("Private"); + + /** + * Creates a new instance of KeyVaultNetworkAccessTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KeyVaultNetworkAccessTypes() { + } + + /** + * Creates or finds a KeyVaultNetworkAccessTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding KeyVaultNetworkAccessTypes. + */ + @JsonCreator + public static KeyVaultNetworkAccessTypes fromString(String name) { + return fromString(name, KeyVaultNetworkAccessTypes.class); + } + + /** + * Gets known KeyVaultNetworkAccessTypes values. + * + * @return known KeyVaultNetworkAccessTypes values. + */ + public static Collection values() { + return values(KeyVaultNetworkAccessTypes.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletConfig.java new file mode 100644 index 0000000000000..00940e73fd6ef --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletConfig.java @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Kubelet configurations of agent nodes. + * + *

See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more + * details. + */ +@Fluent +public final class KubeletConfig { + /* + * The CPU Manager policy to use. + * + * The default is 'none'. See [Kubernetes CPU management + * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + * for more information. Allowed values are 'none' and 'static'. + */ + @JsonProperty(value = "cpuManagerPolicy") + private String cpuManagerPolicy; + + /* + * If CPU CFS quota enforcement is enabled for containers that specify CPU limits. + * + * The default is true. + */ + @JsonProperty(value = "cpuCfsQuota") + private Boolean cpuCfsQuota; + + /* + * The CPU CFS quota period value. + * + * The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit + * suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + */ + @JsonProperty(value = "cpuCfsQuotaPeriod") + private String cpuCfsQuotaPeriod; + + /* + * The percent of disk usage after which image garbage collection is always run. + * + * To disable image garbage collection, set to 100. The default is 85% + */ + @JsonProperty(value = "imageGcHighThreshold") + private Integer imageGcHighThreshold; + + /* + * The percent of disk usage before which image garbage collection is never run. + * + * This cannot be set higher than imageGcHighThreshold. The default is 80% + */ + @JsonProperty(value = "imageGcLowThreshold") + private Integer imageGcLowThreshold; + + /* + * The Topology Manager policy to use. + * + * For more information see [Kubernetes Topology + * Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed + * values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + */ + @JsonProperty(value = "topologyManagerPolicy") + private String topologyManagerPolicy; + + /* + * Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + */ + @JsonProperty(value = "allowedUnsafeSysctls") + private List allowedUnsafeSysctls; + + /* + * If set to true it will make the Kubelet fail to start if swap is enabled on the node. + */ + @JsonProperty(value = "failSwapOn") + private Boolean failSwapOn; + + /* + * The maximum size (e.g. 10Mi) of container log file before it is rotated. + */ + @JsonProperty(value = "containerLogMaxSizeMB") + private Integer containerLogMaxSizeMB; + + /* + * The maximum number of container log files that can be present for a container. The number must be ≥ 2. + */ + @JsonProperty(value = "containerLogMaxFiles") + private Integer containerLogMaxFiles; + + /* + * The maximum number of processes per pod. + */ + @JsonProperty(value = "podMaxPids") + private Integer podMaxPids; + + /** Creates an instance of KubeletConfig class. */ + public KubeletConfig() { + } + + /** + * Get the cpuManagerPolicy property: The CPU Manager policy to use. + * + *

The default is 'none'. See [Kubernetes CPU management + * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + * for more information. Allowed values are 'none' and 'static'. + * + * @return the cpuManagerPolicy value. + */ + public String cpuManagerPolicy() { + return this.cpuManagerPolicy; + } + + /** + * Set the cpuManagerPolicy property: The CPU Manager policy to use. + * + *

The default is 'none'. See [Kubernetes CPU management + * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + * for more information. Allowed values are 'none' and 'static'. + * + * @param cpuManagerPolicy the cpuManagerPolicy value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withCpuManagerPolicy(String cpuManagerPolicy) { + this.cpuManagerPolicy = cpuManagerPolicy; + return this; + } + + /** + * Get the cpuCfsQuota property: If CPU CFS quota enforcement is enabled for containers that specify CPU limits. + * + *

The default is true. + * + * @return the cpuCfsQuota value. + */ + public Boolean cpuCfsQuota() { + return this.cpuCfsQuota; + } + + /** + * Set the cpuCfsQuota property: If CPU CFS quota enforcement is enabled for containers that specify CPU limits. + * + *

The default is true. + * + * @param cpuCfsQuota the cpuCfsQuota value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withCpuCfsQuota(Boolean cpuCfsQuota) { + this.cpuCfsQuota = cpuCfsQuota; + return this; + } + + /** + * Get the cpuCfsQuotaPeriod property: The CPU CFS quota period value. + * + *

The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit + * suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + * + * @return the cpuCfsQuotaPeriod value. + */ + public String cpuCfsQuotaPeriod() { + return this.cpuCfsQuotaPeriod; + } + + /** + * Set the cpuCfsQuotaPeriod property: The CPU CFS quota period value. + * + *

The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit + * suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + * + * @param cpuCfsQuotaPeriod the cpuCfsQuotaPeriod value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withCpuCfsQuotaPeriod(String cpuCfsQuotaPeriod) { + this.cpuCfsQuotaPeriod = cpuCfsQuotaPeriod; + return this; + } + + /** + * Get the imageGcHighThreshold property: The percent of disk usage after which image garbage collection is always + * run. + * + *

To disable image garbage collection, set to 100. The default is 85%. + * + * @return the imageGcHighThreshold value. + */ + public Integer imageGcHighThreshold() { + return this.imageGcHighThreshold; + } + + /** + * Set the imageGcHighThreshold property: The percent of disk usage after which image garbage collection is always + * run. + * + *

To disable image garbage collection, set to 100. The default is 85%. + * + * @param imageGcHighThreshold the imageGcHighThreshold value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withImageGcHighThreshold(Integer imageGcHighThreshold) { + this.imageGcHighThreshold = imageGcHighThreshold; + return this; + } + + /** + * Get the imageGcLowThreshold property: The percent of disk usage before which image garbage collection is never + * run. + * + *

This cannot be set higher than imageGcHighThreshold. The default is 80%. + * + * @return the imageGcLowThreshold value. + */ + public Integer imageGcLowThreshold() { + return this.imageGcLowThreshold; + } + + /** + * Set the imageGcLowThreshold property: The percent of disk usage before which image garbage collection is never + * run. + * + *

This cannot be set higher than imageGcHighThreshold. The default is 80%. + * + * @param imageGcLowThreshold the imageGcLowThreshold value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withImageGcLowThreshold(Integer imageGcLowThreshold) { + this.imageGcLowThreshold = imageGcLowThreshold; + return this; + } + + /** + * Get the topologyManagerPolicy property: The Topology Manager policy to use. + * + *

For more information see [Kubernetes Topology + * Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed + * values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + * + * @return the topologyManagerPolicy value. + */ + public String topologyManagerPolicy() { + return this.topologyManagerPolicy; + } + + /** + * Set the topologyManagerPolicy property: The Topology Manager policy to use. + * + *

For more information see [Kubernetes Topology + * Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed + * values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + * + * @param topologyManagerPolicy the topologyManagerPolicy value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withTopologyManagerPolicy(String topologyManagerPolicy) { + this.topologyManagerPolicy = topologyManagerPolicy; + return this; + } + + /** + * Get the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + * + * @return the allowedUnsafeSysctls value. + */ + public List allowedUnsafeSysctls() { + return this.allowedUnsafeSysctls; + } + + /** + * Set the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + * + * @param allowedUnsafeSysctls the allowedUnsafeSysctls value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withAllowedUnsafeSysctls(List allowedUnsafeSysctls) { + this.allowedUnsafeSysctls = allowedUnsafeSysctls; + return this; + } + + /** + * Get the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the + * node. + * + * @return the failSwapOn value. + */ + public Boolean failSwapOn() { + return this.failSwapOn; + } + + /** + * Set the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the + * node. + * + * @param failSwapOn the failSwapOn value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withFailSwapOn(Boolean failSwapOn) { + this.failSwapOn = failSwapOn; + return this; + } + + /** + * Get the containerLogMaxSizeMB property: The maximum size (e.g. 10Mi) of container log file before it is rotated. + * + * @return the containerLogMaxSizeMB value. + */ + public Integer containerLogMaxSizeMB() { + return this.containerLogMaxSizeMB; + } + + /** + * Set the containerLogMaxSizeMB property: The maximum size (e.g. 10Mi) of container log file before it is rotated. + * + * @param containerLogMaxSizeMB the containerLogMaxSizeMB value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withContainerLogMaxSizeMB(Integer containerLogMaxSizeMB) { + this.containerLogMaxSizeMB = containerLogMaxSizeMB; + return this; + } + + /** + * Get the containerLogMaxFiles property: The maximum number of container log files that can be present for a + * container. The number must be ≥ 2. + * + * @return the containerLogMaxFiles value. + */ + public Integer containerLogMaxFiles() { + return this.containerLogMaxFiles; + } + + /** + * Set the containerLogMaxFiles property: The maximum number of container log files that can be present for a + * container. The number must be ≥ 2. + * + * @param containerLogMaxFiles the containerLogMaxFiles value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withContainerLogMaxFiles(Integer containerLogMaxFiles) { + this.containerLogMaxFiles = containerLogMaxFiles; + return this; + } + + /** + * Get the podMaxPids property: The maximum number of processes per pod. + * + * @return the podMaxPids value. + */ + public Integer podMaxPids() { + return this.podMaxPids; + } + + /** + * Set the podMaxPids property: The maximum number of processes per pod. + * + * @param podMaxPids the podMaxPids value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withPodMaxPids(Integer podMaxPids) { + this.podMaxPids = podMaxPids; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletDiskType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletDiskType.java new file mode 100644 index 0000000000000..2970e59cc83c8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletDiskType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. */ +public final class KubeletDiskType extends ExpandableStringEnum { + /** Static value OS for KubeletDiskType. */ + public static final KubeletDiskType OS = fromString("OS"); + + /** Static value Temporary for KubeletDiskType. */ + public static final KubeletDiskType TEMPORARY = fromString("Temporary"); + + /** + * Creates a new instance of KubeletDiskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KubeletDiskType() { + } + + /** + * Creates or finds a KubeletDiskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding KubeletDiskType. + */ + @JsonCreator + public static KubeletDiskType fromString(String name) { + return fromString(name, KubeletDiskType.class); + } + + /** + * Gets known KubeletDiskType values. + * + * @return known KubeletDiskType values. + */ + public static Collection values() { + return values(KubeletDiskType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesPatchVersion.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesPatchVersion.java new file mode 100644 index 0000000000000..8b4a44833e7e5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesPatchVersion.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Kubernetes patch version profile. */ +@Fluent +public final class KubernetesPatchVersion { + /* + * Possible upgrade path for given patch version + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /** Creates an instance of KubernetesPatchVersion class. */ + public KubernetesPatchVersion() { + } + + /** + * Get the upgrades property: Possible upgrade path for given patch version. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: Possible upgrade path for given patch version. + * + * @param upgrades the upgrades value to set. + * @return the KubernetesPatchVersion object itself. + */ + public KubernetesPatchVersion withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesSupportPlan.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesSupportPlan.java new file mode 100644 index 0000000000000..b00826e06de24 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesSupportPlan.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Different support tiers for AKS managed clusters. */ +public final class KubernetesSupportPlan extends ExpandableStringEnum { + /** Static value KubernetesOfficial for KubernetesSupportPlan. */ + public static final KubernetesSupportPlan KUBERNETES_OFFICIAL = fromString("KubernetesOfficial"); + + /** Static value AKSLongTermSupport for KubernetesSupportPlan. */ + public static final KubernetesSupportPlan AKSLONG_TERM_SUPPORT = fromString("AKSLongTermSupport"); + + /** + * Creates a new instance of KubernetesSupportPlan value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KubernetesSupportPlan() { + } + + /** + * Creates or finds a KubernetesSupportPlan from its string representation. + * + * @param name a name to look for. + * @return the corresponding KubernetesSupportPlan. + */ + @JsonCreator + public static KubernetesSupportPlan fromString(String name) { + return fromString(name, KubernetesSupportPlan.class); + } + + /** + * Gets known KubernetesSupportPlan values. + * + * @return known KubernetesSupportPlan values. + */ + public static Collection values() { + return values(KubernetesSupportPlan.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersion.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersion.java new file mode 100644 index 0000000000000..703d4425c6404 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersion.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Kubernetes version profile for given major.minor release. */ +@Fluent +public final class KubernetesVersion { + /* + * major.minor version of Kubernetes release + */ + @JsonProperty(value = "version") + private String version; + + /* + * Capabilities on this Kubernetes version. + */ + @JsonProperty(value = "capabilities") + private KubernetesVersionCapabilities capabilities; + + /* + * Whether this version is in preview mode. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /* + * Patch versions of Kubernetes release + */ + @JsonProperty(value = "patchVersions") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map patchVersions; + + /** Creates an instance of KubernetesVersion class. */ + public KubernetesVersion() { + } + + /** + * Get the version property: major.minor version of Kubernetes release. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: major.minor version of Kubernetes release. + * + * @param version the version value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the capabilities property: Capabilities on this Kubernetes version. + * + * @return the capabilities value. + */ + public KubernetesVersionCapabilities capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: Capabilities on this Kubernetes version. + * + * @param capabilities the capabilities value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withCapabilities(KubernetesVersionCapabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Get the isPreview property: Whether this version is in preview mode. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether this version is in preview mode. + * + * @param isPreview the isPreview value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get the patchVersions property: Patch versions of Kubernetes release. + * + * @return the patchVersions value. + */ + public Map patchVersions() { + return this.patchVersions; + } + + /** + * Set the patchVersions property: Patch versions of Kubernetes release. + * + * @param patchVersions the patchVersions value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withPatchVersions(Map patchVersions) { + this.patchVersions = patchVersions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capabilities() != null) { + capabilities().validate(); + } + if (patchVersions() != null) { + patchVersions() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionCapabilities.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionCapabilities.java new file mode 100644 index 0000000000000..cfc56491f1162 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionCapabilities.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Capabilities on this Kubernetes version. */ +@Fluent +public final class KubernetesVersionCapabilities { + /* + * The supportPlan property. + */ + @JsonProperty(value = "supportPlan") + private List supportPlan; + + /** Creates an instance of KubernetesVersionCapabilities class. */ + public KubernetesVersionCapabilities() { + } + + /** + * Get the supportPlan property: The supportPlan property. + * + * @return the supportPlan value. + */ + public List supportPlan() { + return this.supportPlan; + } + + /** + * Set the supportPlan property: The supportPlan property. + * + * @param supportPlan the supportPlan value to set. + * @return the KubernetesVersionCapabilities object itself. + */ + public KubernetesVersionCapabilities withSupportPlan(List supportPlan) { + this.supportPlan = supportPlan; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionListResult.java new file mode 100644 index 0000000000000..87abc5eb3ab36 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionListResult.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import java.util.List; + +/** An immutable client-side representation of KubernetesVersionListResult. */ +public interface KubernetesVersionListResult { + /** + * Gets the values property: Array of AKS supported Kubernetes versions. + * + * @return the values value. + */ + List values(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner + * object. + * + * @return the inner object. + */ + KubernetesVersionListResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LicenseType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LicenseType.java new file mode 100644 index 0000000000000..7853eda6c8a48 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LicenseType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The license type to use for Windows VMs. See [Azure Hybrid User + * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. + */ +public final class LicenseType extends ExpandableStringEnum { + /** Static value None for LicenseType. */ + public static final LicenseType NONE = fromString("None"); + + /** Static value Windows_Server for LicenseType. */ + public static final LicenseType WINDOWS_SERVER = fromString("Windows_Server"); + + /** + * Creates a new instance of LicenseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseType() { + } + + /** + * Creates or finds a LicenseType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseType. + */ + @JsonCreator + public static LicenseType fromString(String name) { + return fromString(name, LicenseType.class); + } + + /** + * Gets known LicenseType values. + * + * @return known LicenseType values. + */ + public static Collection values() { + return values(LicenseType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LinuxOSConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LinuxOSConfig.java new file mode 100644 index 0000000000000..0f8509b0facec --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LinuxOSConfig.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * OS configurations of Linux agent nodes. + * + *

See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more + * details. + */ +@Fluent +public final class LinuxOSConfig { + /* + * Sysctl settings for Linux agent nodes. + */ + @JsonProperty(value = "sysctls") + private SysctlConfig sysctls; + + /* + * Whether transparent hugepages are enabled. + * + * Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see + * [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + */ + @JsonProperty(value = "transparentHugePageEnabled") + private String transparentHugePageEnabled; + + /* + * Whether the kernel should make aggressive use of memory compaction to make more hugepages available. + * + * Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more + * information see [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + */ + @JsonProperty(value = "transparentHugePageDefrag") + private String transparentHugePageDefrag; + + /* + * The size in MB of a swap file that will be created on each node. + */ + @JsonProperty(value = "swapFileSizeMB") + private Integer swapFileSizeMB; + + /** Creates an instance of LinuxOSConfig class. */ + public LinuxOSConfig() { + } + + /** + * Get the sysctls property: Sysctl settings for Linux agent nodes. + * + * @return the sysctls value. + */ + public SysctlConfig sysctls() { + return this.sysctls; + } + + /** + * Set the sysctls property: Sysctl settings for Linux agent nodes. + * + * @param sysctls the sysctls value to set. + * @return the LinuxOSConfig object itself. + */ + public LinuxOSConfig withSysctls(SysctlConfig sysctls) { + this.sysctls = sysctls; + return this; + } + + /** + * Get the transparentHugePageEnabled property: Whether transparent hugepages are enabled. + * + *

Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see + * [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + * + * @return the transparentHugePageEnabled value. + */ + public String transparentHugePageEnabled() { + return this.transparentHugePageEnabled; + } + + /** + * Set the transparentHugePageEnabled property: Whether transparent hugepages are enabled. + * + *

Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see + * [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + * + * @param transparentHugePageEnabled the transparentHugePageEnabled value to set. + * @return the LinuxOSConfig object itself. + */ + public LinuxOSConfig withTransparentHugePageEnabled(String transparentHugePageEnabled) { + this.transparentHugePageEnabled = transparentHugePageEnabled; + return this; + } + + /** + * Get the transparentHugePageDefrag property: Whether the kernel should make aggressive use of memory compaction to + * make more hugepages available. + * + *

Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more + * information see [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + * + * @return the transparentHugePageDefrag value. + */ + public String transparentHugePageDefrag() { + return this.transparentHugePageDefrag; + } + + /** + * Set the transparentHugePageDefrag property: Whether the kernel should make aggressive use of memory compaction to + * make more hugepages available. + * + *

Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more + * information see [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + * + * @param transparentHugePageDefrag the transparentHugePageDefrag value to set. + * @return the LinuxOSConfig object itself. + */ + public LinuxOSConfig withTransparentHugePageDefrag(String transparentHugePageDefrag) { + this.transparentHugePageDefrag = transparentHugePageDefrag; + return this; + } + + /** + * Get the swapFileSizeMB property: The size in MB of a swap file that will be created on each node. + * + * @return the swapFileSizeMB value. + */ + public Integer swapFileSizeMB() { + return this.swapFileSizeMB; + } + + /** + * Set the swapFileSizeMB property: The size in MB of a swap file that will be created on each node. + * + * @param swapFileSizeMB the swapFileSizeMB value to set. + * @return the LinuxOSConfig object itself. + */ + public LinuxOSConfig withSwapFileSizeMB(Integer swapFileSizeMB) { + this.swapFileSizeMB = swapFileSizeMB; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sysctls() != null) { + sysctls().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LoadBalancerSku.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LoadBalancerSku.java new file mode 100644 index 0000000000000..40d03e8d41898 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LoadBalancerSku.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The load balancer sku for the managed cluster. + * + *

The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for + * more information about the differences between load balancer SKUs. + */ +public final class LoadBalancerSku extends ExpandableStringEnum { + /** Static value standard for LoadBalancerSku. */ + public static final LoadBalancerSku STANDARD = fromString("standard"); + + /** Static value basic for LoadBalancerSku. */ + public static final LoadBalancerSku BASIC = fromString("basic"); + + /** + * Creates a new instance of LoadBalancerSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LoadBalancerSku() { + } + + /** + * Creates or finds a LoadBalancerSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding LoadBalancerSku. + */ + @JsonCreator + public static LoadBalancerSku fromString(String name) { + return fromString(name, LoadBalancerSku.class); + } + + /** + * Gets known LoadBalancerSku values. + * + * @return known LoadBalancerSku values. + */ + public static Collection values() { + return values(LoadBalancerSku.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfiguration.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfiguration.java new file mode 100644 index 0000000000000..6a70fc49eb798 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfiguration.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import java.util.List; + +/** An immutable client-side representation of MaintenanceConfiguration. */ +public interface MaintenanceConfiguration { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name property: The name of the resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Resource type. + * + * @return the type value. + */ + String type(); + + /** + * Gets the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. + * + *

If two array entries specify the same day of the week, the applied configuration is the union of times in both + * entries. + * + * @return the timeInWeek value. + */ + List timeInWeek(); + + /** + * Gets the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @return the notAllowedTime value. + */ + List notAllowedTime(); + + /** + * Gets the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @return the maintenanceWindow value. + */ + MaintenanceWindow maintenanceWindow(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner + * object. + * + * @return the inner object. + */ + MaintenanceConfigurationInner innerModel(); + + /** The entirety of the MaintenanceConfiguration definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** The MaintenanceConfiguration definition stages. */ + interface DefinitionStages { + /** The first stage of the MaintenanceConfiguration definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the MaintenanceConfiguration definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @return the next definition stage. + */ + WithCreate withExistingManagedCluster(String resourceGroupName, String resourceName); + } + + /** + * The stage of the MaintenanceConfiguration definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTimeInWeek, + DefinitionStages.WithNotAllowedTime, + DefinitionStages.WithMaintenanceWindow { + /** + * Executes the create request. + * + * @return the created resource. + */ + MaintenanceConfiguration create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + MaintenanceConfiguration create(Context context); + } + + /** The stage of the MaintenanceConfiguration definition allowing to specify timeInWeek. */ + interface WithTimeInWeek { + /** + * Specifies the timeInWeek property: Time slots during the week when planned maintenance is allowed to + * proceed. + * + *

If two array entries specify the same day of the week, the applied configuration is the union of times + * in both entries.. + * + * @param timeInWeek Time slots during the week when planned maintenance is allowed to proceed. + *

If two array entries specify the same day of the week, the applied configuration is the union of + * times in both entries. + * @return the next definition stage. + */ + WithCreate withTimeInWeek(List timeInWeek); + } + + /** The stage of the MaintenanceConfiguration definition allowing to specify notAllowedTime. */ + interface WithNotAllowedTime { + /** + * Specifies the notAllowedTime property: Time slots on which upgrade is not allowed.. + * + * @param notAllowedTime Time slots on which upgrade is not allowed. + * @return the next definition stage. + */ + WithCreate withNotAllowedTime(List notAllowedTime); + } + + /** The stage of the MaintenanceConfiguration definition allowing to specify maintenanceWindow. */ + interface WithMaintenanceWindow { + /** + * Specifies the maintenanceWindow property: Maintenance window for the maintenance configuration.. + * + * @param maintenanceWindow Maintenance window for the maintenance configuration. + * @return the next definition stage. + */ + WithCreate withMaintenanceWindow(MaintenanceWindow maintenanceWindow); + } + } + + /** + * Begins update for the MaintenanceConfiguration resource. + * + * @return the stage of resource update. + */ + MaintenanceConfiguration.Update update(); + + /** The template for MaintenanceConfiguration update. */ + interface Update + extends UpdateStages.WithTimeInWeek, UpdateStages.WithNotAllowedTime, UpdateStages.WithMaintenanceWindow { + /** + * Executes the update request. + * + * @return the updated resource. + */ + MaintenanceConfiguration apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + MaintenanceConfiguration apply(Context context); + } + + /** The MaintenanceConfiguration update stages. */ + interface UpdateStages { + /** The stage of the MaintenanceConfiguration update allowing to specify timeInWeek. */ + interface WithTimeInWeek { + /** + * Specifies the timeInWeek property: Time slots during the week when planned maintenance is allowed to + * proceed. + * + *

If two array entries specify the same day of the week, the applied configuration is the union of times + * in both entries.. + * + * @param timeInWeek Time slots during the week when planned maintenance is allowed to proceed. + *

If two array entries specify the same day of the week, the applied configuration is the union of + * times in both entries. + * @return the next definition stage. + */ + Update withTimeInWeek(List timeInWeek); + } + + /** The stage of the MaintenanceConfiguration update allowing to specify notAllowedTime. */ + interface WithNotAllowedTime { + /** + * Specifies the notAllowedTime property: Time slots on which upgrade is not allowed.. + * + * @param notAllowedTime Time slots on which upgrade is not allowed. + * @return the next definition stage. + */ + Update withNotAllowedTime(List notAllowedTime); + } + + /** The stage of the MaintenanceConfiguration update allowing to specify maintenanceWindow. */ + interface WithMaintenanceWindow { + /** + * Specifies the maintenanceWindow property: Maintenance window for the maintenance configuration.. + * + * @param maintenanceWindow Maintenance window for the maintenance configuration. + * @return the next definition stage. + */ + Update withMaintenanceWindow(MaintenanceWindow maintenanceWindow); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + MaintenanceConfiguration refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + MaintenanceConfiguration refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurationListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurationListResult.java new file mode 100644 index 0000000000000..bd45fa08a77a4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurationListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List maintenance configurations operation. */ +@Fluent +public final class MaintenanceConfigurationListResult { + /* + * The list of maintenance configurations. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of maintenance configuration results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of MaintenanceConfigurationListResult class. */ + public MaintenanceConfigurationListResult() { + } + + /** + * Get the value property: The list of maintenance configurations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of maintenance configurations. + * + * @param value the value value to set. + * @return the MaintenanceConfigurationListResult object itself. + */ + public MaintenanceConfigurationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of maintenance configuration results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurations.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurations.java new file mode 100644 index 0000000000000..efad9c64306ec --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurations.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of MaintenanceConfigurations. */ +public interface MaintenanceConfigurations { + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listByManagedCluster( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String configName, Context context); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @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 specified maintenance configuration of a managed cluster. + */ + MaintenanceConfiguration get(String resourceGroupName, String resourceName, String configName); + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String resourceName, String configName, Context context); + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String configName); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response}. + */ + MaintenanceConfiguration getById(String id); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a maintenance configuration. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a maintenance configuration. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new MaintenanceConfiguration resource. + * + * @param name resource name. + * @return the first stage of the new MaintenanceConfiguration definition. + */ + MaintenanceConfiguration.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceWindow.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceWindow.java new file mode 100644 index 0000000000000..6f9d086180e9a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceWindow.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. */ +@Fluent +public final class MaintenanceWindow { + /* + * Recurrence schedule for the maintenance window. + */ + @JsonProperty(value = "schedule", required = true) + private Schedule schedule; + + /* + * Length of maintenance window range from 4 to 24 hours. + */ + @JsonProperty(value = "durationHours", required = true) + private int durationHours; + + /* + * The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the + * default is '+00:00'. + */ + @JsonProperty(value = "utcOffset") + private String utcOffset; + + /* + * The date the maintenance window activates. If the current date is before this date, the maintenance window is + * inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away. + */ + @JsonProperty(value = "startDate") + private LocalDate startDate; + + /* + * The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to + * this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + */ + @JsonProperty(value = "startTime", required = true) + private String startTime; + + /* + * Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: + * +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' + * to '2023-01-03 22:00' in UTC time. + */ + @JsonProperty(value = "notAllowedDates") + private List notAllowedDates; + + /** Creates an instance of MaintenanceWindow class. */ + public MaintenanceWindow() { + } + + /** + * Get the schedule property: Recurrence schedule for the maintenance window. + * + * @return the schedule value. + */ + public Schedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: Recurrence schedule for the maintenance window. + * + * @param schedule the schedule value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withSchedule(Schedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get the durationHours property: Length of maintenance window range from 4 to 24 hours. + * + * @return the durationHours value. + */ + public int durationHours() { + return this.durationHours; + } + + /** + * Set the durationHours property: Length of maintenance window range from 4 to 24 hours. + * + * @param durationHours the durationHours value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withDurationHours(int durationHours) { + this.durationHours = durationHours; + return this; + } + + /** + * Get the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for + * PST. If not specified, the default is '+00:00'. + * + * @return the utcOffset value. + */ + public String utcOffset() { + return this.utcOffset; + } + + /** + * Set the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for + * PST. If not specified, the default is '+00:00'. + * + * @param utcOffset the utcOffset value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withUtcOffset(String utcOffset) { + this.utcOffset = utcOffset; + return this; + } + + /** + * Get the startDate property: The date the maintenance window activates. If the current date is before this date, + * the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window + * will be active right away. + * + * @return the startDate value. + */ + public LocalDate startDate() { + return this.startDate; + } + + /** + * Set the startDate property: The date the maintenance window activates. If the current date is before this date, + * the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window + * will be active right away. + * + * @param startDate the startDate value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withStartDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Get the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to + * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to + * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + * + * @param startTime the startTime value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the notAllowedDates property: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. + * For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be + * blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + * + * @return the notAllowedDates value. + */ + public List notAllowedDates() { + return this.notAllowedDates; + } + + /** + * Set the notAllowedDates property: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. + * For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be + * blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + * + * @param notAllowedDates the notAllowedDates value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withNotAllowedDates(List notAllowedDates) { + this.notAllowedDates = notAllowedDates; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (schedule() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property schedule in model MaintenanceWindow")); + } else { + schedule().validate(); + } + if (startTime() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property startTime in model MaintenanceWindow")); + } + if (notAllowedDates() != null) { + notAllowedDates().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceWindow.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedCluster.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedCluster.java new file mode 100644 index 0000000000000..6c168771cecd0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedCluster.java @@ -0,0 +1,1268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of ManagedCluster. */ +public interface ManagedCluster { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the sku property: The managed cluster SKU. + * + * @return the sku value. + */ + ManagedClusterSku sku(); + + /** + * Gets the extendedLocation property: The extended location of the Virtual Machine. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the identity property: The identity of the managed cluster, if configured. + * + * @return the identity value. + */ + ManagedClusterIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the powerState property: The Power State of the cluster. + * + * @return the powerState value. + */ + PowerState powerState(); + + /** + * Gets the maxAgentPools property: The max number of agent pools for the managed cluster. + * + * @return the maxAgentPools value. + */ + Integer maxAgentPools(); + + /** + * Gets the kubernetesVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. + * When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating + * the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger + * an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes + * minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For + * example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is + * not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + * details. + * + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * Gets the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. + * + *

If kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal + * to it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentKubernetesVersion value. + */ + String currentKubernetesVersion(); + + /** + * Gets the dnsPrefix property: The DNS prefix of the Managed Cluster. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @return the dnsPrefix value. + */ + String dnsPrefix(); + + /** + * Gets the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. + * + *

This cannot be updated once the Managed Cluster has been created. + * + * @return the fqdnSubdomain value. + */ + String fqdnSubdomain(); + + /** + * Gets the fqdn property: The FQDN of the master pool. + * + * @return the fqdn value. + */ + String fqdn(); + + /** + * Gets the privateFqdn property: The FQDN of private cluster. + * + * @return the privateFqdn value. + */ + String privateFqdn(); + + /** + * Gets the azurePortalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This + * FQDN is for use only by the Azure Portal and should not be used by other clients. + * + *

The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, + * which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal + * to function properly. + * + * @return the azurePortalFqdn value. + */ + String azurePortalFqdn(); + + /** + * Gets the agentPoolProfiles property: The agent pool properties. + * + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * Gets the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @return the linuxProfile value. + */ + ContainerServiceLinuxProfile linuxProfile(); + + /** + * Gets the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @return the windowsProfile value. + */ + ManagedClusterWindowsProfile windowsProfile(); + + /** + * Gets the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @return the servicePrincipalProfile value. + */ + ManagedClusterServicePrincipalProfile servicePrincipalProfile(); + + /** + * Gets the addonProfiles property: The profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + Map addonProfiles(); + + /** + * Gets the podIdentityProfile property: The pod identity profile of the Managed Cluster. + * + *

See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on + * AAD pod identity integration. + * + * @return the podIdentityProfile value. + */ + ManagedClusterPodIdentityProfile podIdentityProfile(); + + /** + * Gets the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @return the oidcIssuerProfile value. + */ + ManagedClusterOidcIssuerProfile oidcIssuerProfile(); + + /** + * Gets the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value. + */ + String nodeResourceGroup(); + + /** + * Gets the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @return the enableRbac value. + */ + Boolean enableRbac(); + + /** + * Gets the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @return the supportPlan value. + */ + KubernetesSupportPlan supportPlan(); + + /** + * Gets the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more + * at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @return the enablePodSecurityPolicy value. + */ + Boolean enablePodSecurityPolicy(); + + /** + * Gets the networkProfile property: The network configuration profile. + * + * @return the networkProfile value. + */ + ContainerServiceNetworkProfile networkProfile(); + + /** + * Gets the aadProfile property: AADProfile specifies attributes for Azure Active Directory integration. + * + *

The Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + ManagedClusterAadProfile aadProfile(); + + /** + * Gets the autoUpgradeProfile property: The auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + ManagedClusterAutoUpgradeProfile autoUpgradeProfile(); + + /** + * Gets the upgradeSettings property: Settings for upgrading a cluster. + * + * @return the upgradeSettings value. + */ + ClusterUpgradeSettings upgradeSettings(); + + /** + * Gets the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @return the autoScalerProfile value. + */ + ManagedClusterPropertiesAutoScalerProfile autoScalerProfile(); + + /** + * Gets the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + ManagedClusterApiServerAccessProfile apiServerAccessProfile(); + + /** + * Gets the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. + * + *

This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @return the diskEncryptionSetId value. + */ + String diskEncryptionSetId(); + + /** + * Gets the identityProfile property: Identities associated with the cluster. + * + * @return the identityProfile value. + */ + Map identityProfile(); + + /** + * Gets the privateLinkResources property: Private link resources associated with the cluster. + * + * @return the privateLinkResources value. + */ + List privateLinkResources(); + + /** + * Gets the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. + * + *

If set to true, getting static credentials will be disabled for this cluster. This must only be used on + * Managed Clusters that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @return the disableLocalAccounts value. + */ + Boolean disableLocalAccounts(); + + /** + * Gets the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @return the httpProxyConfig value. + */ + ManagedClusterHttpProxyConfig httpProxyConfig(); + + /** + * Gets the securityProfile property: Security profile for the managed cluster. + * + * @return the securityProfile value. + */ + ManagedClusterSecurityProfile securityProfile(); + + /** + * Gets the storageProfile property: Storage profile for the managed cluster. + * + * @return the storageProfile value. + */ + ManagedClusterStorageProfile storageProfile(); + + /** + * Gets the publicNetworkAccess property: PublicNetworkAccess of the managedCluster + * + *

Allow or deny public network access for AKS. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccess publicNetworkAccess(); + + /** + * Gets the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @return the workloadAutoScalerProfile value. + */ + ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile(); + + /** + * Gets the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @return the azureMonitorProfile value. + */ + ManagedClusterAzureMonitorProfile azureMonitorProfile(); + + /** + * Gets the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @return the serviceMeshProfile value. + */ + ServiceMeshProfile serviceMeshProfile(); + + /** + * Gets the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds + * (i.e: create, delete, create sequence). + * + * @return the resourceUid value. + */ + String resourceUid(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner + * object. + * + * @return the inner object. + */ + ManagedClusterInner innerModel(); + + /** The entirety of the ManagedCluster definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + + /** The ManagedCluster definition stages. */ + interface DefinitionStages { + /** The first stage of the ManagedCluster definition. */ + interface Blank extends WithLocation { + } + + /** The stage of the ManagedCluster definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** The stage of the ManagedCluster definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ManagedCluster definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithSku, + DefinitionStages.WithExtendedLocation, + DefinitionStages.WithIdentity, + DefinitionStages.WithKubernetesVersion, + DefinitionStages.WithDnsPrefix, + DefinitionStages.WithFqdnSubdomain, + DefinitionStages.WithAgentPoolProfiles, + DefinitionStages.WithLinuxProfile, + DefinitionStages.WithWindowsProfile, + DefinitionStages.WithServicePrincipalProfile, + DefinitionStages.WithAddonProfiles, + DefinitionStages.WithPodIdentityProfile, + DefinitionStages.WithOidcIssuerProfile, + DefinitionStages.WithNodeResourceGroup, + DefinitionStages.WithEnableRbac, + DefinitionStages.WithSupportPlan, + DefinitionStages.WithEnablePodSecurityPolicy, + DefinitionStages.WithNetworkProfile, + DefinitionStages.WithAadProfile, + DefinitionStages.WithAutoUpgradeProfile, + DefinitionStages.WithUpgradeSettings, + DefinitionStages.WithAutoScalerProfile, + DefinitionStages.WithApiServerAccessProfile, + DefinitionStages.WithDiskEncryptionSetId, + DefinitionStages.WithIdentityProfile, + DefinitionStages.WithPrivateLinkResources, + DefinitionStages.WithDisableLocalAccounts, + DefinitionStages.WithHttpProxyConfig, + DefinitionStages.WithSecurityProfile, + DefinitionStages.WithStorageProfile, + DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithWorkloadAutoScalerProfile, + DefinitionStages.WithAzureMonitorProfile, + DefinitionStages.WithServiceMeshProfile { + /** + * Executes the create request. + * + * @return the created resource. + */ + ManagedCluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ManagedCluster create(Context context); + } + + /** The stage of the ManagedCluster definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** The stage of the ManagedCluster definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The managed cluster SKU.. + * + * @param sku The managed cluster SKU. + * @return the next definition stage. + */ + WithCreate withSku(ManagedClusterSku sku); + } + + /** The stage of the ManagedCluster definition allowing to specify extendedLocation. */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extended location of the Virtual Machine.. + * + * @param extendedLocation The extended location of the Virtual Machine. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + + /** The stage of the ManagedCluster definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the managed cluster, if configured.. + * + * @param identity The identity of the managed cluster, if configured. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedClusterIdentity identity); + } + + /** The stage of the ManagedCluster definition allowing to specify kubernetesVersion. */ + interface WithKubernetesVersion { + /** + * Specifies the kubernetesVersion property: The version of Kubernetes specified by the user. + * + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are + * supported. When <major.minor> is specified, the latest supported GA patch version is chosen + * automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. + * 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you + * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be + * performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or + * 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS + * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details.. + * + * @param kubernetesVersion The version of Kubernetes specified by the user. + *

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) + * are supported. When <major.minor> is specified, the latest supported GA patch version is chosen + * automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. + * 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you + * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be + * performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or + * 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS + * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * @return the next definition stage. + */ + WithCreate withKubernetesVersion(String kubernetesVersion); + } + + /** The stage of the ManagedCluster definition allowing to specify dnsPrefix. */ + interface WithDnsPrefix { + /** + * Specifies the dnsPrefix property: The DNS prefix of the Managed Cluster. + * + *

This cannot be updated once the Managed Cluster has been created.. + * + * @param dnsPrefix The DNS prefix of the Managed Cluster. + *

This cannot be updated once the Managed Cluster has been created. + * @return the next definition stage. + */ + WithCreate withDnsPrefix(String dnsPrefix); + } + + /** The stage of the ManagedCluster definition allowing to specify fqdnSubdomain. */ + interface WithFqdnSubdomain { + /** + * Specifies the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns + * zone. + * + *

This cannot be updated once the Managed Cluster has been created.. + * + * @param fqdnSubdomain The FQDN subdomain of the private cluster with custom private dns zone. + *

This cannot be updated once the Managed Cluster has been created. + * @return the next definition stage. + */ + WithCreate withFqdnSubdomain(String fqdnSubdomain); + } + + /** The stage of the ManagedCluster definition allowing to specify agentPoolProfiles. */ + interface WithAgentPoolProfiles { + /** + * Specifies the agentPoolProfiles property: The agent pool properties.. + * + * @param agentPoolProfiles The agent pool properties. + * @return the next definition stage. + */ + WithCreate withAgentPoolProfiles(List agentPoolProfiles); + } + + /** The stage of the ManagedCluster definition allowing to specify linuxProfile. */ + interface WithLinuxProfile { + /** + * Specifies the linuxProfile property: The profile for Linux VMs in the Managed Cluster.. + * + * @param linuxProfile The profile for Linux VMs in the Managed Cluster. + * @return the next definition stage. + */ + WithCreate withLinuxProfile(ContainerServiceLinuxProfile linuxProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify windowsProfile. */ + interface WithWindowsProfile { + /** + * Specifies the windowsProfile property: The profile for Windows VMs in the Managed Cluster.. + * + * @param windowsProfile The profile for Windows VMs in the Managed Cluster. + * @return the next definition stage. + */ + WithCreate withWindowsProfile(ManagedClusterWindowsProfile windowsProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify servicePrincipalProfile. */ + interface WithServicePrincipalProfile { + /** + * Specifies the servicePrincipalProfile property: Information about a service principal identity for the + * cluster to use for manipulating Azure APIs.. + * + * @param servicePrincipalProfile Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. + * @return the next definition stage. + */ + WithCreate withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify addonProfiles. */ + interface WithAddonProfiles { + /** + * Specifies the addonProfiles property: The profile of managed cluster add-on.. + * + * @param addonProfiles The profile of managed cluster add-on. + * @return the next definition stage. + */ + WithCreate withAddonProfiles(Map addonProfiles); + } + + /** The stage of the ManagedCluster definition allowing to specify podIdentityProfile. */ + interface WithPodIdentityProfile { + /** + * Specifies the podIdentityProfile property: The pod identity profile of the Managed Cluster. + * + *

See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more + * details on AAD pod identity integration.. + * + * @param podIdentityProfile The pod identity profile of the Managed Cluster. + *

See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for + * more details on AAD pod identity integration. + * @return the next definition stage. + */ + WithCreate withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify oidcIssuerProfile. */ + interface WithOidcIssuerProfile { + /** + * Specifies the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster.. + * + * @param oidcIssuerProfile The OIDC issuer profile of the Managed Cluster. + * @return the next definition stage. + */ + WithCreate withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify nodeResourceGroup. */ + interface WithNodeResourceGroup { + /** + * Specifies the nodeResourceGroup property: The name of the resource group containing agent pool nodes.. + * + * @param nodeResourceGroup The name of the resource group containing agent pool nodes. + * @return the next definition stage. + */ + WithCreate withNodeResourceGroup(String nodeResourceGroup); + } + + /** The stage of the ManagedCluster definition allowing to specify enableRbac. */ + interface WithEnableRbac { + /** + * Specifies the enableRbac property: Whether to enable Kubernetes Role-Based Access Control.. + * + * @param enableRbac Whether to enable Kubernetes Role-Based Access Control. + * @return the next definition stage. + */ + WithCreate withEnableRbac(Boolean enableRbac); + } + + /** The stage of the ManagedCluster definition allowing to specify supportPlan. */ + interface WithSupportPlan { + /** + * Specifies the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default + * is 'KubernetesOfficial'.. + * + * @param supportPlan The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * @return the next definition stage. + */ + WithCreate withSupportPlan(KubernetesSupportPlan supportPlan); + } + + /** The stage of the ManagedCluster definition allowing to specify enablePodSecurityPolicy. */ + interface WithEnablePodSecurityPolicy { + /** + * Specifies the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security + * policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in + * v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp.. + * + * @param enablePodSecurityPolicy (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). + * PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn + * more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * @return the next definition stage. + */ + WithCreate withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy); + } + + /** The stage of the ManagedCluster definition allowing to specify networkProfile. */ + interface WithNetworkProfile { + /** + * Specifies the networkProfile property: The network configuration profile.. + * + * @param networkProfile The network configuration profile. + * @return the next definition stage. + */ + WithCreate withNetworkProfile(ContainerServiceNetworkProfile networkProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify aadProfile. */ + interface WithAadProfile { + /** + * Specifies the aadProfile property: AADProfile specifies attributes for Azure Active Directory + * integration. + * + *

The Azure Active Directory configuration.. + * + * @param aadProfile AADProfile specifies attributes for Azure Active Directory integration. + *

The Azure Active Directory configuration. + * @return the next definition stage. + */ + WithCreate withAadProfile(ManagedClusterAadProfile aadProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify autoUpgradeProfile. */ + interface WithAutoUpgradeProfile { + /** + * Specifies the autoUpgradeProfile property: The auto upgrade configuration.. + * + * @param autoUpgradeProfile The auto upgrade configuration. + * @return the next definition stage. + */ + WithCreate withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify upgradeSettings. */ + interface WithUpgradeSettings { + /** + * Specifies the upgradeSettings property: Settings for upgrading a cluster.. + * + * @param upgradeSettings Settings for upgrading a cluster. + * @return the next definition stage. + */ + WithCreate withUpgradeSettings(ClusterUpgradeSettings upgradeSettings); + } + + /** The stage of the ManagedCluster definition allowing to specify autoScalerProfile. */ + interface WithAutoScalerProfile { + /** + * Specifies the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when + * enabled. + * + * @param autoScalerProfile Parameters to be applied to the cluster-autoscaler when enabled. + * @return the next definition stage. + */ + WithCreate withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify apiServerAccessProfile. */ + interface WithApiServerAccessProfile { + /** + * Specifies the apiServerAccessProfile property: The access profile for managed cluster API server.. + * + * @param apiServerAccessProfile The access profile for managed cluster API server. + * @return the next definition stage. + */ + WithCreate withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify diskEncryptionSetId. */ + interface WithDiskEncryptionSetId { + /** + * Specifies the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for + * enabling encryption at rest. + * + *

This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @param diskEncryptionSetId The Resource ID of the disk encryption set to use for enabling encryption at + * rest. + *

This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * @return the next definition stage. + */ + WithCreate withDiskEncryptionSetId(String diskEncryptionSetId); + } + + /** The stage of the ManagedCluster definition allowing to specify identityProfile. */ + interface WithIdentityProfile { + /** + * Specifies the identityProfile property: Identities associated with the cluster.. + * + * @param identityProfile Identities associated with the cluster. + * @return the next definition stage. + */ + WithCreate withIdentityProfile(Map identityProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify privateLinkResources. */ + interface WithPrivateLinkResources { + /** + * Specifies the privateLinkResources property: Private link resources associated with the cluster.. + * + * @param privateLinkResources Private link resources associated with the cluster. + * @return the next definition stage. + */ + WithCreate withPrivateLinkResources(List privateLinkResources); + } + + /** The stage of the ManagedCluster definition allowing to specify disableLocalAccounts. */ + interface WithDisableLocalAccounts { + /** + * Specifies the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. + * + *

If set to true, getting static credentials will be disabled for this cluster. This must only be used + * on Managed Clusters that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview).. + * + * @param disableLocalAccounts If local accounts should be disabled on the Managed Cluster. + *

If set to true, getting static credentials will be disabled for this cluster. This must only be + * used on Managed Clusters that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * @return the next definition stage. + */ + WithCreate withDisableLocalAccounts(Boolean disableLocalAccounts); + } + + /** The stage of the ManagedCluster definition allowing to specify httpProxyConfig. */ + interface WithHttpProxyConfig { + /** + * Specifies the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy + * servers.. + * + * @param httpProxyConfig Configurations for provisioning the cluster with HTTP proxy servers. + * @return the next definition stage. + */ + WithCreate withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig); + } + + /** The stage of the ManagedCluster definition allowing to specify securityProfile. */ + interface WithSecurityProfile { + /** + * Specifies the securityProfile property: Security profile for the managed cluster.. + * + * @param securityProfile Security profile for the managed cluster. + * @return the next definition stage. + */ + WithCreate withSecurityProfile(ManagedClusterSecurityProfile securityProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify storageProfile. */ + interface WithStorageProfile { + /** + * Specifies the storageProfile property: Storage profile for the managed cluster.. + * + * @param storageProfile Storage profile for the managed cluster. + * @return the next definition stage. + */ + WithCreate withStorageProfile(ManagedClusterStorageProfile storageProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: PublicNetworkAccess of the managedCluster + * + *

Allow or deny public network access for AKS. + * + * @param publicNetworkAccess PublicNetworkAccess of the managedCluster + *

Allow or deny public network access for AKS. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } + + /** The stage of the ManagedCluster definition allowing to specify workloadAutoScalerProfile. */ + interface WithWorkloadAutoScalerProfile { + /** + * Specifies the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster.. + * + * @param workloadAutoScalerProfile Workload Auto-scaler profile for the managed cluster. + * @return the next definition stage. + */ + WithCreate withWorkloadAutoScalerProfile(ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify azureMonitorProfile. */ + interface WithAzureMonitorProfile { + /** + * Specifies the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed + * cluster.. + * + * @param azureMonitorProfile Azure Monitor addon profiles for monitoring the managed cluster. + * @return the next definition stage. + */ + WithCreate withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile); + } + + /** The stage of the ManagedCluster definition allowing to specify serviceMeshProfile. */ + interface WithServiceMeshProfile { + /** + * Specifies the serviceMeshProfile property: Service mesh profile for a managed cluster.. + * + * @param serviceMeshProfile Service mesh profile for a managed cluster. + * @return the next definition stage. + */ + WithCreate withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile); + } + } + + /** + * Begins update for the ManagedCluster resource. + * + * @return the stage of resource update. + */ + ManagedCluster.Update update(); + + /** The template for ManagedCluster update. */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ManagedCluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ManagedCluster apply(Context context); + } + + /** The ManagedCluster update stages. */ + interface UpdateStages { + /** The stage of the ManagedCluster update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ManagedCluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ManagedCluster refresh(Context context); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + Response listClusterAdminCredentialsWithResponse(String serverFqdn, Context context); + + /** + * Lists the admin credentials of a managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + CredentialResults listClusterAdminCredentials(); + + /** + * Lists the user credentials of a managed cluster. + * + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin + * binary in the path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + Response listClusterUserCredentialsWithResponse( + String serverFqdn, Format format, Context context); + + /** + * Lists the user credentials of a managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + CredentialResults listClusterUserCredentials(); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + Response listClusterMonitoringUserCredentialsWithResponse(String serverFqdn, Context context); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + CredentialResults listClusterMonitoringUserCredentials(); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resetServicePrincipalProfile(ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resetServicePrincipalProfile(ManagedClusterServicePrincipalProfile parameters, Context context); + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resetAadProfile(ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resetAadProfile(ManagedClusterAadProfile parameters, Context context); + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateClusterCertificates(); + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateClusterCertificates(Context context); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateServiceAccountSigningKeys(); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateServiceAccountSigningKeys(Context context); + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(); + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(Context context); + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(); + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(Context context); + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param requestPayload The run command request. + * @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 run command result. + */ + RunCommandResult runCommand(RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param requestPayload The run command request. + * @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 run command result. + */ + RunCommandResult runCommand(RunCommandRequest requestPayload, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAadProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAadProfile.java new file mode 100644 index 0000000000000..d1f2e2a263ded --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAadProfile.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * AADProfile specifies attributes for Azure Active Directory integration. + * + *

For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). + */ +@Fluent +public final class ManagedClusterAadProfile { + /* + * Whether to enable managed AAD. + */ + @JsonProperty(value = "managed") + private Boolean managed; + + /* + * Whether to enable Azure RBAC for Kubernetes authorization. + */ + @JsonProperty(value = "enableAzureRBAC") + private Boolean enableAzureRbac; + + /* + * The list of AAD group object IDs that will have admin role of the cluster. + */ + @JsonProperty(value = "adminGroupObjectIDs") + private List adminGroupObjectIDs; + + /* + * (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + */ + @JsonProperty(value = "clientAppID") + private String clientAppId; + + /* + * (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + */ + @JsonProperty(value = "serverAppID") + private String serverAppId; + + /* + * (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + */ + @JsonProperty(value = "serverAppSecret") + private String serverAppSecret; + + /* + * The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment + * subscription. + */ + @JsonProperty(value = "tenantID") + private String tenantId; + + /** Creates an instance of ManagedClusterAadProfile class. */ + public ManagedClusterAadProfile() { + } + + /** + * Get the managed property: Whether to enable managed AAD. + * + * @return the managed value. + */ + public Boolean managed() { + return this.managed; + } + + /** + * Set the managed property: Whether to enable managed AAD. + * + * @param managed the managed value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withManaged(Boolean managed) { + this.managed = managed; + return this; + } + + /** + * Get the enableAzureRbac property: Whether to enable Azure RBAC for Kubernetes authorization. + * + * @return the enableAzureRbac value. + */ + public Boolean enableAzureRbac() { + return this.enableAzureRbac; + } + + /** + * Set the enableAzureRbac property: Whether to enable Azure RBAC for Kubernetes authorization. + * + * @param enableAzureRbac the enableAzureRbac value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withEnableAzureRbac(Boolean enableAzureRbac) { + this.enableAzureRbac = enableAzureRbac; + return this; + } + + /** + * Get the adminGroupObjectIDs property: The list of AAD group object IDs that will have admin role of the cluster. + * + * @return the adminGroupObjectIDs value. + */ + public List adminGroupObjectIDs() { + return this.adminGroupObjectIDs; + } + + /** + * Set the adminGroupObjectIDs property: The list of AAD group object IDs that will have admin role of the cluster. + * + * @param adminGroupObjectIDs the adminGroupObjectIDs value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withAdminGroupObjectIDs(List adminGroupObjectIDs) { + this.adminGroupObjectIDs = adminGroupObjectIDs; + return this; + } + + /** + * Get the clientAppId property: (DEPRECATED) The client AAD application ID. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @return the clientAppId value. + */ + public String clientAppId() { + return this.clientAppId; + } + + /** + * Set the clientAppId property: (DEPRECATED) The client AAD application ID. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @param clientAppId the clientAppId value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withClientAppId(String clientAppId) { + this.clientAppId = clientAppId; + return this; + } + + /** + * Get the serverAppId property: (DEPRECATED) The server AAD application ID. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @return the serverAppId value. + */ + public String serverAppId() { + return this.serverAppId; + } + + /** + * Set the serverAppId property: (DEPRECATED) The server AAD application ID. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @param serverAppId the serverAppId value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withServerAppId(String serverAppId) { + this.serverAppId = serverAppId; + return this; + } + + /** + * Get the serverAppSecret property: (DEPRECATED) The server AAD application secret. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @return the serverAppSecret value. + */ + public String serverAppSecret() { + return this.serverAppSecret; + } + + /** + * Set the serverAppSecret property: (DEPRECATED) The server AAD application secret. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @param serverAppSecret the serverAppSecret value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withServerAppSecret(String serverAppSecret) { + this.serverAppSecret = serverAppSecret; + return this; + } + + /** + * 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. + */ + 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 + * the deployment subscription. + * + * @param tenantId the tenantId value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAccessProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAccessProfile.java new file mode 100644 index 0000000000000..48f8f1f633f01 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAccessProfile.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import java.util.Map; + +/** An immutable client-side representation of ManagedClusterAccessProfile. */ +public interface ManagedClusterAccessProfile { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeConfig value. + */ + byte[] kubeConfig(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner + * object. + * + * @return the inner object. + */ + ManagedClusterAccessProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfile.java new file mode 100644 index 0000000000000..c9bd084d4ad45 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfile.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A Kubernetes add-on profile for a managed cluster. */ +@Fluent +public final class ManagedClusterAddonProfile { + /* + * Whether the add-on is enabled or not. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * Key-value pairs for configuring an add-on. + */ + @JsonProperty(value = "config") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map config; + + /* + * Information of user assigned identity used by this add-on. + */ + @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterAddonProfileIdentity identity; + + /** Creates an instance of ManagedClusterAddonProfile class. */ + public ManagedClusterAddonProfile() { + } + + /** + * Get the enabled property: Whether the add-on is enabled or not. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether the add-on is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAddonProfile object itself. + */ + public ManagedClusterAddonProfile withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the config property: Key-value pairs for configuring an add-on. + * + * @return the config value. + */ + public Map config() { + return this.config; + } + + /** + * Set the config property: Key-value pairs for configuring an add-on. + * + * @param config the config value to set. + * @return the ManagedClusterAddonProfile object itself. + */ + public ManagedClusterAddonProfile withConfig(Map config) { + this.config = config; + return this; + } + + /** + * Get the identity property: Information of user assigned identity used by this add-on. + * + * @return the identity value. + */ + public ManagedClusterAddonProfileIdentity identity() { + return this.identity; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfileIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfileIdentity.java new file mode 100644 index 0000000000000..474af7bf2c35f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfileIdentity.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; + +/** Information of user assigned identity used by this add-on. */ +@Fluent +public final class ManagedClusterAddonProfileIdentity extends UserAssignedIdentity { + /** Creates an instance of ManagedClusterAddonProfileIdentity class. */ + public ManagedClusterAddonProfileIdentity() { + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAddonProfileIdentity withResourceId(String resourceId) { + super.withResourceId(resourceId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAddonProfileIdentity withClientId(String clientId) { + super.withClientId(clientId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAddonProfileIdentity withObjectId(String objectId) { + super.withObjectId(objectId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAgentPoolProfile.java new file mode 100644 index 0000000000000..c9e8bde26735f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAgentPoolProfile.java @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAgentPoolProfileProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Profile for the container service agent pool. */ +@Fluent +public final class ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { + /* + * Unique name of the agent pool profile in the context of the subscription and resource group. + * + * Windows agent pool names must be 6 characters or less. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** Creates an instance of ManagedClusterAgentPoolProfile class. */ + public ManagedClusterAgentPoolProfile() { + } + + /** + * Get the name property: Unique name of the agent pool profile in the context of the subscription and resource + * group. + * + *

Windows agent pool names must be 6 characters or less. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Unique name of the agent pool profile in the context of the subscription and resource + * group. + * + *

Windows agent pool names must be 6 characters or less. + * + * @param name the name value to set. + * @return the ManagedClusterAgentPoolProfile object itself. + */ + public ManagedClusterAgentPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withCount(Integer count) { + super.withCount(count); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withVmSize(String vmSize) { + super.withVmSize(vmSize); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withOsDiskSizeGB(Integer osDiskSizeGB) { + super.withOsDiskSizeGB(osDiskSizeGB); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withOsDiskType(OSDiskType osDiskType) { + super.withOsDiskType(osDiskType); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withKubeletDiskType(KubeletDiskType kubeletDiskType) { + super.withKubeletDiskType(kubeletDiskType); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + super.withWorkloadRuntime(workloadRuntime); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withVnetSubnetId(String vnetSubnetId) { + super.withVnetSubnetId(vnetSubnetId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withPodSubnetId(String podSubnetId) { + super.withPodSubnetId(podSubnetId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withMaxPods(Integer maxPods) { + super.withMaxPods(maxPods); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withOsType(OSType osType) { + super.withOsType(osType); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withOsSku(Ossku osSku) { + super.withOsSku(osSku); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withMaxCount(Integer maxCount) { + super.withMaxCount(maxCount); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withMinCount(Integer minCount) { + super.withMinCount(minCount); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withEnableAutoScaling(Boolean enableAutoScaling) { + super.withEnableAutoScaling(enableAutoScaling); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withScaleDownMode(ScaleDownMode scaleDownMode) { + super.withScaleDownMode(scaleDownMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withType(AgentPoolType type) { + super.withType(type); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withMode(AgentPoolMode mode) { + super.withMode(mode); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withOrchestratorVersion(String orchestratorVersion) { + super.withOrchestratorVersion(orchestratorVersion); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + super.withUpgradeSettings(upgradeSettings); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withPowerState(PowerState powerState) { + super.withPowerState(powerState); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withAvailabilityZones(List availabilityZones) { + super.withAvailabilityZones(availabilityZones); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withEnableNodePublicIp(Boolean enableNodePublicIp) { + super.withEnableNodePublicIp(enableNodePublicIp); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + super.withNodePublicIpPrefixId(nodePublicIpPrefixId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + super.withScaleSetPriority(scaleSetPriority); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + super.withScaleSetEvictionPolicy(scaleSetEvictionPolicy); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withSpotMaxPrice(Float spotMaxPrice) { + super.withSpotMaxPrice(spotMaxPrice); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withNodeLabels(Map nodeLabels) { + super.withNodeLabels(nodeLabels); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withNodeTaints(List nodeTaints) { + super.withNodeTaints(nodeTaints); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withProximityPlacementGroupId(String proximityPlacementGroupId) { + super.withProximityPlacementGroupId(proximityPlacementGroupId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withKubeletConfig(KubeletConfig kubeletConfig) { + super.withKubeletConfig(kubeletConfig); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + super.withLinuxOSConfig(linuxOSConfig); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + super.withEnableEncryptionAtHost(enableEncryptionAtHost); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withEnableUltraSsd(Boolean enableUltraSsd) { + super.withEnableUltraSsd(enableUltraSsd); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withEnableFips(Boolean enableFips) { + super.withEnableFips(enableFips); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + super.withGpuInstanceProfile(gpuInstanceProfile); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withCreationData(CreationData creationData) { + super.withCreationData(creationData); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withHostGroupId(String hostGroupId) { + super.withHostGroupId(hostGroupId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model ManagedClusterAgentPoolProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterAgentPoolProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterApiServerAccessProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterApiServerAccessProfile.java new file mode 100644 index 0000000000000..e06b50156a7fa --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterApiServerAccessProfile.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Access profile for managed cluster API server. */ +@Fluent +public final class ManagedClusterApiServerAccessProfile { + /* + * The IP ranges authorized to access the Kubernetes API server. + * + * IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters + * that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API + * server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + */ + @JsonProperty(value = "authorizedIPRanges") + private List authorizedIpRanges; + + /* + * Whether to create the cluster as a private cluster or not. + * + * For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + */ + @JsonProperty(value = "enablePrivateCluster") + private Boolean enablePrivateCluster; + + /* + * The private DNS zone mode for the cluster. + * + * The default is System. For more details see [configure private DNS + * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are + * 'system' and 'none'. + */ + @JsonProperty(value = "privateDNSZone") + private String privateDnsZone; + + /* + * Whether to create additional public FQDN for private cluster or not. + */ + @JsonProperty(value = "enablePrivateClusterPublicFQDN") + private Boolean enablePrivateClusterPublicFqdn; + + /* + * Whether to disable run command for the cluster or not. + */ + @JsonProperty(value = "disableRunCommand") + private Boolean disableRunCommand; + + /** Creates an instance of ManagedClusterApiServerAccessProfile class. */ + public ManagedClusterApiServerAccessProfile() { + } + + /** + * Get the authorizedIpRanges property: The IP ranges authorized to access the Kubernetes API server. + * + *

IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters + * that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API + * server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + * + * @return the authorizedIpRanges value. + */ + public List authorizedIpRanges() { + return this.authorizedIpRanges; + } + + /** + * Set the authorizedIpRanges property: The IP ranges authorized to access the Kubernetes API server. + * + *

IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters + * that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API + * server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + * + * @param authorizedIpRanges the authorizedIpRanges value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withAuthorizedIpRanges(List authorizedIpRanges) { + this.authorizedIpRanges = authorizedIpRanges; + return this; + } + + /** + * Get the enablePrivateCluster property: Whether to create the cluster as a private cluster or not. + * + *

For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + * + * @return the enablePrivateCluster value. + */ + public Boolean enablePrivateCluster() { + return this.enablePrivateCluster; + } + + /** + * Set the enablePrivateCluster property: Whether to create the cluster as a private cluster or not. + * + *

For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + * + * @param enablePrivateCluster the enablePrivateCluster value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withEnablePrivateCluster(Boolean enablePrivateCluster) { + this.enablePrivateCluster = enablePrivateCluster; + return this; + } + + /** + * Get the privateDnsZone property: The private DNS zone mode for the cluster. + * + *

The default is System. For more details see [configure private DNS + * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are + * 'system' and 'none'. + * + * @return the privateDnsZone value. + */ + public String privateDnsZone() { + return this.privateDnsZone; + } + + /** + * Set the privateDnsZone property: The private DNS zone mode for the cluster. + * + *

The default is System. For more details see [configure private DNS + * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are + * 'system' and 'none'. + * + * @param privateDnsZone the privateDnsZone value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withPrivateDnsZone(String privateDnsZone) { + this.privateDnsZone = privateDnsZone; + return this; + } + + /** + * Get the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or + * not. + * + * @return the enablePrivateClusterPublicFqdn value. + */ + public Boolean enablePrivateClusterPublicFqdn() { + return this.enablePrivateClusterPublicFqdn; + } + + /** + * Set the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or + * not. + * + * @param enablePrivateClusterPublicFqdn the enablePrivateClusterPublicFqdn value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withEnablePrivateClusterPublicFqdn( + Boolean enablePrivateClusterPublicFqdn) { + this.enablePrivateClusterPublicFqdn = enablePrivateClusterPublicFqdn; + return this; + } + + /** + * Get the disableRunCommand property: Whether to disable run command for the cluster or not. + * + * @return the disableRunCommand value. + */ + public Boolean disableRunCommand() { + return this.disableRunCommand; + } + + /** + * Set the disableRunCommand property: Whether to disable run command for the cluster or not. + * + * @param disableRunCommand the disableRunCommand value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withDisableRunCommand(Boolean disableRunCommand) { + this.disableRunCommand = disableRunCommand; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAutoUpgradeProfile.java new file mode 100644 index 0000000000000..12905a74829bc --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAutoUpgradeProfile.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Auto upgrade profile for a managed cluster. */ +@Fluent +public final class ManagedClusterAutoUpgradeProfile { + /* + * The upgrade channel for auto upgrade. The default is 'none'. + * + * For more information see [setting the AKS cluster auto-upgrade + * channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + */ + @JsonProperty(value = "upgradeChannel") + private UpgradeChannel upgradeChannel; + + /* + * Node OS Upgrade Channel + * + * Manner in which the OS on your nodes is updated. The default is NodeImage. + */ + @JsonProperty(value = "nodeOSUpgradeChannel") + private NodeOSUpgradeChannel nodeOSUpgradeChannel; + + /** Creates an instance of ManagedClusterAutoUpgradeProfile class. */ + public ManagedClusterAutoUpgradeProfile() { + } + + /** + * Get the upgradeChannel property: The upgrade channel for auto upgrade. The default is 'none'. + * + *

For more information see [setting the AKS cluster auto-upgrade + * channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + * + * @return the upgradeChannel value. + */ + public UpgradeChannel upgradeChannel() { + return this.upgradeChannel; + } + + /** + * Set the upgradeChannel property: The upgrade channel for auto upgrade. The default is 'none'. + * + *

For more information see [setting the AKS cluster auto-upgrade + * channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + * + * @param upgradeChannel the upgradeChannel value to set. + * @return the ManagedClusterAutoUpgradeProfile object itself. + */ + public ManagedClusterAutoUpgradeProfile withUpgradeChannel(UpgradeChannel upgradeChannel) { + this.upgradeChannel = upgradeChannel; + return this; + } + + /** + * Get the nodeOSUpgradeChannel property: Node OS Upgrade Channel + * + *

Manner in which the OS on your nodes is updated. The default is NodeImage. + * + * @return the nodeOSUpgradeChannel value. + */ + public NodeOSUpgradeChannel nodeOSUpgradeChannel() { + return this.nodeOSUpgradeChannel; + } + + /** + * Set the nodeOSUpgradeChannel property: Node OS Upgrade Channel + * + *

Manner in which the OS on your nodes is updated. The default is NodeImage. + * + * @param nodeOSUpgradeChannel the nodeOSUpgradeChannel value to set. + * @return the ManagedClusterAutoUpgradeProfile object itself. + */ + public ManagedClusterAutoUpgradeProfile withNodeOSUpgradeChannel(NodeOSUpgradeChannel nodeOSUpgradeChannel) { + this.nodeOSUpgradeChannel = nodeOSUpgradeChannel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfile.java new file mode 100644 index 0000000000000..ee9438a64ed6f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfile.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Monitor addon profiles for monitoring the managed cluster. */ +@Fluent +public final class ManagedClusterAzureMonitorProfile { + /* + * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes + * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom + * targets. See aka.ms/AzureManagedPrometheus for an overview. + */ + @JsonProperty(value = "metrics") + private ManagedClusterAzureMonitorProfileMetrics metrics; + + /** Creates an instance of ManagedClusterAzureMonitorProfile class. */ + public ManagedClusterAzureMonitorProfile() { + } + + /** + * Get the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect + * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional + * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. + * + * @return the metrics value. + */ + public ManagedClusterAzureMonitorProfileMetrics metrics() { + return this.metrics; + } + + /** + * Set the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect + * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional + * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. + * + * @param metrics the metrics value to set. + * @return the ManagedClusterAzureMonitorProfile object itself. + */ + public ManagedClusterAzureMonitorProfile withMetrics(ManagedClusterAzureMonitorProfileMetrics metrics) { + this.metrics = metrics; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metrics() != null) { + metrics().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java new file mode 100644 index 0000000000000..e1700cf26d3ea --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the + * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for + * details. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileKubeStateMetrics { + /* + * Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric + * (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only + * resource name and namespace labels. + */ + @JsonProperty(value = "metricLabelsAllowlist") + private String metricLabelsAllowlist; + + /* + * Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: + * 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric contains only + * resource name and namespace labels. + */ + @JsonProperty(value = "metricAnnotationsAllowList") + private String metricAnnotationsAllowList; + + /** Creates an instance of ManagedClusterAzureMonitorProfileKubeStateMetrics class. */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics() { + } + + /** + * Get the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be + * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By + * default the metric contains only resource name and namespace labels. + * + * @return the metricLabelsAllowlist value. + */ + public String metricLabelsAllowlist() { + return this.metricLabelsAllowlist; + } + + /** + * Set the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be + * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By + * default the metric contains only resource name and namespace labels. + * + * @param metricLabelsAllowlist the metricLabelsAllowlist value to set. + * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics withMetricLabelsAllowlist(String metricLabelsAllowlist) { + this.metricLabelsAllowlist = metricLabelsAllowlist; + return this; + } + + /** + * Get the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used + * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). + * By default the metric contains only resource name and namespace labels. + * + * @return the metricAnnotationsAllowList value. + */ + public String metricAnnotationsAllowList() { + return this.metricAnnotationsAllowList; + } + + /** + * Set the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used + * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). + * By default the metric contains only resource name and namespace labels. + * + * @param metricAnnotationsAllowList the metricAnnotationsAllowList value to set. + * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics withMetricAnnotationsAllowList( + String metricAnnotationsAllowList) { + this.metricAnnotationsAllowList = metricAnnotationsAllowList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileMetrics.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileMetrics.java new file mode 100644 index 0000000000000..2ee3c67ee960c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileMetrics.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes + * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. + * See aka.ms/AzureManagedPrometheus for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileMetrics { + /* + * Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See + * aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the + * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters + * for details. + */ + @JsonProperty(value = "kubeStateMetrics") + private ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics; + + /** Creates an instance of ManagedClusterAzureMonitorProfileMetrics class. */ + public ManagedClusterAzureMonitorProfileMetrics() { + } + + /** + * Get the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus + * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus + * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileMetrics withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These + * optional settings are for the kube-state-metrics pod that is deployed with the addon. See + * aka.ms/AzureManagedPrometheus-optional-parameters for details. + * + * @return the kubeStateMetrics value. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics() { + return this.kubeStateMetrics; + } + + /** + * Set the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These + * optional settings are for the kube-state-metrics pod that is deployed with the addon. See + * aka.ms/AzureManagedPrometheus-optional-parameters for details. + * + * @param kubeStateMetrics the kubeStateMetrics value to set. + * @return the ManagedClusterAzureMonitorProfileMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileMetrics withKubeStateMetrics( + ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics) { + this.kubeStateMetrics = kubeStateMetrics; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubeStateMetrics() != null) { + kubeStateMetrics().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterHttpProxyConfig.java new file mode 100644 index 0000000000000..5f2f75f337e12 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterHttpProxyConfig.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Cluster HTTP proxy configuration. */ +@Fluent +public final class ManagedClusterHttpProxyConfig { + /* + * The HTTP proxy server endpoint to use. + */ + @JsonProperty(value = "httpProxy") + private String httpProxy; + + /* + * The HTTPS proxy server endpoint to use. + */ + @JsonProperty(value = "httpsProxy") + private String httpsProxy; + + /* + * The endpoints that should not go through proxy. + */ + @JsonProperty(value = "noProxy") + private List noProxy; + + /* + * Alternative CA cert to use for connecting to proxy servers. + */ + @JsonProperty(value = "trustedCa") + private String trustedCa; + + /** Creates an instance of ManagedClusterHttpProxyConfig class. */ + public ManagedClusterHttpProxyConfig() { + } + + /** + * Get the httpProxy property: The HTTP proxy server endpoint to use. + * + * @return the httpProxy value. + */ + public String httpProxy() { + return this.httpProxy; + } + + /** + * Set the httpProxy property: The HTTP proxy server endpoint to use. + * + * @param httpProxy the httpProxy value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withHttpProxy(String httpProxy) { + this.httpProxy = httpProxy; + return this; + } + + /** + * Get the httpsProxy property: The HTTPS proxy server endpoint to use. + * + * @return the httpsProxy value. + */ + public String httpsProxy() { + return this.httpsProxy; + } + + /** + * Set the httpsProxy property: The HTTPS proxy server endpoint to use. + * + * @param httpsProxy the httpsProxy value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withHttpsProxy(String httpsProxy) { + this.httpsProxy = httpsProxy; + return this; + } + + /** + * Get the noProxy property: The endpoints that should not go through proxy. + * + * @return the noProxy value. + */ + public List noProxy() { + return this.noProxy; + } + + /** + * Set the noProxy property: The endpoints that should not go through proxy. + * + * @param noProxy the noProxy value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withNoProxy(List noProxy) { + this.noProxy = noProxy; + return this; + } + + /** + * Get the trustedCa property: Alternative CA cert to use for connecting to proxy servers. + * + * @return the trustedCa value. + */ + public String trustedCa() { + return this.trustedCa; + } + + /** + * Set the trustedCa property: Alternative CA cert to use for connecting to proxy servers. + * + * @param trustedCa the trustedCa value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withTrustedCa(String trustedCa) { + this.trustedCa = trustedCa; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIdentity.java new file mode 100644 index 0000000000000..0c1816eab5aad --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIdentity.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Identity for the managed cluster. */ +@Fluent +public final class ManagedClusterIdentity { + /* + * The principal id of the system assigned identity which is used by master components. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The tenant id of the system assigned identity which is used by master components. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /* + * The type of identity used for the managed cluster. + * + * For more information see [use managed identities in + * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + */ + @JsonProperty(value = "type") + private ResourceIdentityType type; + + /* + * The delegated identity resources assigned to this managed cluster. This can only be set by another Azure + * Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only. + */ + @JsonProperty(value = "delegatedResources") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map delegatedResources; + + /* + * The keys must be ARM resource IDs in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map userAssignedIdentities; + + /** Creates an instance of ManagedClusterIdentity class. */ + public ManagedClusterIdentity() { + } + + /** + * Get the principalId property: The principal id of the system assigned identity which is used by master + * components. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant id of the system assigned identity which is used by master components. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The type of identity used for the managed cluster. + * + *

For more information see [use managed identities in + * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + * + * @return the type value. + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of identity used for the managed cluster. + * + *

For more information see [use managed identities in + * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + * + * @param type the type value to set. + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the delegatedResources property: The delegated identity resources assigned to this managed cluster. This can + * only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. + * Internal use only. + * + * @return the delegatedResources value. + */ + public Map delegatedResources() { + return this.delegatedResources; + } + + /** + * Set the delegatedResources property: The delegated identity resources assigned to this managed cluster. This can + * only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. + * Internal use only. + * + * @param delegatedResources the delegatedResources value to set. + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withDelegatedResources(Map delegatedResources) { + this.delegatedResources = delegatedResources; + return this; + } + + /** + * Get the userAssignedIdentities property: The keys must be ARM resource IDs in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The keys must be ARM resource IDs in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withUserAssignedIdentities( + Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (delegatedResources() != null) { + delegatedResources() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterListResult.java new file mode 100644 index 0000000000000..c24fde266b7ca --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List Managed Clusters operation. */ +@Fluent +public final class ManagedClusterListResult { + /* + * The list of managed clusters. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of managed cluster results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of ManagedClusterListResult class. */ + public ManagedClusterListResult() { + } + + /** + * Get the value property: The list of managed clusters. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of managed clusters. + * + * @param value the value value to set. + * @return the ManagedClusterListResult object itself. + */ + public ManagedClusterListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of managed cluster results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfile.java new file mode 100644 index 0000000000000..c439f89da9795 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfile.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Profile of the managed cluster load balancer. */ +@Fluent +public final class ManagedClusterLoadBalancerProfile { + /* + * Desired managed outbound IPs for the cluster load balancer. + */ + @JsonProperty(value = "managedOutboundIPs") + private ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs; + + /* + * Desired outbound IP Prefix resources for the cluster load balancer. + */ + @JsonProperty(value = "outboundIPPrefixes") + private ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes; + + /* + * Desired outbound IP resources for the cluster load balancer. + */ + @JsonProperty(value = "outboundIPs") + private ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs; + + /* + * The effective outbound IP resources of the cluster load balancer. + */ + @JsonProperty(value = "effectiveOutboundIPs") + private List effectiveOutboundIPs; + + /* + * The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). + * The default value is 0 which results in Azure dynamically allocating ports. + */ + @JsonProperty(value = "allocatedOutboundPorts") + private Integer allocatedOutboundPorts; + + /* + * Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The + * default value is 30 minutes. + */ + @JsonProperty(value = "idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /* + * Enable multiple standard load balancers per AKS cluster or not. + */ + @JsonProperty(value = "enableMultipleStandardLoadBalancers") + private Boolean enableMultipleStandardLoadBalancers; + + /** Creates an instance of ManagedClusterLoadBalancerProfile class. */ + public ManagedClusterLoadBalancerProfile() { + } + + /** + * Get the managedOutboundIPs property: Desired managed outbound IPs for the cluster load balancer. + * + * @return the managedOutboundIPs value. + */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs() { + return this.managedOutboundIPs; + } + + /** + * Set the managedOutboundIPs property: Desired managed outbound IPs for the cluster load balancer. + * + * @param managedOutboundIPs the managedOutboundIPs value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withManagedOutboundIPs( + ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs) { + this.managedOutboundIPs = managedOutboundIPs; + return this; + } + + /** + * Get the outboundIpPrefixes property: Desired outbound IP Prefix resources for the cluster load balancer. + * + * @return the outboundIpPrefixes value. + */ + public ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes() { + return this.outboundIpPrefixes; + } + + /** + * Set the outboundIpPrefixes property: Desired outbound IP Prefix resources for the cluster load balancer. + * + * @param outboundIpPrefixes the outboundIpPrefixes value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withOutboundIpPrefixes( + ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes) { + this.outboundIpPrefixes = outboundIpPrefixes; + return this; + } + + /** + * Get the outboundIPs property: Desired outbound IP resources for the cluster load balancer. + * + * @return the outboundIPs value. + */ + public ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs() { + return this.outboundIPs; + } + + /** + * Set the outboundIPs property: Desired outbound IP resources for the cluster load balancer. + * + * @param outboundIPs the outboundIPs value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withOutboundIPs(ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs) { + this.outboundIPs = outboundIPs; + return this; + } + + /** + * Get the effectiveOutboundIPs property: The effective outbound IP resources of the cluster load balancer. + * + * @return the effectiveOutboundIPs value. + */ + public List effectiveOutboundIPs() { + return this.effectiveOutboundIPs; + } + + /** + * Set the effectiveOutboundIPs property: The effective outbound IP resources of the cluster load balancer. + * + * @param effectiveOutboundIPs the effectiveOutboundIPs value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withEffectiveOutboundIPs(List effectiveOutboundIPs) { + this.effectiveOutboundIPs = effectiveOutboundIPs; + return this; + } + + /** + * Get the allocatedOutboundPorts property: The desired number of allocated SNAT ports per VM. Allowed values are in + * the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. + * + * @return the allocatedOutboundPorts value. + */ + public Integer allocatedOutboundPorts() { + return this.allocatedOutboundPorts; + } + + /** + * Set the allocatedOutboundPorts property: The desired number of allocated SNAT ports per VM. Allowed values are in + * the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. + * + * @param allocatedOutboundPorts the allocatedOutboundPorts value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withAllocatedOutboundPorts(Integer allocatedOutboundPorts) { + this.allocatedOutboundPorts = allocatedOutboundPorts; + return this; + } + + /** + * Get the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the + * range of 4 to 120 (inclusive). The default value is 30 minutes. + * + * @return the idleTimeoutInMinutes value. + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the + * range of 4 to 120 (inclusive). The default value is 30 minutes. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get the enableMultipleStandardLoadBalancers property: Enable multiple standard load balancers per AKS cluster or + * not. + * + * @return the enableMultipleStandardLoadBalancers value. + */ + public Boolean enableMultipleStandardLoadBalancers() { + return this.enableMultipleStandardLoadBalancers; + } + + /** + * Set the enableMultipleStandardLoadBalancers property: Enable multiple standard load balancers per AKS cluster or + * not. + * + * @param enableMultipleStandardLoadBalancers the enableMultipleStandardLoadBalancers value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withEnableMultipleStandardLoadBalancers( + Boolean enableMultipleStandardLoadBalancers) { + this.enableMultipleStandardLoadBalancers = enableMultipleStandardLoadBalancers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedOutboundIPs() != null) { + managedOutboundIPs().validate(); + } + if (outboundIpPrefixes() != null) { + outboundIpPrefixes().validate(); + } + if (outboundIPs() != null) { + outboundIPs().validate(); + } + if (effectiveOutboundIPs() != null) { + effectiveOutboundIPs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java new file mode 100644 index 0000000000000..227c4ae9f8374 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Desired managed outbound IPs for the cluster load balancer. */ +@Fluent +public final class ManagedClusterLoadBalancerProfileManagedOutboundIPs { + /* + * The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values + * must be in the range of 1 to 100 (inclusive). The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /* + * The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values + * must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + */ + @JsonProperty(value = "countIPv6") + private Integer countIPv6; + + /** Creates an instance of ManagedClusterLoadBalancerProfileManagedOutboundIPs class. */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs() { + } + + /** + * Get the count property: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load + * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load + * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + * + * @param count the count value to set. + * @return the ManagedClusterLoadBalancerProfileManagedOutboundIPs object itself. + */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the countIPv6 property: The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load + * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack + * and 1 for dual-stack. + * + * @return the countIPv6 value. + */ + public Integer countIPv6() { + return this.countIPv6; + } + + /** + * Set the countIPv6 property: The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load + * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack + * and 1 for dual-stack. + * + * @param countIPv6 the countIPv6 value to set. + * @return the ManagedClusterLoadBalancerProfileManagedOutboundIPs object itself. + */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs withCountIPv6(Integer countIPv6) { + this.countIPv6 = countIPv6; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java new file mode 100644 index 0000000000000..6920a08b73caf --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Desired outbound IP resources for the cluster load balancer. */ +@Fluent +public final class ManagedClusterLoadBalancerProfileOutboundIPs { + /* + * A list of public IP resources. + */ + @JsonProperty(value = "publicIPs") + private List publicIPs; + + /** Creates an instance of ManagedClusterLoadBalancerProfileOutboundIPs class. */ + public ManagedClusterLoadBalancerProfileOutboundIPs() { + } + + /** + * Get the publicIPs property: A list of public IP resources. + * + * @return the publicIPs value. + */ + public List publicIPs() { + return this.publicIPs; + } + + /** + * Set the publicIPs property: A list of public IP resources. + * + * @param publicIPs the publicIPs value to set. + * @return the ManagedClusterLoadBalancerProfileOutboundIPs object itself. + */ + public ManagedClusterLoadBalancerProfileOutboundIPs withPublicIPs(List publicIPs) { + this.publicIPs = publicIPs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicIPs() != null) { + publicIPs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java new file mode 100644 index 0000000000000..45ff211b54aed --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Desired outbound IP Prefix resources for the cluster load balancer. */ +@Fluent +public final class ManagedClusterLoadBalancerProfileOutboundIpPrefixes { + /* + * A list of public IP prefix resources. + */ + @JsonProperty(value = "publicIPPrefixes") + private List publicIpPrefixes; + + /** Creates an instance of ManagedClusterLoadBalancerProfileOutboundIpPrefixes class. */ + public ManagedClusterLoadBalancerProfileOutboundIpPrefixes() { + } + + /** + * Get the publicIpPrefixes property: A list of public IP prefix resources. + * + * @return the publicIpPrefixes value. + */ + public List publicIpPrefixes() { + return this.publicIpPrefixes; + } + + /** + * Set the publicIpPrefixes property: A list of public IP prefix resources. + * + * @param publicIpPrefixes the publicIpPrefixes value to set. + * @return the ManagedClusterLoadBalancerProfileOutboundIpPrefixes object itself. + */ + public ManagedClusterLoadBalancerProfileOutboundIpPrefixes withPublicIpPrefixes( + List publicIpPrefixes) { + this.publicIpPrefixes = publicIpPrefixes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicIpPrefixes() != null) { + publicIpPrefixes().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterManagedOutboundIpProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterManagedOutboundIpProfile.java new file mode 100644 index 0000000000000..555dd97af87a4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterManagedOutboundIpProfile.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Profile of the managed outbound IP resources of the managed cluster. */ +@Fluent +public final class ManagedClusterManagedOutboundIpProfile { + /* + * The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 + * (inclusive). The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /** Creates an instance of ManagedClusterManagedOutboundIpProfile class. */ + public ManagedClusterManagedOutboundIpProfile() { + } + + /** + * Get the count property: The desired number of outbound IPs created/managed by Azure. Allowed values must be in + * the range of 1 to 16 (inclusive). The default value is 1. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: The desired number of outbound IPs created/managed by Azure. Allowed values must be in + * the range of 1 to 16 (inclusive). The default value is 1. + * + * @param count the count value to set. + * @return the ManagedClusterManagedOutboundIpProfile object itself. + */ + public ManagedClusterManagedOutboundIpProfile withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNatGatewayProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNatGatewayProfile.java new file mode 100644 index 0000000000000..ff5b719538bf2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNatGatewayProfile.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Profile of the managed cluster NAT gateway. */ +@Fluent +public final class ManagedClusterNatGatewayProfile { + /* + * Profile of the managed outbound IP resources of the cluster NAT gateway. + */ + @JsonProperty(value = "managedOutboundIPProfile") + private ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile; + + /* + * The effective outbound IP resources of the cluster NAT gateway. + */ + @JsonProperty(value = "effectiveOutboundIPs") + private List effectiveOutboundIPs; + + /* + * Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The + * default value is 4 minutes. + */ + @JsonProperty(value = "idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** Creates an instance of ManagedClusterNatGatewayProfile class. */ + public ManagedClusterNatGatewayProfile() { + } + + /** + * Get the managedOutboundIpProfile property: Profile of the managed outbound IP resources of the cluster NAT + * gateway. + * + * @return the managedOutboundIpProfile value. + */ + public ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile() { + return this.managedOutboundIpProfile; + } + + /** + * Set the managedOutboundIpProfile property: Profile of the managed outbound IP resources of the cluster NAT + * gateway. + * + * @param managedOutboundIpProfile the managedOutboundIpProfile value to set. + * @return the ManagedClusterNatGatewayProfile object itself. + */ + public ManagedClusterNatGatewayProfile withManagedOutboundIpProfile( + ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile) { + this.managedOutboundIpProfile = managedOutboundIpProfile; + return this; + } + + /** + * Get the effectiveOutboundIPs property: The effective outbound IP resources of the cluster NAT gateway. + * + * @return the effectiveOutboundIPs value. + */ + public List effectiveOutboundIPs() { + return this.effectiveOutboundIPs; + } + + /** + * Set the effectiveOutboundIPs property: The effective outbound IP resources of the cluster NAT gateway. + * + * @param effectiveOutboundIPs the effectiveOutboundIPs value to set. + * @return the ManagedClusterNatGatewayProfile object itself. + */ + public ManagedClusterNatGatewayProfile withEffectiveOutboundIPs(List effectiveOutboundIPs) { + this.effectiveOutboundIPs = effectiveOutboundIPs; + return this; + } + + /** + * Get the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the + * range of 4 to 120 (inclusive). The default value is 4 minutes. + * + * @return the idleTimeoutInMinutes value. + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the + * range of 4 to 120 (inclusive). The default value is 4 minutes. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. + * @return the ManagedClusterNatGatewayProfile object itself. + */ + public ManagedClusterNatGatewayProfile withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedOutboundIpProfile() != null) { + managedOutboundIpProfile().validate(); + } + if (effectiveOutboundIPs() != null) { + effectiveOutboundIPs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterOidcIssuerProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterOidcIssuerProfile.java new file mode 100644 index 0000000000000..d42ff23d67f7a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterOidcIssuerProfile.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OIDC issuer profile of the Managed Cluster. */ +@Fluent +public final class ManagedClusterOidcIssuerProfile { + /* + * The OIDC issuer url of the Managed Cluster. + */ + @JsonProperty(value = "issuerURL", access = JsonProperty.Access.WRITE_ONLY) + private String issuerUrl; + + /* + * Whether the OIDC issuer is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** Creates an instance of ManagedClusterOidcIssuerProfile class. */ + public ManagedClusterOidcIssuerProfile() { + } + + /** + * Get the issuerUrl property: The OIDC issuer url of the Managed Cluster. + * + * @return the issuerUrl value. + */ + public String issuerUrl() { + return this.issuerUrl; + } + + /** + * Get the enabled property: Whether the OIDC issuer is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether the OIDC issuer is enabled. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterOidcIssuerProfile object itself. + */ + public ManagedClusterOidcIssuerProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentity.java new file mode 100644 index 0000000000000..e08d5af2b8f79 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentity.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details about the pod identity assigned to the Managed Cluster. */ +@Fluent +public final class ManagedClusterPodIdentity { + /* + * The name of the pod identity. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The namespace of the pod identity. + */ + @JsonProperty(value = "namespace", required = true) + private String namespace; + + /* + * The binding selector to use for the AzureIdentityBinding resource. + */ + @JsonProperty(value = "bindingSelector") + private String bindingSelector; + + /* + * The user assigned identity details. + */ + @JsonProperty(value = "identity", required = true) + private UserAssignedIdentity identity; + + /* + * The current provisioning state of the pod identity. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterPodIdentityProvisioningState provisioningState; + + /* + * The provisioningInfo property. + */ + @JsonProperty(value = "provisioningInfo", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterPodIdentityProvisioningInfo provisioningInfo; + + /** Creates an instance of ManagedClusterPodIdentity class. */ + public ManagedClusterPodIdentity() { + } + + /** + * Get the name property: The name of the pod identity. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the pod identity. + * + * @param name the name value to set. + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the namespace property: The namespace of the pod identity. + * + * @return the namespace value. + */ + public String namespace() { + return this.namespace; + } + + /** + * Set the namespace property: The namespace of the pod identity. + * + * @param namespace the namespace value to set. + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get the bindingSelector property: The binding selector to use for the AzureIdentityBinding resource. + * + * @return the bindingSelector value. + */ + public String bindingSelector() { + return this.bindingSelector; + } + + /** + * Set the bindingSelector property: The binding selector to use for the AzureIdentityBinding resource. + * + * @param bindingSelector the bindingSelector value to set. + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withBindingSelector(String bindingSelector) { + this.bindingSelector = bindingSelector; + return this; + } + + /** + * Get the identity property: The user assigned identity details. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The user assigned identity details. + * + * @param identity the identity value to set. + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withIdentity(UserAssignedIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the provisioningState property: The current provisioning state of the pod identity. + * + * @return the provisioningState value. + */ + public ManagedClusterPodIdentityProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningInfo property: The provisioningInfo property. + * + * @return the provisioningInfo value. + */ + public ManagedClusterPodIdentityProvisioningInfo provisioningInfo() { + return this.provisioningInfo; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ManagedClusterPodIdentity")); + } + if (namespace() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property namespace in model ManagedClusterPodIdentity")); + } + if (identity() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property identity in model ManagedClusterPodIdentity")); + } else { + identity().validate(); + } + if (provisioningInfo() != null) { + provisioningInfo().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPodIdentity.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityException.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityException.java new file mode 100644 index 0000000000000..acd307da6caa6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityException.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) + * endpoint without being intercepted by the node-managed identity (NMI) server. + * + *

See [disable AAD Pod Identity for a specific + * Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) for more details. + */ +@Fluent +public final class ManagedClusterPodIdentityException { + /* + * The name of the pod identity exception. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The namespace of the pod identity exception. + */ + @JsonProperty(value = "namespace", required = true) + private String namespace; + + /* + * The pod labels to match. + */ + @JsonProperty(value = "podLabels", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map podLabels; + + /** Creates an instance of ManagedClusterPodIdentityException class. */ + public ManagedClusterPodIdentityException() { + } + + /** + * Get the name property: The name of the pod identity exception. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the pod identity exception. + * + * @param name the name value to set. + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withName(String name) { + this.name = name; + return this; + } + + /** + * Get the namespace property: The namespace of the pod identity exception. + * + * @return the namespace value. + */ + public String namespace() { + return this.namespace; + } + + /** + * Set the namespace property: The namespace of the pod identity exception. + * + * @param namespace the namespace value to set. + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get the podLabels property: The pod labels to match. + * + * @return the podLabels value. + */ + public Map podLabels() { + return this.podLabels; + } + + /** + * Set the podLabels property: The pod labels to match. + * + * @param podLabels the podLabels value to set. + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withPodLabels(Map podLabels) { + this.podLabels = podLabels; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model ManagedClusterPodIdentityException")); + } + if (namespace() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property namespace in model ManagedClusterPodIdentityException")); + } + if (podLabels() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property podLabels in model ManagedClusterPodIdentityException")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPodIdentityException.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProfile.java new file mode 100644 index 0000000000000..9a85eb0140cee --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProfile.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The pod identity profile of the Managed Cluster. + * + *

See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod + * identity integration. + */ +@Fluent +public final class ManagedClusterPodIdentityProfile { + /* + * Whether the pod identity addon is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Whether pod identity is allowed to run on clusters with Kubenet networking. + * + * Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks + * of IP spoofing. See [using Kubenet network plugin with AAD Pod + * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + * for more information. + */ + @JsonProperty(value = "allowNetworkPluginKubenet") + private Boolean allowNetworkPluginKubenet; + + /* + * The pod identities to use in the cluster. + */ + @JsonProperty(value = "userAssignedIdentities") + private List userAssignedIdentities; + + /* + * The pod identity exceptions to allow. + */ + @JsonProperty(value = "userAssignedIdentityExceptions") + private List userAssignedIdentityExceptions; + + /** Creates an instance of ManagedClusterPodIdentityProfile class. */ + public ManagedClusterPodIdentityProfile() { + } + + /** + * Get the enabled property: Whether the pod identity addon is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether the pod identity addon is enabled. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the allowNetworkPluginKubenet property: Whether pod identity is allowed to run on clusters with Kubenet + * networking. + * + *

Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks + * of IP spoofing. See [using Kubenet network plugin with AAD Pod + * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + * for more information. + * + * @return the allowNetworkPluginKubenet value. + */ + public Boolean allowNetworkPluginKubenet() { + return this.allowNetworkPluginKubenet; + } + + /** + * Set the allowNetworkPluginKubenet property: Whether pod identity is allowed to run on clusters with Kubenet + * networking. + * + *

Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks + * of IP spoofing. See [using Kubenet network plugin with AAD Pod + * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + * for more information. + * + * @param allowNetworkPluginKubenet the allowNetworkPluginKubenet value to set. + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withAllowNetworkPluginKubenet(Boolean allowNetworkPluginKubenet) { + this.allowNetworkPluginKubenet = allowNetworkPluginKubenet; + return this; + } + + /** + * Get the userAssignedIdentities property: The pod identities to use in the cluster. + * + * @return the userAssignedIdentities value. + */ + public List userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The pod identities to use in the cluster. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withUserAssignedIdentities( + List userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Get the userAssignedIdentityExceptions property: The pod identity exceptions to allow. + * + * @return the userAssignedIdentityExceptions value. + */ + public List userAssignedIdentityExceptions() { + return this.userAssignedIdentityExceptions; + } + + /** + * Set the userAssignedIdentityExceptions property: The pod identity exceptions to allow. + * + * @param userAssignedIdentityExceptions the userAssignedIdentityExceptions value to set. + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withUserAssignedIdentityExceptions( + List userAssignedIdentityExceptions) { + this.userAssignedIdentityExceptions = userAssignedIdentityExceptions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userAssignedIdentities() != null) { + userAssignedIdentities().forEach(e -> e.validate()); + } + if (userAssignedIdentityExceptions() != null) { + userAssignedIdentityExceptions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningError.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningError.java new file mode 100644 index 0000000000000..87564ac613aa0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningError.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** An error response from the pod identity provisioning. */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningError { + /* + * Details about the error. + */ + @JsonProperty(value = "error") + private ManagedClusterPodIdentityProvisioningErrorBody error; + + /** Creates an instance of ManagedClusterPodIdentityProvisioningError class. */ + public ManagedClusterPodIdentityProvisioningError() { + } + + /** + * Get the error property: Details about the error. + * + * @return the error value. + */ + public ManagedClusterPodIdentityProvisioningErrorBody error() { + return this.error; + } + + /** + * Set the error property: Details about the error. + * + * @param error the error value to set. + * @return the ManagedClusterPodIdentityProvisioningError object itself. + */ + public ManagedClusterPodIdentityProvisioningError withError(ManagedClusterPodIdentityProvisioningErrorBody error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (error() != null) { + error().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningErrorBody.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningErrorBody.java new file mode 100644 index 0000000000000..c4c489e6c1010 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningErrorBody.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** An error response from the pod identity provisioning. */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningErrorBody { + /* + * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + */ + @JsonProperty(value = "code") + private String code; + + /* + * A message describing the error, intended to be suitable for display in a user interface. + */ + @JsonProperty(value = "message") + private String message; + + /* + * The target of the particular error. For example, the name of the property in error. + */ + @JsonProperty(value = "target") + private String target; + + /* + * A list of additional details about the error. + */ + @JsonProperty(value = "details") + private List details; + + /** Creates an instance of ManagedClusterPodIdentityProvisioningErrorBody class. */ + public ManagedClusterPodIdentityProvisioningErrorBody() { + } + + /** + * Get the code property: An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + * + * @param code the code value to set. + * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. + */ + public ManagedClusterPodIdentityProvisioningErrorBody withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: A message describing the error, intended to be suitable for display in a user + * interface. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: A message describing the error, intended to be suitable for display in a user + * interface. + * + * @param message the message value to set. + * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. + */ + public ManagedClusterPodIdentityProvisioningErrorBody withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target property: The target of the particular error. For example, the name of the property in error. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: The target of the particular error. For example, the name of the property in error. + * + * @param target the target value to set. + * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. + */ + public ManagedClusterPodIdentityProvisioningErrorBody withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the details property: A list of additional details about the error. + * + * @return the details value. + */ + public List details() { + return this.details; + } + + /** + * Set the details property: A list of additional details about the error. + * + * @param details the details value to set. + * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. + */ + public ManagedClusterPodIdentityProvisioningErrorBody withDetails( + List details) { + this.details = details; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (details() != null) { + details().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningInfo.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningInfo.java new file mode 100644 index 0000000000000..bba8f5649398b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningInfo.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedClusterPodIdentityProvisioningInfo model. */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningInfo { + /* + * Pod identity assignment error (if any). + */ + @JsonProperty(value = "error") + private ManagedClusterPodIdentityProvisioningError error; + + /** Creates an instance of ManagedClusterPodIdentityProvisioningInfo class. */ + public ManagedClusterPodIdentityProvisioningInfo() { + } + + /** + * Get the error property: Pod identity assignment error (if any). + * + * @return the error value. + */ + public ManagedClusterPodIdentityProvisioningError error() { + return this.error; + } + + /** + * Set the error property: Pod identity assignment error (if any). + * + * @param error the error value to set. + * @return the ManagedClusterPodIdentityProvisioningInfo object itself. + */ + public ManagedClusterPodIdentityProvisioningInfo withError(ManagedClusterPodIdentityProvisioningError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (error() != null) { + error().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningState.java new file mode 100644 index 0000000000000..b0cf2a0908cc8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningState.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The current provisioning state of the pod identity. */ +public final class ManagedClusterPodIdentityProvisioningState + extends ExpandableStringEnum { + /** Static value Assigned for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState ASSIGNED = fromString("Assigned"); + + /** Static value Canceled for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Deleting for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState FAILED = fromString("Failed"); + + /** Static value Succeeded for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Updating for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of ManagedClusterPodIdentityProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedClusterPodIdentityProvisioningState() { + } + + /** + * Creates or finds a ManagedClusterPodIdentityProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedClusterPodIdentityProvisioningState. + */ + @JsonCreator + public static ManagedClusterPodIdentityProvisioningState fromString(String name) { + return fromString(name, ManagedClusterPodIdentityProvisioningState.class); + } + + /** + * Gets known ManagedClusterPodIdentityProvisioningState values. + * + * @return known ManagedClusterPodIdentityProvisioningState values. + */ + public static Collection values() { + return values(ManagedClusterPodIdentityProvisioningState.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfile.java new file mode 100644 index 0000000000000..316b8438e923b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfile.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available upgrade versions. */ +@Fluent +public final class ManagedClusterPoolUpgradeProfile { + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion", required = true) + private String kubernetesVersion; + + /* + * The Agent Pool name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType", required = true) + private OSType osType; + + /* + * List of orchestrator types and versions available for upgrade. + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /** Creates an instance of ManagedClusterPoolUpgradeProfile class. */ + public ManagedClusterPoolUpgradeProfile() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the name property: The Agent Pool name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The Agent Pool name. + * + * @param name the name value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @param osType the osType value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @param upgrades the upgrades value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubernetesVersion() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property kubernetesVersion in model ManagedClusterPoolUpgradeProfile")); + } + if (osType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property osType in model ManagedClusterPoolUpgradeProfile")); + } + if (upgrades() != null) { + upgrades().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPoolUpgradeProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java new file mode 100644 index 0000000000000..a3ed1379a77cf --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedClusterPoolUpgradeProfileUpgradesItem model. */ +@Fluent +public final class ManagedClusterPoolUpgradeProfileUpgradesItem { + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether the Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** Creates an instance of ManagedClusterPoolUpgradeProfileUpgradesItem class. */ + public ManagedClusterPoolUpgradeProfileUpgradesItem() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. + */ + public ManagedClusterPoolUpgradeProfileUpgradesItem withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the isPreview property: Whether the Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether the Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. + */ + public ManagedClusterPoolUpgradeProfileUpgradesItem withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesAutoScalerProfile.java new file mode 100644 index 0000000000000..fd6955049d1c9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesAutoScalerProfile.java @@ -0,0 +1,621 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Parameters to be applied to the cluster-autoscaler when enabled. */ +@Fluent +public final class ManagedClusterPropertiesAutoScalerProfile { + /* + * Detects similar node pools and balances the number of nodes between them. + * + * Valid values are 'true' and 'false' + */ + @JsonProperty(value = "balance-similar-node-groups") + private String balanceSimilarNodeGroups; + + /* + * The expander to use when scaling up + * + * If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. + */ + @JsonProperty(value = "expander") + private Expander expander; + + /* + * The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. + * + * The default is 10. + */ + @JsonProperty(value = "max-empty-bulk-delete") + private String maxEmptyBulkDelete; + + /* + * The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. + * + * The default is 600. + */ + @JsonProperty(value = "max-graceful-termination-sec") + private String maxGracefulTerminationSec; + + /* + * The maximum time the autoscaler waits for a node to be provisioned. + * + * The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + */ + @JsonProperty(value = "max-node-provision-time") + private String maxNodeProvisionTime; + + /* + * The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler + * halts operations. + * + * The default is 45. The maximum is 100 and the minimum is 0. + */ + @JsonProperty(value = "max-total-unready-percentage") + private String maxTotalUnreadyPercentage; + + /* + * Ignore unscheduled pods before they're a certain age. + * + * For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could + * schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is + * '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + */ + @JsonProperty(value = "new-pod-scale-up-delay") + private String newPodScaleUpDelay; + + /* + * The number of allowed unready nodes, irrespective of max-total-unready-percentage. + * + * This must be an integer. The default is 3. + */ + @JsonProperty(value = "ok-total-unready-count") + private String okTotalUnreadyCount; + + /* + * How often cluster is reevaluated for scale up or down. + * + * The default is '10'. Values must be an integer number of seconds. + */ + @JsonProperty(value = "scan-interval") + private String scanInterval; + + /* + * How long after scale up that scale down evaluation resumes + * + * The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + */ + @JsonProperty(value = "scale-down-delay-after-add") + private String scaleDownDelayAfterAdd; + + /* + * How long after node deletion that scale down evaluation resumes. + * + * The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than + * minutes (m) is supported. + */ + @JsonProperty(value = "scale-down-delay-after-delete") + private String scaleDownDelayAfterDelete; + + /* + * How long after scale down failure that scale down evaluation resumes. + * + * The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + */ + @JsonProperty(value = "scale-down-delay-after-failure") + private String scaleDownDelayAfterFailure; + + /* + * How long a node should be unneeded before it is eligible for scale down. + * + * The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + */ + @JsonProperty(value = "scale-down-unneeded-time") + private String scaleDownUnneededTime; + + /* + * How long an unready node should be unneeded before it is eligible for scale down + * + * The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + */ + @JsonProperty(value = "scale-down-unready-time") + private String scaleDownUnreadyTime; + + /* + * Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be + * considered for scale down. + * + * The default is '0.5'. + */ + @JsonProperty(value = "scale-down-utilization-threshold") + private String scaleDownUtilizationThreshold; + + /* + * If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. + * + * The default is true. + */ + @JsonProperty(value = "skip-nodes-with-local-storage") + private String skipNodesWithLocalStorage; + + /* + * If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods) + * + * The default is true. + */ + @JsonProperty(value = "skip-nodes-with-system-pods") + private String skipNodesWithSystemPods; + + /** Creates an instance of ManagedClusterPropertiesAutoScalerProfile class. */ + public ManagedClusterPropertiesAutoScalerProfile() { + } + + /** + * Get the balanceSimilarNodeGroups property: Detects similar node pools and balances the number of nodes between + * them. + * + *

Valid values are 'true' and 'false'. + * + * @return the balanceSimilarNodeGroups value. + */ + public String balanceSimilarNodeGroups() { + return this.balanceSimilarNodeGroups; + } + + /** + * Set the balanceSimilarNodeGroups property: Detects similar node pools and balances the number of nodes between + * them. + * + *

Valid values are 'true' and 'false'. + * + * @param balanceSimilarNodeGroups the balanceSimilarNodeGroups value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withBalanceSimilarNodeGroups(String balanceSimilarNodeGroups) { + this.balanceSimilarNodeGroups = balanceSimilarNodeGroups; + return this; + } + + /** + * Get the expander property: The expander to use when scaling up + * + *

If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. + * + * @return the expander value. + */ + public Expander expander() { + return this.expander; + } + + /** + * Set the expander property: The expander to use when scaling up + * + *

If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. + * + * @param expander the expander value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withExpander(Expander expander) { + this.expander = expander; + return this; + } + + /** + * Get the maxEmptyBulkDelete property: The maximum number of empty nodes that can be deleted at the same time. This + * must be a positive integer. + * + *

The default is 10. + * + * @return the maxEmptyBulkDelete value. + */ + public String maxEmptyBulkDelete() { + return this.maxEmptyBulkDelete; + } + + /** + * Set the maxEmptyBulkDelete property: The maximum number of empty nodes that can be deleted at the same time. This + * must be a positive integer. + * + *

The default is 10. + * + * @param maxEmptyBulkDelete the maxEmptyBulkDelete value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxEmptyBulkDelete(String maxEmptyBulkDelete) { + this.maxEmptyBulkDelete = maxEmptyBulkDelete; + return this; + } + + /** + * Get the maxGracefulTerminationSec property: The maximum number of seconds the cluster autoscaler waits for pod + * termination when trying to scale down a node. + * + *

The default is 600. + * + * @return the maxGracefulTerminationSec value. + */ + public String maxGracefulTerminationSec() { + return this.maxGracefulTerminationSec; + } + + /** + * Set the maxGracefulTerminationSec property: The maximum number of seconds the cluster autoscaler waits for pod + * termination when trying to scale down a node. + * + *

The default is 600. + * + * @param maxGracefulTerminationSec the maxGracefulTerminationSec value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxGracefulTerminationSec(String maxGracefulTerminationSec) { + this.maxGracefulTerminationSec = maxGracefulTerminationSec; + return this; + } + + /** + * Get the maxNodeProvisionTime property: The maximum time the autoscaler waits for a node to be provisioned. + * + *

The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @return the maxNodeProvisionTime value. + */ + public String maxNodeProvisionTime() { + return this.maxNodeProvisionTime; + } + + /** + * Set the maxNodeProvisionTime property: The maximum time the autoscaler waits for a node to be provisioned. + * + *

The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @param maxNodeProvisionTime the maxNodeProvisionTime value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxNodeProvisionTime(String maxNodeProvisionTime) { + this.maxNodeProvisionTime = maxNodeProvisionTime; + return this; + } + + /** + * Get the maxTotalUnreadyPercentage property: The maximum percentage of unready nodes in the cluster. After this + * percentage is exceeded, cluster autoscaler halts operations. + * + *

The default is 45. The maximum is 100 and the minimum is 0. + * + * @return the maxTotalUnreadyPercentage value. + */ + public String maxTotalUnreadyPercentage() { + return this.maxTotalUnreadyPercentage; + } + + /** + * Set the maxTotalUnreadyPercentage property: The maximum percentage of unready nodes in the cluster. After this + * percentage is exceeded, cluster autoscaler halts operations. + * + *

The default is 45. The maximum is 100 and the minimum is 0. + * + * @param maxTotalUnreadyPercentage the maxTotalUnreadyPercentage value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxTotalUnreadyPercentage(String maxTotalUnreadyPercentage) { + this.maxTotalUnreadyPercentage = maxTotalUnreadyPercentage; + return this; + } + + /** + * Get the newPodScaleUpDelay property: Ignore unscheduled pods before they're a certain age. + * + *

For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could + * schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is + * '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + * + * @return the newPodScaleUpDelay value. + */ + public String newPodScaleUpDelay() { + return this.newPodScaleUpDelay; + } + + /** + * Set the newPodScaleUpDelay property: Ignore unscheduled pods before they're a certain age. + * + *

For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could + * schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is + * '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + * + * @param newPodScaleUpDelay the newPodScaleUpDelay value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withNewPodScaleUpDelay(String newPodScaleUpDelay) { + this.newPodScaleUpDelay = newPodScaleUpDelay; + return this; + } + + /** + * Get the okTotalUnreadyCount property: The number of allowed unready nodes, irrespective of + * max-total-unready-percentage. + * + *

This must be an integer. The default is 3. + * + * @return the okTotalUnreadyCount value. + */ + public String okTotalUnreadyCount() { + return this.okTotalUnreadyCount; + } + + /** + * Set the okTotalUnreadyCount property: The number of allowed unready nodes, irrespective of + * max-total-unready-percentage. + * + *

This must be an integer. The default is 3. + * + * @param okTotalUnreadyCount the okTotalUnreadyCount value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withOkTotalUnreadyCount(String okTotalUnreadyCount) { + this.okTotalUnreadyCount = okTotalUnreadyCount; + return this; + } + + /** + * Get the scanInterval property: How often cluster is reevaluated for scale up or down. + * + *

The default is '10'. Values must be an integer number of seconds. + * + * @return the scanInterval value. + */ + public String scanInterval() { + return this.scanInterval; + } + + /** + * Set the scanInterval property: How often cluster is reevaluated for scale up or down. + * + *

The default is '10'. Values must be an integer number of seconds. + * + * @param scanInterval the scanInterval value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScanInterval(String scanInterval) { + this.scanInterval = scanInterval; + return this; + } + + /** + * Get the scaleDownDelayAfterAdd property: How long after scale up that scale down evaluation resumes + * + *

The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @return the scaleDownDelayAfterAdd value. + */ + public String scaleDownDelayAfterAdd() { + return this.scaleDownDelayAfterAdd; + } + + /** + * Set the scaleDownDelayAfterAdd property: How long after scale up that scale down evaluation resumes + * + *

The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @param scaleDownDelayAfterAdd the scaleDownDelayAfterAdd value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterAdd(String scaleDownDelayAfterAdd) { + this.scaleDownDelayAfterAdd = scaleDownDelayAfterAdd; + return this; + } + + /** + * Get the scaleDownDelayAfterDelete property: How long after node deletion that scale down evaluation resumes. + * + *

The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than + * minutes (m) is supported. + * + * @return the scaleDownDelayAfterDelete value. + */ + public String scaleDownDelayAfterDelete() { + return this.scaleDownDelayAfterDelete; + } + + /** + * Set the scaleDownDelayAfterDelete property: How long after node deletion that scale down evaluation resumes. + * + *

The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than + * minutes (m) is supported. + * + * @param scaleDownDelayAfterDelete the scaleDownDelayAfterDelete value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterDelete(String scaleDownDelayAfterDelete) { + this.scaleDownDelayAfterDelete = scaleDownDelayAfterDelete; + return this; + } + + /** + * Get the scaleDownDelayAfterFailure property: How long after scale down failure that scale down evaluation + * resumes. + * + *

The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @return the scaleDownDelayAfterFailure value. + */ + public String scaleDownDelayAfterFailure() { + return this.scaleDownDelayAfterFailure; + } + + /** + * Set the scaleDownDelayAfterFailure property: How long after scale down failure that scale down evaluation + * resumes. + * + *

The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @param scaleDownDelayAfterFailure the scaleDownDelayAfterFailure value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterFailure(String scaleDownDelayAfterFailure) { + this.scaleDownDelayAfterFailure = scaleDownDelayAfterFailure; + return this; + } + + /** + * Get the scaleDownUnneededTime property: How long a node should be unneeded before it is eligible for scale down. + * + *

The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @return the scaleDownUnneededTime value. + */ + public String scaleDownUnneededTime() { + return this.scaleDownUnneededTime; + } + + /** + * Set the scaleDownUnneededTime property: How long a node should be unneeded before it is eligible for scale down. + * + *

The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @param scaleDownUnneededTime the scaleDownUnneededTime value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnneededTime(String scaleDownUnneededTime) { + this.scaleDownUnneededTime = scaleDownUnneededTime; + return this; + } + + /** + * Get the scaleDownUnreadyTime property: How long an unready node should be unneeded before it is eligible for + * scale down + * + *

The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @return the scaleDownUnreadyTime value. + */ + public String scaleDownUnreadyTime() { + return this.scaleDownUnreadyTime; + } + + /** + * Set the scaleDownUnreadyTime property: How long an unready node should be unneeded before it is eligible for + * scale down + * + *

The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @param scaleDownUnreadyTime the scaleDownUnreadyTime value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnreadyTime(String scaleDownUnreadyTime) { + this.scaleDownUnreadyTime = scaleDownUnreadyTime; + return this; + } + + /** + * Get the scaleDownUtilizationThreshold property: Node utilization level, defined as sum of requested resources + * divided by capacity, below which a node can be considered for scale down. + * + *

The default is '0.5'. + * + * @return the scaleDownUtilizationThreshold value. + */ + public String scaleDownUtilizationThreshold() { + return this.scaleDownUtilizationThreshold; + } + + /** + * Set the scaleDownUtilizationThreshold property: Node utilization level, defined as sum of requested resources + * divided by capacity, below which a node can be considered for scale down. + * + *

The default is '0.5'. + * + * @param scaleDownUtilizationThreshold the scaleDownUtilizationThreshold value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownUtilizationThreshold( + String scaleDownUtilizationThreshold) { + this.scaleDownUtilizationThreshold = scaleDownUtilizationThreshold; + return this; + } + + /** + * Get the skipNodesWithLocalStorage property: If cluster autoscaler will skip deleting nodes with pods with local + * storage, for example, EmptyDir or HostPath. + * + *

The default is true. + * + * @return the skipNodesWithLocalStorage value. + */ + public String skipNodesWithLocalStorage() { + return this.skipNodesWithLocalStorage; + } + + /** + * Set the skipNodesWithLocalStorage property: If cluster autoscaler will skip deleting nodes with pods with local + * storage, for example, EmptyDir or HostPath. + * + *

The default is true. + * + * @param skipNodesWithLocalStorage the skipNodesWithLocalStorage value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithLocalStorage(String skipNodesWithLocalStorage) { + this.skipNodesWithLocalStorage = skipNodesWithLocalStorage; + return this; + } + + /** + * Get the skipNodesWithSystemPods property: If cluster autoscaler will skip deleting nodes with pods from + * kube-system (except for DaemonSet or mirror pods) + * + *

The default is true. + * + * @return the skipNodesWithSystemPods value. + */ + public String skipNodesWithSystemPods() { + return this.skipNodesWithSystemPods; + } + + /** + * Set the skipNodesWithSystemPods property: If cluster autoscaler will skip deleting nodes with pods from + * kube-system (except for DaemonSet or mirror pods) + * + *

The default is true. + * + * @param skipNodesWithSystemPods the skipNodesWithSystemPods value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithSystemPods(String skipNodesWithSystemPods) { + this.skipNodesWithSystemPods = skipNodesWithSystemPods; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfile.java new file mode 100644 index 0000000000000..b571354f5906b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfile.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Security profile for the container service cluster. */ +@Fluent +public final class ManagedClusterSecurityProfile { + /* + * Microsoft Defender settings for the security profile. + */ + @JsonProperty(value = "defender") + private ManagedClusterSecurityProfileDefender defender; + + /* + * Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) + * settings for the security profile. + */ + @JsonProperty(value = "azureKeyVaultKms") + private AzureKeyVaultKms azureKeyVaultKms; + + /* + * Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access + * Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. + */ + @JsonProperty(value = "workloadIdentity") + private ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity; + + /* + * Image Cleaner settings for the security profile. + */ + @JsonProperty(value = "imageCleaner") + private ManagedClusterSecurityProfileImageCleaner imageCleaner; + + /** Creates an instance of ManagedClusterSecurityProfile class. */ + public ManagedClusterSecurityProfile() { + } + + /** + * Get the defender property: Microsoft Defender settings for the security profile. + * + * @return the defender value. + */ + public ManagedClusterSecurityProfileDefender defender() { + return this.defender; + } + + /** + * Set the defender property: Microsoft Defender settings for the security profile. + * + * @param defender the defender value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withDefender(ManagedClusterSecurityProfileDefender defender) { + this.defender = defender; + return this; + } + + /** + * Get the azureKeyVaultKms property: Azure Key Vault [key management + * service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile. + * + * @return the azureKeyVaultKms value. + */ + public AzureKeyVaultKms azureKeyVaultKms() { + return this.azureKeyVaultKms; + } + + /** + * Set the azureKeyVaultKms property: Azure Key Vault [key management + * service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile. + * + * @param azureKeyVaultKms the azureKeyVaultKms value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withAzureKeyVaultKms(AzureKeyVaultKms azureKeyVaultKms) { + this.azureKeyVaultKms = azureKeyVaultKms; + return this; + } + + /** + * Get the workloadIdentity property: Workload identity settings for the security profile. Workload identity enables + * Kubernetes applications to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for + * more details. + * + * @return the workloadIdentity value. + */ + public ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity() { + return this.workloadIdentity; + } + + /** + * Set the workloadIdentity property: Workload identity settings for the security profile. Workload identity enables + * Kubernetes applications to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for + * more details. + * + * @param workloadIdentity the workloadIdentity value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withWorkloadIdentity( + ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity) { + this.workloadIdentity = workloadIdentity; + return this; + } + + /** + * Get the imageCleaner property: Image Cleaner settings for the security profile. + * + * @return the imageCleaner value. + */ + public ManagedClusterSecurityProfileImageCleaner imageCleaner() { + return this.imageCleaner; + } + + /** + * Set the imageCleaner property: Image Cleaner settings for the security profile. + * + * @param imageCleaner the imageCleaner value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withImageCleaner(ManagedClusterSecurityProfileImageCleaner imageCleaner) { + this.imageCleaner = imageCleaner; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (defender() != null) { + defender().validate(); + } + if (azureKeyVaultKms() != null) { + azureKeyVaultKms().validate(); + } + if (workloadIdentity() != null) { + workloadIdentity().validate(); + } + if (imageCleaner() != null) { + imageCleaner().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefender.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefender.java new file mode 100644 index 0000000000000..e4f4d2787edbc --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefender.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Microsoft Defender settings for the security profile. */ +@Fluent +public final class ManagedClusterSecurityProfileDefender { + /* + * Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is + * enabled, this field is required and must be a valid workspace resource ID. When Microsoft Defender is disabled, + * leave the field empty. + */ + @JsonProperty(value = "logAnalyticsWorkspaceResourceId") + private String logAnalyticsWorkspaceResourceId; + + /* + * Microsoft Defender threat detection for Cloud settings for the security profile. + */ + @JsonProperty(value = "securityMonitoring") + private ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring; + + /** Creates an instance of ManagedClusterSecurityProfileDefender class. */ + public ManagedClusterSecurityProfileDefender() { + } + + /** + * Get the logAnalyticsWorkspaceResourceId property: Resource ID of the Log Analytics workspace to be associated + * with Microsoft Defender. When Microsoft Defender is enabled, this field is required and must be a valid workspace + * resource ID. When Microsoft Defender is disabled, leave the field empty. + * + * @return the logAnalyticsWorkspaceResourceId value. + */ + public String logAnalyticsWorkspaceResourceId() { + return this.logAnalyticsWorkspaceResourceId; + } + + /** + * Set the logAnalyticsWorkspaceResourceId property: Resource ID of the Log Analytics workspace to be associated + * with Microsoft Defender. When Microsoft Defender is enabled, this field is required and must be a valid workspace + * resource ID. When Microsoft Defender is disabled, leave the field empty. + * + * @param logAnalyticsWorkspaceResourceId the logAnalyticsWorkspaceResourceId value to set. + * @return the ManagedClusterSecurityProfileDefender object itself. + */ + public ManagedClusterSecurityProfileDefender withLogAnalyticsWorkspaceResourceId( + String logAnalyticsWorkspaceResourceId) { + this.logAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; + return this; + } + + /** + * Get the securityMonitoring property: Microsoft Defender threat detection for Cloud settings for the security + * profile. + * + * @return the securityMonitoring value. + */ + public ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring() { + return this.securityMonitoring; + } + + /** + * Set the securityMonitoring property: Microsoft Defender threat detection for Cloud settings for the security + * profile. + * + * @param securityMonitoring the securityMonitoring value to set. + * @return the ManagedClusterSecurityProfileDefender object itself. + */ + public ManagedClusterSecurityProfileDefender withSecurityMonitoring( + ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring) { + this.securityMonitoring = securityMonitoring; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (securityMonitoring() != null) { + securityMonitoring().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java new file mode 100644 index 0000000000000..8f9f3163d14b7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Microsoft Defender settings for the security profile threat detection. */ +@Fluent +public final class ManagedClusterSecurityProfileDefenderSecurityMonitoring { + /* + * Whether to enable Defender threat detection + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** Creates an instance of ManagedClusterSecurityProfileDefenderSecurityMonitoring class. */ + public ManagedClusterSecurityProfileDefenderSecurityMonitoring() { + } + + /** + * Get the enabled property: Whether to enable Defender threat detection. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Defender threat detection. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityMonitoring object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityMonitoring withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageCleaner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageCleaner.java new file mode 100644 index 0000000000000..e594773a8ba4f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageCleaner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here + * are settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileImageCleaner { + /* + * Whether to enable Image Cleaner on AKS cluster. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Image Cleaner scanning interval in hours. + */ + @JsonProperty(value = "intervalHours") + private Integer intervalHours; + + /** Creates an instance of ManagedClusterSecurityProfileImageCleaner class. */ + public ManagedClusterSecurityProfileImageCleaner() { + } + + /** + * Get the enabled property: Whether to enable Image Cleaner on AKS cluster. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Image Cleaner on AKS cluster. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileImageCleaner object itself. + */ + public ManagedClusterSecurityProfileImageCleaner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the intervalHours property: Image Cleaner scanning interval in hours. + * + * @return the intervalHours value. + */ + public Integer intervalHours() { + return this.intervalHours; + } + + /** + * Set the intervalHours property: Image Cleaner scanning interval in hours. + * + * @param intervalHours the intervalHours value to set. + * @return the ManagedClusterSecurityProfileImageCleaner object itself. + */ + public ManagedClusterSecurityProfileImageCleaner withIntervalHours(Integer intervalHours) { + this.intervalHours = intervalHours; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileWorkloadIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileWorkloadIdentity.java new file mode 100644 index 0000000000000..64bfa8edbf3ed --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileWorkloadIdentity.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Workload identity settings for the security profile. */ +@Fluent +public final class ManagedClusterSecurityProfileWorkloadIdentity { + /* + * Whether to enable workload identity. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** Creates an instance of ManagedClusterSecurityProfileWorkloadIdentity class. */ + public ManagedClusterSecurityProfileWorkloadIdentity() { + } + + /** + * Get the enabled property: Whether to enable workload identity. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable workload identity. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileWorkloadIdentity object itself. + */ + public ManagedClusterSecurityProfileWorkloadIdentity withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterServicePrincipalProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterServicePrincipalProfile.java new file mode 100644 index 0000000000000..6982fae533f4b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterServicePrincipalProfile.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information about a service principal identity for the cluster to use for manipulating Azure APIs. */ +@Fluent +public final class ManagedClusterServicePrincipalProfile { + /* + * The ID for the service principal. + */ + @JsonProperty(value = "clientId", required = true) + private String clientId; + + /* + * The secret password associated with the service principal in plain text. + */ + @JsonProperty(value = "secret") + private String secret; + + /** Creates an instance of ManagedClusterServicePrincipalProfile class. */ + public ManagedClusterServicePrincipalProfile() { + } + + /** + * Get the clientId property: The ID for the service principal. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The ID for the service principal. + * + * @param clientId the clientId value to set. + * @return the ManagedClusterServicePrincipalProfile object itself. + */ + public ManagedClusterServicePrincipalProfile withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the secret property: The secret password associated with the service principal in plain text. + * + * @return the secret value. + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret property: The secret password associated with the service principal in plain text. + * + * @param secret the secret value to set. + * @return the ManagedClusterServicePrincipalProfile object itself. + */ + public ManagedClusterServicePrincipalProfile withSecret(String secret) { + this.secret = secret; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clientId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property clientId in model ManagedClusterServicePrincipalProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterServicePrincipalProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSku.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSku.java new file mode 100644 index 0000000000000..55d02048fad07 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSku.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SKU of a Managed Cluster. */ +@Fluent +public final class ManagedClusterSku { + /* + * The name of a managed cluster SKU. + */ + @JsonProperty(value = "name") + private ManagedClusterSkuName name; + + /* + * The tier of a managed cluster SKU. + * + * If not specified, the default is 'Free'. See [AKS Pricing + * Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. + */ + @JsonProperty(value = "tier") + private ManagedClusterSkuTier tier; + + /** Creates an instance of ManagedClusterSku class. */ + public ManagedClusterSku() { + } + + /** + * Get the name property: The name of a managed cluster SKU. + * + * @return the name value. + */ + public ManagedClusterSkuName name() { + return this.name; + } + + /** + * Set the name property: The name of a managed cluster SKU. + * + * @param name the name value to set. + * @return the ManagedClusterSku object itself. + */ + public ManagedClusterSku withName(ManagedClusterSkuName name) { + this.name = name; + return this; + } + + /** + * Get the tier property: The tier of a managed cluster SKU. + * + *

If not specified, the default is 'Free'. See [AKS Pricing + * Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. + * + * @return the tier value. + */ + public ManagedClusterSkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: The tier of a managed cluster SKU. + * + *

If not specified, the default is 'Free'. See [AKS Pricing + * Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. + * + * @param tier the tier value to set. + * @return the ManagedClusterSku object itself. + */ + public ManagedClusterSku withTier(ManagedClusterSkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuName.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuName.java new file mode 100644 index 0000000000000..5be85d34d6afa --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuName.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The name of a managed cluster SKU. */ +public final class ManagedClusterSkuName extends ExpandableStringEnum { + /** Static value Base for ManagedClusterSkuName. */ + public static final ManagedClusterSkuName BASE = fromString("Base"); + + /** + * Creates a new instance of ManagedClusterSkuName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedClusterSkuName() { + } + + /** + * Creates or finds a ManagedClusterSkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedClusterSkuName. + */ + @JsonCreator + public static ManagedClusterSkuName fromString(String name) { + return fromString(name, ManagedClusterSkuName.class); + } + + /** + * Gets known ManagedClusterSkuName values. + * + * @return known ManagedClusterSkuName values. + */ + public static Collection values() { + return values(ManagedClusterSkuName.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuTier.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuTier.java new file mode 100644 index 0000000000000..bfe8277a80b25 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuTier.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The tier of a managed cluster SKU. + * + *

If not specified, the default is 'Free'. See [AKS Pricing + * Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. + */ +public final class ManagedClusterSkuTier extends ExpandableStringEnum { + /** Static value Premium for ManagedClusterSkuTier. */ + public static final ManagedClusterSkuTier PREMIUM = fromString("Premium"); + + /** Static value Standard for ManagedClusterSkuTier. */ + public static final ManagedClusterSkuTier STANDARD = fromString("Standard"); + + /** Static value Free for ManagedClusterSkuTier. */ + public static final ManagedClusterSkuTier FREE = fromString("Free"); + + /** + * Creates a new instance of ManagedClusterSkuTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedClusterSkuTier() { + } + + /** + * Creates or finds a ManagedClusterSkuTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedClusterSkuTier. + */ + @JsonCreator + public static ManagedClusterSkuTier fromString(String name) { + return fromString(name, ManagedClusterSkuTier.class); + } + + /** + * Gets known ManagedClusterSkuTier values. + * + * @return known ManagedClusterSkuTier values. + */ + public static Collection values() { + return values(ManagedClusterSkuTier.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfile.java new file mode 100644 index 0000000000000..8dab5b918d94f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfile.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Storage profile for the container service cluster. */ +@Fluent +public final class ManagedClusterStorageProfile { + /* + * AzureDisk CSI Driver settings for the storage profile. + */ + @JsonProperty(value = "diskCSIDriver") + private ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver; + + /* + * AzureFile CSI Driver settings for the storage profile. + */ + @JsonProperty(value = "fileCSIDriver") + private ManagedClusterStorageProfileFileCsiDriver fileCsiDriver; + + /* + * Snapshot Controller settings for the storage profile. + */ + @JsonProperty(value = "snapshotController") + private ManagedClusterStorageProfileSnapshotController snapshotController; + + /* + * AzureBlob CSI Driver settings for the storage profile. + */ + @JsonProperty(value = "blobCSIDriver") + private ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver; + + /** Creates an instance of ManagedClusterStorageProfile class. */ + public ManagedClusterStorageProfile() { + } + + /** + * Get the diskCsiDriver property: AzureDisk CSI Driver settings for the storage profile. + * + * @return the diskCsiDriver value. + */ + public ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver() { + return this.diskCsiDriver; + } + + /** + * Set the diskCsiDriver property: AzureDisk CSI Driver settings for the storage profile. + * + * @param diskCsiDriver the diskCsiDriver value to set. + * @return the ManagedClusterStorageProfile object itself. + */ + public ManagedClusterStorageProfile withDiskCsiDriver(ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver) { + this.diskCsiDriver = diskCsiDriver; + return this; + } + + /** + * Get the fileCsiDriver property: AzureFile CSI Driver settings for the storage profile. + * + * @return the fileCsiDriver value. + */ + public ManagedClusterStorageProfileFileCsiDriver fileCsiDriver() { + return this.fileCsiDriver; + } + + /** + * Set the fileCsiDriver property: AzureFile CSI Driver settings for the storage profile. + * + * @param fileCsiDriver the fileCsiDriver value to set. + * @return the ManagedClusterStorageProfile object itself. + */ + public ManagedClusterStorageProfile withFileCsiDriver(ManagedClusterStorageProfileFileCsiDriver fileCsiDriver) { + this.fileCsiDriver = fileCsiDriver; + return this; + } + + /** + * Get the snapshotController property: Snapshot Controller settings for the storage profile. + * + * @return the snapshotController value. + */ + public ManagedClusterStorageProfileSnapshotController snapshotController() { + return this.snapshotController; + } + + /** + * Set the snapshotController property: Snapshot Controller settings for the storage profile. + * + * @param snapshotController the snapshotController value to set. + * @return the ManagedClusterStorageProfile object itself. + */ + public ManagedClusterStorageProfile withSnapshotController( + ManagedClusterStorageProfileSnapshotController snapshotController) { + this.snapshotController = snapshotController; + return this; + } + + /** + * Get the blobCsiDriver property: AzureBlob CSI Driver settings for the storage profile. + * + * @return the blobCsiDriver value. + */ + public ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver() { + return this.blobCsiDriver; + } + + /** + * Set the blobCsiDriver property: AzureBlob CSI Driver settings for the storage profile. + * + * @param blobCsiDriver the blobCsiDriver value to set. + * @return the ManagedClusterStorageProfile object itself. + */ + public ManagedClusterStorageProfile withBlobCsiDriver(ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver) { + this.blobCsiDriver = blobCsiDriver; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (diskCsiDriver() != null) { + diskCsiDriver().validate(); + } + if (fileCsiDriver() != null) { + fileCsiDriver().validate(); + } + if (snapshotController() != null) { + snapshotController().validate(); + } + if (blobCsiDriver() != null) { + blobCsiDriver().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileBlobCsiDriver.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileBlobCsiDriver.java new file mode 100644 index 0000000000000..f791c459329c7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileBlobCsiDriver.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** AzureBlob CSI Driver settings for the storage profile. */ +@Fluent +public final class ManagedClusterStorageProfileBlobCsiDriver { + /* + * Whether to enable AzureBlob CSI Driver. The default value is false. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** Creates an instance of ManagedClusterStorageProfileBlobCsiDriver class. */ + public ManagedClusterStorageProfileBlobCsiDriver() { + } + + /** + * Get the enabled property: Whether to enable AzureBlob CSI Driver. The default value is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable AzureBlob CSI Driver. The default value is false. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStorageProfileBlobCsiDriver object itself. + */ + public ManagedClusterStorageProfileBlobCsiDriver withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileDiskCsiDriver.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileDiskCsiDriver.java new file mode 100644 index 0000000000000..5b2672e305acc --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileDiskCsiDriver.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** AzureDisk CSI Driver settings for the storage profile. */ +@Fluent +public final class ManagedClusterStorageProfileDiskCsiDriver { + /* + * Whether to enable AzureDisk CSI Driver. The default value is true. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** Creates an instance of ManagedClusterStorageProfileDiskCsiDriver class. */ + public ManagedClusterStorageProfileDiskCsiDriver() { + } + + /** + * Get the enabled property: Whether to enable AzureDisk CSI Driver. The default value is true. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable AzureDisk CSI Driver. The default value is true. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStorageProfileDiskCsiDriver object itself. + */ + public ManagedClusterStorageProfileDiskCsiDriver withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileFileCsiDriver.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileFileCsiDriver.java new file mode 100644 index 0000000000000..8e25fbc711d7c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileFileCsiDriver.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** AzureFile CSI Driver settings for the storage profile. */ +@Fluent +public final class ManagedClusterStorageProfileFileCsiDriver { + /* + * Whether to enable AzureFile CSI Driver. The default value is true. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** Creates an instance of ManagedClusterStorageProfileFileCsiDriver class. */ + public ManagedClusterStorageProfileFileCsiDriver() { + } + + /** + * Get the enabled property: Whether to enable AzureFile CSI Driver. The default value is true. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable AzureFile CSI Driver. The default value is true. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStorageProfileFileCsiDriver object itself. + */ + public ManagedClusterStorageProfileFileCsiDriver withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileSnapshotController.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileSnapshotController.java new file mode 100644 index 0000000000000..40da78baf2ab3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileSnapshotController.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Snapshot Controller settings for the storage profile. */ +@Fluent +public final class ManagedClusterStorageProfileSnapshotController { + /* + * Whether to enable Snapshot Controller. The default value is true. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** Creates an instance of ManagedClusterStorageProfileSnapshotController class. */ + public ManagedClusterStorageProfileSnapshotController() { + } + + /** + * Get the enabled property: Whether to enable Snapshot Controller. The default value is true. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Snapshot Controller. The default value is true. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStorageProfileSnapshotController object itself. + */ + public ManagedClusterStorageProfileSnapshotController withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterUpgradeProfile.java new file mode 100644 index 0000000000000..9f4a00ad3ec41 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterUpgradeProfile.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import java.util.List; + +/** An immutable client-side representation of ManagedClusterUpgradeProfile. */ +public interface ManagedClusterUpgradeProfile { + /** + * Gets the id property: The ID of the upgrade profile. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the upgrade profile. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the upgrade profile. + * + * @return the type value. + */ + String type(); + + /** + * Gets the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @return the controlPlaneProfile value. + */ + ManagedClusterPoolUpgradeProfile controlPlaneProfile(); + + /** + * Gets the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner + * object. + * + * @return the inner object. + */ + ManagedClusterUpgradeProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWindowsProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWindowsProfile.java new file mode 100644 index 0000000000000..9c2d0c6bd0024 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWindowsProfile.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Profile for Windows VMs in the managed cluster. */ +@Fluent +public final class ManagedClusterWindowsProfile { + /* + * Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

+ * **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", + * "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", + * "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

+ * **Minimum-length:** 1 character

**Max-length:** 20 characters + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /* + * Specifies the password of the administrator account.

**Minimum-length:** 8 characters

+ * **Max-length:** 123 characters

**Complexity requirements:** 3 out of 4 conditions below need to be + * fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character + * (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + */ + @JsonProperty(value = "adminPassword") + private String adminPassword; + + /* + * The license type to use for Windows VMs. See [Azure Hybrid User + * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. + */ + @JsonProperty(value = "licenseType") + private LicenseType licenseType; + + /* + * Whether to enable CSI proxy. + * + * For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + */ + @JsonProperty(value = "enableCSIProxy") + private Boolean enableCsiProxy; + + /* + * The Windows gMSA Profile in the Managed Cluster. + */ + @JsonProperty(value = "gmsaProfile") + private WindowsGmsaProfile gmsaProfile; + + /** Creates an instance of ManagedClusterWindowsProfile class. */ + public ManagedClusterWindowsProfile() { + } + + /** + * Get the adminUsername property: Specifies the name of the administrator account. <br><br> + * **Restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", + * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", + * "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + * "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length:** 1 character + * <br><br> **Max-length:** 20 characters. + * + * @return the adminUsername value. + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the adminUsername property: Specifies the name of the administrator account. <br><br> + * **Restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", + * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", + * "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + * "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length:** 1 character + * <br><br> **Max-length:** 20 characters. + * + * @param adminUsername the adminUsername value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the adminPassword property: Specifies the password of the administrator account. <br><br> + * **Minimum-length:** 8 characters <br><br> **Max-length:** 123 characters <br><br> + * **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters + * <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) + * <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", + * "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + * + * @return the adminPassword value. + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set the adminPassword property: Specifies the password of the administrator account. <br><br> + * **Minimum-length:** 8 characters <br><br> **Max-length:** 123 characters <br><br> + * **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters + * <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) + * <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", + * "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + * + * @param adminPassword the adminPassword value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + + /** + * Get the licenseType property: The license type to use for Windows VMs. See [Azure Hybrid User + * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. + * + * @return the licenseType value. + */ + public LicenseType licenseType() { + return this.licenseType; + } + + /** + * Set the licenseType property: The license type to use for Windows VMs. See [Azure Hybrid User + * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. + * + * @param licenseType the licenseType value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withLicenseType(LicenseType licenseType) { + this.licenseType = licenseType; + return this; + } + + /** + * Get the enableCsiProxy property: Whether to enable CSI proxy. + * + *

For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + * + * @return the enableCsiProxy value. + */ + public Boolean enableCsiProxy() { + return this.enableCsiProxy; + } + + /** + * Set the enableCsiProxy property: Whether to enable CSI proxy. + * + *

For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + * + * @param enableCsiProxy the enableCsiProxy value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withEnableCsiProxy(Boolean enableCsiProxy) { + this.enableCsiProxy = enableCsiProxy; + return this; + } + + /** + * Get the gmsaProfile property: The Windows gMSA Profile in the Managed Cluster. + * + * @return the gmsaProfile value. + */ + public WindowsGmsaProfile gmsaProfile() { + return this.gmsaProfile; + } + + /** + * Set the gmsaProfile property: The Windows gMSA Profile in the Managed Cluster. + * + * @param gmsaProfile the gmsaProfile value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withGmsaProfile(WindowsGmsaProfile gmsaProfile) { + this.gmsaProfile = gmsaProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (adminUsername() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property adminUsername in model ManagedClusterWindowsProfile")); + } + if (gmsaProfile() != null) { + gmsaProfile().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterWindowsProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfile.java new file mode 100644 index 0000000000000..857a0a664bd75 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfile.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Workload Auto-scaler profile for the managed cluster. */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfile { + /* + * KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + */ + @JsonProperty(value = "keda") + private ManagedClusterWorkloadAutoScalerProfileKeda keda; + + /* + * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + */ + @JsonProperty(value = "verticalPodAutoscaler") + private ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler; + + /** Creates an instance of ManagedClusterWorkloadAutoScalerProfile class. */ + public ManagedClusterWorkloadAutoScalerProfile() { + } + + /** + * Get the keda property: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + * + * @return the keda value. + */ + public ManagedClusterWorkloadAutoScalerProfileKeda keda() { + return this.keda; + } + + /** + * Set the keda property: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + * + * @param keda the keda value to set. + * @return the ManagedClusterWorkloadAutoScalerProfile object itself. + */ + public ManagedClusterWorkloadAutoScalerProfile withKeda(ManagedClusterWorkloadAutoScalerProfileKeda keda) { + this.keda = keda; + return this; + } + + /** + * Get the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler + * profile. + * + * @return the verticalPodAutoscaler value. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler() { + return this.verticalPodAutoscaler; + } + + /** + * Set the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler + * profile. + * + * @param verticalPodAutoscaler the verticalPodAutoscaler value to set. + * @return the ManagedClusterWorkloadAutoScalerProfile object itself. + */ + public ManagedClusterWorkloadAutoScalerProfile withVerticalPodAutoscaler( + ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler) { + this.verticalPodAutoscaler = verticalPodAutoscaler; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keda() != null) { + keda().validate(); + } + if (verticalPodAutoscaler() != null) { + verticalPodAutoscaler().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileKeda.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileKeda.java new file mode 100644 index 0000000000000..4adf429d3b2f4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileKeda.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfileKeda { + /* + * Whether to enable KEDA. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** Creates an instance of ManagedClusterWorkloadAutoScalerProfileKeda class. */ + public ManagedClusterWorkloadAutoScalerProfileKeda() { + } + + /** + * Get the enabled property: Whether to enable KEDA. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable KEDA. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterWorkloadAutoScalerProfileKeda object itself. + */ + public ManagedClusterWorkloadAutoScalerProfileKeda withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java new file mode 100644 index 0000000000000..9bd962e7cb080 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + /* + * Whether to enable VPA. Default value is false. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** Creates an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler class. */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() { + } + + /** + * Get the enabled property: Whether to enable VPA. Default value is false. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable VPA. Default value is false. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusters.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusters.java new file mode 100644 index 0000000000000..eb835c197106b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusters.java @@ -0,0 +1,785 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ManagedClusters. */ +public interface ManagedClusters { + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options needs to be returned. + * @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 supported OS options in the specified subscription along with {@link Response}. + */ + Response getOSOptionsWithResponse(String location, String resourceType, Context context); + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported OS options in the specified subscription. + */ + OSOptionProfile getOSOptions(String location); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion along with {@link Response}. + */ + Response listKubernetesVersionsWithResponse(String location, Context context); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + *

Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, + * and details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of KubernetesVersion. + */ + KubernetesVersionListResult listKubernetesVersions(String location); + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response from the List Managed Clusters operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed clusters in the specified subscription and 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 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 response from the List Managed Clusters operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response}. + */ + Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster. + */ + ManagedClusterUpgradeProfile getUpgradeProfile(String resourceGroupName, String resourceName); + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response}. + */ + Response getAccessProfileWithResponse( + String resourceGroupName, String resourceName, String roleName, Context context); + + /** + * Gets an access profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile. + */ + ManagedClusterAccessProfile getAccessProfile(String resourceGroupName, String resourceName, String roleName); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + Response listClusterAdminCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Context context); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + CredentialResults listClusterAdminCredentials(String resourceGroupName, String resourceName); + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin + * binary in the path. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + Response listClusterUserCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Format format, Context context); + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + CredentialResults listClusterUserCredentials(String resourceGroupName, String resourceName); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. + */ + Response listClusterMonitoringUserCredentialsWithResponse( + String resourceGroupName, String resourceName, String serverFqdn, Context context); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + CredentialResults listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName); + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster. + */ + ManagedCluster getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, Context context); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resetServicePrincipalProfile( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + *

This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context); + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + *

**WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context); + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateClusterCertificates(String resourceGroupName, String resourceName); + + /** + * Rotates the certificates of a managed cluster. + * + *

See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void abortLatestOperation(String resourceGroupName, String resourceName); + + /** + * Aborts last operation running on managed cluster. + * + *

Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a + * Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void abortLatestOperation(String resourceGroupName, String resourceName, Context context); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context); + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(String resourceGroupName, String resourceName); + + /** + * Stops a Managed Cluster + * + *

This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(String resourceGroupName, String resourceName, Context context); + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(String resourceGroupName, String resourceName); + + /** + * Starts a previously stopped Managed Cluster + * + *

See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about + * starting a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(String resourceGroupName, String resourceName, Context context); + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result. + */ + RunCommandResult runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + *

AKS will create a pod to run the command. This is primarily useful for private clusters. For more information + * see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @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 run command result. + */ + RunCommandResult runCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context); + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + Response getCommandResultWithResponse( + String resourceGroupName, String resourceName, String commandId, Context context); + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + RunCommandResult getCommandResult(String resourceGroupName, String resourceName, String commandId); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + *

Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName, Context context); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + PagedIterable listMeshRevisionProfiles(String location); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + *

Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + PagedIterable listMeshRevisionProfiles(String location, Context context); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response}. + */ + Response getMeshRevisionProfileWithResponse(String location, String mode, Context context); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + *

Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh. + */ + MeshRevisionProfile getMeshRevisionProfile(String location, String mode); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + PagedIterable listMeshUpgradeProfiles( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response}. + */ + Response getMeshUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String mode, Context context); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster. + */ + MeshUpgradeProfile getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); + + /** + * Gets a managed cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + ManagedCluster getById(String id); + + /** + * Gets a managed cluster. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a managed cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a managed cluster. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ManagedCluster resource. + * + * @param name resource name. + * @return the first stage of the new ManagedCluster definition. + */ + ManagedCluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultHeaders.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultHeaders.java new file mode 100644 index 0000000000000..7f82957d98c0c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultHeaders.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedClustersGetCommandResultHeaders model. */ +@Fluent +public final class ManagedClustersGetCommandResultHeaders { + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ManagedClustersGetCommandResultHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ManagedClustersGetCommandResultHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the ManagedClustersGetCommandResultHeaders object itself. + */ + public ManagedClustersGetCommandResultHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultResponse.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultResponse.java new file mode 100644 index 0000000000000..2ff8afadd31a2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultResponse.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; + +/** Contains all response data for the getCommandResult operation. */ +public final class ManagedClustersGetCommandResultResponse + extends ResponseBase { + /** + * Creates an instance of ManagedClustersGetCommandResultResponse. + * + * @param request the request which resulted in this ManagedClustersGetCommandResultResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ManagedClustersGetCommandResultResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + RunCommandResultInner value, + ManagedClustersGetCommandResultHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ + @Override + public RunCommandResultInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java new file mode 100644 index 0000000000000..0bde0d63fd0b2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedServiceIdentityUserAssignedIdentitiesValue model. */ +@Immutable +public final class ManagedServiceIdentityUserAssignedIdentitiesValue { + /* + * The principal id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The client id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** Creates an instance of ManagedServiceIdentityUserAssignedIdentitiesValue class. */ + public ManagedServiceIdentityUserAssignedIdentitiesValue() { + } + + /** + * Get the principalId property: The principal id of user assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client id of user assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevision.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevision.java new file mode 100644 index 0000000000000..fa0ee383d45b7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevision.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Holds information on upgrades and compatibility for given major.minor mesh release. */ +@Fluent +public class MeshRevision { + /* + * The revision of the mesh release. + */ + @JsonProperty(value = "revision") + private String revision; + + /* + * List of revisions available for upgrade of a specific mesh revision + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /* + * List of items this revision of service mesh is compatible with, and their associated versions. + */ + @JsonProperty(value = "compatibleWith") + private List compatibleWith; + + /** Creates an instance of MeshRevision class. */ + public MeshRevision() { + } + + /** + * Get the revision property: The revision of the mesh release. + * + * @return the revision value. + */ + public String revision() { + return this.revision; + } + + /** + * Set the revision property: The revision of the mesh release. + * + * @param revision the revision value to set. + * @return the MeshRevision object itself. + */ + public MeshRevision withRevision(String revision) { + this.revision = revision; + return this; + } + + /** + * Get the upgrades property: List of revisions available for upgrade of a specific mesh revision. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: List of revisions available for upgrade of a specific mesh revision. + * + * @param upgrades the upgrades value to set. + * @return the MeshRevision object itself. + */ + public MeshRevision withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Get the compatibleWith property: List of items this revision of service mesh is compatible with, and their + * associated versions. + * + * @return the compatibleWith value. + */ + public List compatibleWith() { + return this.compatibleWith; + } + + /** + * Set the compatibleWith property: List of items this revision of service mesh is compatible with, and their + * associated versions. + * + * @param compatibleWith the compatibleWith value to set. + * @return the MeshRevision object itself. + */ + public MeshRevision withCompatibleWith(List compatibleWith) { + this.compatibleWith = compatibleWith; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (compatibleWith() != null) { + compatibleWith().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfile.java new file mode 100644 index 0000000000000..b696d412f30c1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfile.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; + +/** An immutable client-side representation of MeshRevisionProfile. */ +public interface MeshRevisionProfile { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Mesh revision profile properties for a mesh. + * + * @return the properties value. + */ + MeshRevisionProfileProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner + * object. + * + * @return the inner object. + */ + MeshRevisionProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileList.java new file mode 100644 index 0000000000000..816e94361b12b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Holds an array of MeshRevisionsProfiles. */ +@Fluent +public final class MeshRevisionProfileList { + /* + * Array of service mesh add-on revision profiles for all supported mesh modes. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of mesh revision profile. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of MeshRevisionProfileList class. */ + public MeshRevisionProfileList() { + } + + /** + * Get the value property: Array of service mesh add-on revision profiles for all supported mesh modes. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of service mesh add-on revision profiles for all supported mesh modes. + * + * @param value the value value to set. + * @return the MeshRevisionProfileList object itself. + */ + public MeshRevisionProfileList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of mesh revision profile. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileProperties.java new file mode 100644 index 0000000000000..f8a990e66f77c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Mesh revision profile properties for a mesh. */ +@Fluent +public final class MeshRevisionProfileProperties { + /* + * The meshRevisions property. + */ + @JsonProperty(value = "meshRevisions") + private List meshRevisions; + + /** Creates an instance of MeshRevisionProfileProperties class. */ + public MeshRevisionProfileProperties() { + } + + /** + * Get the meshRevisions property: The meshRevisions property. + * + * @return the meshRevisions value. + */ + public List meshRevisions() { + return this.meshRevisions; + } + + /** + * Set the meshRevisions property: The meshRevisions property. + * + * @param meshRevisions the meshRevisions value to set. + * @return the MeshRevisionProfileProperties object itself. + */ + public MeshRevisionProfileProperties withMeshRevisions(List meshRevisions) { + this.meshRevisions = meshRevisions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (meshRevisions() != null) { + meshRevisions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfile.java new file mode 100644 index 0000000000000..d46097508483a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfile.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; + +/** An immutable client-side representation of MeshUpgradeProfile. */ +public interface MeshUpgradeProfile { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Mesh upgrade profile properties for a major.minor release. + * + * @return the properties value. + */ + MeshUpgradeProfileProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner + * object. + * + * @return the inner object. + */ + MeshUpgradeProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileList.java new file mode 100644 index 0000000000000..3236d6041b5c3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Holds an array of MeshUpgradeProfiles. */ +@Fluent +public final class MeshUpgradeProfileList { + /* + * Array of supported service mesh add-on upgrade profiles. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of mesh upgrade profile. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of MeshUpgradeProfileList class. */ + public MeshUpgradeProfileList() { + } + + /** + * Get the value property: Array of supported service mesh add-on upgrade profiles. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of supported service mesh add-on upgrade profiles. + * + * @param value the value value to set. + * @return the MeshUpgradeProfileList object itself. + */ + public MeshUpgradeProfileList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of mesh upgrade profile. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileProperties.java new file mode 100644 index 0000000000000..0605be228b689 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileProperties.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import java.util.List; + +/** Mesh upgrade profile properties for a major.minor release. */ +@Fluent +public final class MeshUpgradeProfileProperties extends MeshRevision { + /** Creates an instance of MeshUpgradeProfileProperties class. */ + public MeshUpgradeProfileProperties() { + } + + /** {@inheritDoc} */ + @Override + public MeshUpgradeProfileProperties withRevision(String revision) { + super.withRevision(revision); + return this; + } + + /** {@inheritDoc} */ + @Override + public MeshUpgradeProfileProperties withUpgrades(List upgrades) { + super.withUpgrades(upgrades); + return this; + } + + /** {@inheritDoc} */ + @Override + public MeshUpgradeProfileProperties withCompatibleWith(List compatibleWith) { + super.withCompatibleWith(compatibleWith); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkDataplane.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkDataplane.java new file mode 100644 index 0000000000000..7cc8a0345358b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkDataplane.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Network dataplane used in the Kubernetes cluster. */ +public final class NetworkDataplane extends ExpandableStringEnum { + /** Static value azure for NetworkDataplane. */ + public static final NetworkDataplane AZURE = fromString("azure"); + + /** Static value cilium for NetworkDataplane. */ + public static final NetworkDataplane CILIUM = fromString("cilium"); + + /** + * Creates a new instance of NetworkDataplane value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkDataplane() { + } + + /** + * Creates or finds a NetworkDataplane from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkDataplane. + */ + @JsonCreator + public static NetworkDataplane fromString(String name) { + return fromString(name, NetworkDataplane.class); + } + + /** + * Gets known NetworkDataplane values. + * + * @return known NetworkDataplane values. + */ + public static Collection values() { + return values(NetworkDataplane.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMode.java new file mode 100644 index 0000000000000..89919bdf7a310 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The network mode Azure CNI is configured with. + * + *

This cannot be specified if networkPlugin is anything other than 'azure'. + */ +public final class NetworkMode extends ExpandableStringEnum { + /** Static value transparent for NetworkMode. */ + public static final NetworkMode TRANSPARENT = fromString("transparent"); + + /** Static value bridge for NetworkMode. */ + public static final NetworkMode BRIDGE = fromString("bridge"); + + /** + * Creates a new instance of NetworkMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkMode() { + } + + /** + * Creates or finds a NetworkMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkMode. + */ + @JsonCreator + public static NetworkMode fromString(String name) { + return fromString(name, NetworkMode.class); + } + + /** + * Gets known NetworkMode values. + * + * @return known NetworkMode values. + */ + public static Collection values() { + return values(NetworkMode.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPlugin.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPlugin.java new file mode 100644 index 0000000000000..048d6966e319b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPlugin.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Network plugin used for building the Kubernetes network. */ +public final class NetworkPlugin extends ExpandableStringEnum { + /** Static value azure for NetworkPlugin. */ + public static final NetworkPlugin AZURE = fromString("azure"); + + /** Static value kubenet for NetworkPlugin. */ + public static final NetworkPlugin KUBENET = fromString("kubenet"); + + /** Static value none for NetworkPlugin. */ + public static final NetworkPlugin NONE = fromString("none"); + + /** + * Creates a new instance of NetworkPlugin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkPlugin() { + } + + /** + * Creates or finds a NetworkPlugin from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkPlugin. + */ + @JsonCreator + public static NetworkPlugin fromString(String name) { + return fromString(name, NetworkPlugin.class); + } + + /** + * Gets known NetworkPlugin values. + * + * @return known NetworkPlugin values. + */ + public static Collection values() { + return values(NetworkPlugin.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPluginMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPluginMode.java new file mode 100644 index 0000000000000..1cac0af649a5b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPluginMode.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The mode the network plugin should use. */ +public final class NetworkPluginMode extends ExpandableStringEnum { + /** Static value overlay for NetworkPluginMode. */ + public static final NetworkPluginMode OVERLAY = fromString("overlay"); + + /** + * Creates a new instance of NetworkPluginMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkPluginMode() { + } + + /** + * Creates or finds a NetworkPluginMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkPluginMode. + */ + @JsonCreator + public static NetworkPluginMode fromString(String name) { + return fromString(name, NetworkPluginMode.class); + } + + /** + * Gets known NetworkPluginMode values. + * + * @return known NetworkPluginMode values. + */ + public static Collection values() { + return values(NetworkPluginMode.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPolicy.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPolicy.java new file mode 100644 index 0000000000000..29be9c31b9c2c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPolicy.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Network policy used for building the Kubernetes network. */ +public final class NetworkPolicy extends ExpandableStringEnum { + /** Static value calico for NetworkPolicy. */ + public static final NetworkPolicy CALICO = fromString("calico"); + + /** Static value azure for NetworkPolicy. */ + public static final NetworkPolicy AZURE = fromString("azure"); + + /** Static value cilium for NetworkPolicy. */ + public static final NetworkPolicy CILIUM = fromString("cilium"); + + /** + * Creates a new instance of NetworkPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkPolicy() { + } + + /** + * Creates or finds a NetworkPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkPolicy. + */ + @JsonCreator + public static NetworkPolicy fromString(String name) { + return fromString(name, NetworkPolicy.class); + } + + /** + * Gets known NetworkPolicy values. + * + * @return known NetworkPolicy values. + */ + public static Collection values() { + return values(NetworkPolicy.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfile.java new file mode 100644 index 0000000000000..bd7ba3e7452f7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfile.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents the OpenShift networking configuration. */ +@Fluent +public final class NetworkProfile { + /* + * CIDR for the OpenShift Vnet. + */ + @JsonProperty(value = "vnetCidr") + private String vnetCidr; + + /* + * CIDR of the Vnet to peer. + */ + @JsonProperty(value = "peerVnetId") + private String peerVnetId; + + /* + * ID of the Vnet created for OSA cluster. + */ + @JsonProperty(value = "vnetId") + private String vnetId; + + /** Creates an instance of NetworkProfile class. */ + public NetworkProfile() { + } + + /** + * Get the vnetCidr property: CIDR for the OpenShift Vnet. + * + * @return the vnetCidr value. + */ + public String vnetCidr() { + return this.vnetCidr; + } + + /** + * Set the vnetCidr property: CIDR for the OpenShift Vnet. + * + * @param vnetCidr the vnetCidr value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withVnetCidr(String vnetCidr) { + this.vnetCidr = vnetCidr; + return this; + } + + /** + * Get the peerVnetId property: CIDR of the Vnet to peer. + * + * @return the peerVnetId value. + */ + public String peerVnetId() { + return this.peerVnetId; + } + + /** + * Set the peerVnetId property: CIDR of the Vnet to peer. + * + * @param peerVnetId the peerVnetId value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withPeerVnetId(String peerVnetId) { + this.peerVnetId = peerVnetId; + return this; + } + + /** + * Get the vnetId property: ID of the Vnet created for OSA cluster. + * + * @return the vnetId value. + */ + public String vnetId() { + return this.vnetId; + } + + /** + * Set the vnetId property: ID of the Vnet created for OSA cluster. + * + * @param vnetId the vnetId value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withVnetId(String vnetId) { + this.vnetId = vnetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeOSUpgradeChannel.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeOSUpgradeChannel.java new file mode 100644 index 0000000000000..5bcfbf1bb8a91 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeOSUpgradeChannel.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Node OS Upgrade Channel + * + *

Manner in which the OS on your nodes is updated. The default is NodeImage. + */ +public final class NodeOSUpgradeChannel extends ExpandableStringEnum { + /** Static value None for NodeOSUpgradeChannel. */ + public static final NodeOSUpgradeChannel NONE = fromString("None"); + + /** Static value Unmanaged for NodeOSUpgradeChannel. */ + public static final NodeOSUpgradeChannel UNMANAGED = fromString("Unmanaged"); + + /** Static value NodeImage for NodeOSUpgradeChannel. */ + public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); + + /** + * Creates a new instance of NodeOSUpgradeChannel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodeOSUpgradeChannel() { + } + + /** + * Creates or finds a NodeOSUpgradeChannel from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeOSUpgradeChannel. + */ + @JsonCreator + public static NodeOSUpgradeChannel fromString(String name) { + return fromString(name, NodeOSUpgradeChannel.class); + } + + /** + * Gets known NodeOSUpgradeChannel values. + * + * @return known NodeOSUpgradeChannel values. + */ + public static Collection values() { + return values(NodeOSUpgradeChannel.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSDiskType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSDiskType.java new file mode 100644 index 0000000000000..64f9ee2f04ac6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSDiskType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The OS disk type to be used for machines in the agent pool. + * + *

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + * Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + */ +public final class OSDiskType extends ExpandableStringEnum { + /** Static value Managed for OSDiskType. */ + public static final OSDiskType MANAGED = fromString("Managed"); + + /** Static value Ephemeral for OSDiskType. */ + public static final OSDiskType EPHEMERAL = fromString("Ephemeral"); + + /** + * Creates a new instance of OSDiskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OSDiskType() { + } + + /** + * Creates or finds a OSDiskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OSDiskType. + */ + @JsonCreator + public static OSDiskType fromString(String name) { + return fromString(name, OSDiskType.class); + } + + /** + * Gets known OSDiskType values. + * + * @return known OSDiskType values. + */ + public static Collection values() { + return values(OSDiskType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProfile.java new file mode 100644 index 0000000000000..b07655fd13f0e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProfile.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import java.util.List; + +/** An immutable client-side representation of OSOptionProfile. */ +public interface OSOptionProfile { + /** + * Gets the id property: The ID of the OS option resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the OS option resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the OS option resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the osOptionPropertyList property: The list of OS options. + * + * @return the osOptionPropertyList value. + */ + List osOptionPropertyList(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner + * object. + * + * @return the inner object. + */ + OSOptionProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProperty.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProperty.java new file mode 100644 index 0000000000000..5f57d0aec9ae8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProperty.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** OS option property. */ +@Fluent +public final class OSOptionProperty { + /* + * The OS type. + */ + @JsonProperty(value = "os-type", required = true) + private String osType; + + /* + * Whether the image is FIPS-enabled. + */ + @JsonProperty(value = "enable-fips-image", required = true) + private boolean enableFipsImage; + + /** Creates an instance of OSOptionProperty class. */ + public OSOptionProperty() { + } + + /** + * Get the osType property: The OS type. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Set the osType property: The OS type. + * + * @param osType the osType value to set. + * @return the OSOptionProperty object itself. + */ + public OSOptionProperty withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the enableFipsImage property: Whether the image is FIPS-enabled. + * + * @return the enableFipsImage value. + */ + public boolean enableFipsImage() { + return this.enableFipsImage; + } + + /** + * Set the enableFipsImage property: Whether the image is FIPS-enabled. + * + * @param enableFipsImage the enableFipsImage value to set. + * @return the OSOptionProperty object itself. + */ + public OSOptionProperty withEnableFipsImage(boolean enableFipsImage) { + this.enableFipsImage = enableFipsImage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (osType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property osType in model OSOptionProperty")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OSOptionProperty.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSType.java new file mode 100644 index 0000000000000..9af20b1b1a01f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. */ +public final class OSType extends ExpandableStringEnum { + /** Static value Linux for OSType. */ + public static final OSType LINUX = fromString("Linux"); + + /** Static value Windows for OSType. */ + public static final OSType WINDOWS = fromString("Windows"); + + /** + * Creates a new instance of OSType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OSType() { + } + + /** + * Creates or finds a OSType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OSType. + */ + @JsonCreator + public static OSType fromString(String name) { + return fromString(name, OSType.class); + } + + /** + * Gets known OSType values. + * + * @return known OSType values. + */ + public static Collection values() { + return values(OSType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftAgentPoolProfileRole.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftAgentPoolProfileRole.java new file mode 100644 index 0000000000000..02e7ea5c82160 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftAgentPoolProfileRole.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** OpenShiftAgentPoolProfileRole represents the role of the AgentPoolProfile. */ +public final class OpenShiftAgentPoolProfileRole extends ExpandableStringEnum { + /** Static value compute for OpenShiftAgentPoolProfileRole. */ + public static final OpenShiftAgentPoolProfileRole COMPUTE = fromString("compute"); + + /** Static value infra for OpenShiftAgentPoolProfileRole. */ + public static final OpenShiftAgentPoolProfileRole INFRA = fromString("infra"); + + /** + * Creates a new instance of OpenShiftAgentPoolProfileRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OpenShiftAgentPoolProfileRole() { + } + + /** + * Creates or finds a OpenShiftAgentPoolProfileRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding OpenShiftAgentPoolProfileRole. + */ + @JsonCreator + public static OpenShiftAgentPoolProfileRole fromString(String name) { + return fromString(name, OpenShiftAgentPoolProfileRole.class); + } + + /** + * Gets known OpenShiftAgentPoolProfileRole values. + * + * @return known OpenShiftAgentPoolProfileRole values. + */ + public static Collection values() { + return values(OpenShiftAgentPoolProfileRole.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftContainerServiceVMSize.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftContainerServiceVMSize.java new file mode 100644 index 0000000000000..a6d3992a9917d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftContainerServiceVMSize.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Size of OpenShift VMs. */ +public final class OpenShiftContainerServiceVMSize extends ExpandableStringEnum { + /** Static value Standard_D2s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D2S_V3 = fromString("Standard_D2s_v3"); + + /** Static value Standard_D4s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D4S_V3 = fromString("Standard_D4s_v3"); + + /** Static value Standard_D8s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D8S_V3 = fromString("Standard_D8s_v3"); + + /** Static value Standard_D16s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D16S_V3 = fromString("Standard_D16s_v3"); + + /** Static value Standard_D32s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D32S_V3 = fromString("Standard_D32s_v3"); + + /** Static value Standard_D64s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D64S_V3 = fromString("Standard_D64s_v3"); + + /** Static value Standard_DS4_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS4_V2 = fromString("Standard_DS4_v2"); + + /** Static value Standard_DS5_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS5_V2 = fromString("Standard_DS5_v2"); + + /** Static value Standard_F8s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F8S_V2 = fromString("Standard_F8s_v2"); + + /** Static value Standard_F16s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F16S_V2 = fromString("Standard_F16s_v2"); + + /** Static value Standard_F32s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F32S_V2 = fromString("Standard_F32s_v2"); + + /** Static value Standard_F64s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F64S_V2 = fromString("Standard_F64s_v2"); + + /** Static value Standard_F72s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F72S_V2 = fromString("Standard_F72s_v2"); + + /** Static value Standard_F8s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F8S = fromString("Standard_F8s"); + + /** Static value Standard_F16s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F16S = fromString("Standard_F16s"); + + /** Static value Standard_E4s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E4S_V3 = fromString("Standard_E4s_v3"); + + /** Static value Standard_E8s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E8S_V3 = fromString("Standard_E8s_v3"); + + /** Static value Standard_E16s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E16S_V3 = fromString("Standard_E16s_v3"); + + /** Static value Standard_E20s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E20S_V3 = fromString("Standard_E20s_v3"); + + /** Static value Standard_E32s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E32S_V3 = fromString("Standard_E32s_v3"); + + /** Static value Standard_E64s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E64S_V3 = fromString("Standard_E64s_v3"); + + /** Static value Standard_GS2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS2 = fromString("Standard_GS2"); + + /** Static value Standard_GS3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS3 = fromString("Standard_GS3"); + + /** Static value Standard_GS4 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS4 = fromString("Standard_GS4"); + + /** Static value Standard_GS5 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS5 = fromString("Standard_GS5"); + + /** Static value Standard_DS12_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS12_V2 = fromString("Standard_DS12_v2"); + + /** Static value Standard_DS13_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS13_V2 = fromString("Standard_DS13_v2"); + + /** Static value Standard_DS14_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS14_V2 = fromString("Standard_DS14_v2"); + + /** Static value Standard_DS15_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS15_V2 = fromString("Standard_DS15_v2"); + + /** Static value Standard_L4s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_L4S = fromString("Standard_L4s"); + + /** Static value Standard_L8s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_L8S = fromString("Standard_L8s"); + + /** Static value Standard_L16s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_L16S = fromString("Standard_L16s"); + + /** Static value Standard_L32s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_L32S = fromString("Standard_L32s"); + + /** + * Creates a new instance of OpenShiftContainerServiceVMSize value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OpenShiftContainerServiceVMSize() { + } + + /** + * Creates or finds a OpenShiftContainerServiceVMSize from its string representation. + * + * @param name a name to look for. + * @return the corresponding OpenShiftContainerServiceVMSize. + */ + @JsonCreator + public static OpenShiftContainerServiceVMSize fromString(String name) { + return fromString(name, OpenShiftContainerServiceVMSize.class); + } + + /** + * Gets known OpenShiftContainerServiceVMSize values. + * + * @return known OpenShiftContainerServiceVMSize values. + */ + public static Collection values() { + return values(OpenShiftContainerServiceVMSize.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedCluster.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedCluster.java new file mode 100644 index 0000000000000..2db6b685ee568 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedCluster.java @@ -0,0 +1,373 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of OpenShiftManagedCluster. */ +public interface OpenShiftManagedCluster { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the plan property: Define the resource plan as required by ARM for billing purposes. + * + * @return the plan value. + */ + PurchasePlan plan(); + + /** + * Gets the provisioningState property: The current deployment or provisioning state, which only appears in the + * response. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the openShiftVersion value. + */ + String openShiftVersion(); + + /** + * Gets the clusterVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the clusterVersion value. + */ + String clusterVersion(); + + /** + * Gets the publicHostname property: Service generated FQDN for OpenShift API server. + * + * @return the publicHostname value. + */ + String publicHostname(); + + /** + * Gets the fqdn property: Service generated FQDN for OpenShift API server loadbalancer internal hostname. + * + * @return the fqdn value. + */ + String fqdn(); + + /** + * Gets the networkProfile property: Configuration for OpenShift networking. + * + * @return the networkProfile value. + */ + NetworkProfile networkProfile(); + + /** + * Gets the routerProfiles property: Configuration for OpenShift router(s). + * + * @return the routerProfiles value. + */ + List routerProfiles(); + + /** + * Gets the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @return the masterPoolProfile value. + */ + OpenShiftManagedClusterMasterPoolProfile masterPoolProfile(); + + /** + * Gets the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * Gets the authProfile property: Configures OpenShift authentication. + * + * @return the authProfile value. + */ + OpenShiftManagedClusterAuthProfile authProfile(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner + * object. + * + * @return the inner object. + */ + OpenShiftManagedClusterInner innerModel(); + + /** The entirety of the OpenShiftManagedCluster definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + + /** The OpenShiftManagedCluster definition stages. */ + interface DefinitionStages { + /** The first stage of the OpenShiftManagedCluster definition. */ + interface Blank extends WithLocation { + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the OpenShiftManagedCluster definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithPlan, + DefinitionStages.WithOpenShiftVersion, + DefinitionStages.WithNetworkProfile, + DefinitionStages.WithRouterProfiles, + DefinitionStages.WithMasterPoolProfile, + DefinitionStages.WithAgentPoolProfiles, + DefinitionStages.WithAuthProfile { + /** + * Executes the create request. + * + * @return the created resource. + */ + OpenShiftManagedCluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + OpenShiftManagedCluster create(Context context); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify plan. */ + interface WithPlan { + /** + * Specifies the plan property: Define the resource plan as required by ARM for billing purposes. + * + * @param plan Define the resource plan as required by ARM for billing purposes. + * @return the next definition stage. + */ + WithCreate withPlan(PurchasePlan plan); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify openShiftVersion. */ + interface WithOpenShiftVersion { + /** + * Specifies the openShiftVersion property: Version of OpenShift specified when creating the cluster.. + * + * @param openShiftVersion Version of OpenShift specified when creating the cluster. + * @return the next definition stage. + */ + WithCreate withOpenShiftVersion(String openShiftVersion); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify networkProfile. */ + interface WithNetworkProfile { + /** + * Specifies the networkProfile property: Configuration for OpenShift networking.. + * + * @param networkProfile Configuration for OpenShift networking. + * @return the next definition stage. + */ + WithCreate withNetworkProfile(NetworkProfile networkProfile); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify routerProfiles. */ + interface WithRouterProfiles { + /** + * Specifies the routerProfiles property: Configuration for OpenShift router(s).. + * + * @param routerProfiles Configuration for OpenShift router(s). + * @return the next definition stage. + */ + WithCreate withRouterProfiles(List routerProfiles); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify masterPoolProfile. */ + interface WithMasterPoolProfile { + /** + * Specifies the masterPoolProfile property: Configuration for OpenShift master VMs.. + * + * @param masterPoolProfile Configuration for OpenShift master VMs. + * @return the next definition stage. + */ + WithCreate withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify agentPoolProfiles. */ + interface WithAgentPoolProfiles { + /** + * Specifies the agentPoolProfiles property: Configuration of OpenShift cluster VMs.. + * + * @param agentPoolProfiles Configuration of OpenShift cluster VMs. + * @return the next definition stage. + */ + WithCreate withAgentPoolProfiles(List agentPoolProfiles); + } + + /** The stage of the OpenShiftManagedCluster definition allowing to specify authProfile. */ + interface WithAuthProfile { + /** + * Specifies the authProfile property: Configures OpenShift authentication.. + * + * @param authProfile Configures OpenShift authentication. + * @return the next definition stage. + */ + WithCreate withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile); + } + } + + /** + * Begins update for the OpenShiftManagedCluster resource. + * + * @return the stage of resource update. + */ + OpenShiftManagedCluster.Update update(); + + /** The template for OpenShiftManagedCluster update. */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + OpenShiftManagedCluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + OpenShiftManagedCluster apply(Context context); + } + + /** The OpenShiftManagedCluster update stages. */ + interface UpdateStages { + /** The stage of the OpenShiftManagedCluster update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + OpenShiftManagedCluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + OpenShiftManagedCluster refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAadIdentityProvider.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAadIdentityProvider.java new file mode 100644 index 0000000000000..81bdd0bdb9e32 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAadIdentityProvider.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Defines the Identity provider for MS AAD. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AADIdentityProvider") +@Fluent +public final class OpenShiftManagedClusterAadIdentityProvider extends OpenShiftManagedClusterBaseIdentityProvider { + /* + * The clientId password associated with the provider. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The secret password associated with the provider. + */ + @JsonProperty(value = "secret") + private String secret; + + /* + * The tenantId associated with the provider. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The groupId to be granted cluster admin role. + */ + @JsonProperty(value = "customerAdminGroupId") + private String customerAdminGroupId; + + /** Creates an instance of OpenShiftManagedClusterAadIdentityProvider class. */ + public OpenShiftManagedClusterAadIdentityProvider() { + } + + /** + * Get the clientId property: The clientId password associated with the provider. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The clientId password associated with the provider. + * + * @param clientId the clientId value to set. + * @return the OpenShiftManagedClusterAadIdentityProvider object itself. + */ + public OpenShiftManagedClusterAadIdentityProvider withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the secret property: The secret password associated with the provider. + * + * @return the secret value. + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret property: The secret password associated with the provider. + * + * @param secret the secret value to set. + * @return the OpenShiftManagedClusterAadIdentityProvider object itself. + */ + public OpenShiftManagedClusterAadIdentityProvider withSecret(String secret) { + this.secret = secret; + return this; + } + + /** + * Get the tenantId property: The tenantId associated with the provider. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId associated with the provider. + * + * @param tenantId the tenantId value to set. + * @return the OpenShiftManagedClusterAadIdentityProvider object itself. + */ + public OpenShiftManagedClusterAadIdentityProvider withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the customerAdminGroupId property: The groupId to be granted cluster admin role. + * + * @return the customerAdminGroupId value. + */ + public String customerAdminGroupId() { + return this.customerAdminGroupId; + } + + /** + * Set the customerAdminGroupId property: The groupId to be granted cluster admin role. + * + * @param customerAdminGroupId the customerAdminGroupId value to set. + * @return the OpenShiftManagedClusterAadIdentityProvider object itself. + */ + public OpenShiftManagedClusterAadIdentityProvider withCustomerAdminGroupId(String customerAdminGroupId) { + this.customerAdminGroupId = customerAdminGroupId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAgentPoolProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAgentPoolProfile.java new file mode 100644 index 0000000000000..e804e0371c9ab --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAgentPoolProfile.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Defines the configuration of the OpenShift cluster VMs. */ +@Fluent +public final class OpenShiftManagedClusterAgentPoolProfile { + /* + * Unique name of the pool profile in the context of the subscription and resource group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Number of agents (VMs) to host docker containers. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /* + * Size of agent VMs. + */ + @JsonProperty(value = "vmSize", required = true) + private OpenShiftContainerServiceVMSize vmSize; + + /* + * Subnet CIDR for the peering. + */ + @JsonProperty(value = "subnetCidr") + private String subnetCidr; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /* + * Define the role of the AgentPoolProfile. + */ + @JsonProperty(value = "role") + private OpenShiftAgentPoolProfileRole role; + + /** Creates an instance of OpenShiftManagedClusterAgentPoolProfile class. */ + public OpenShiftManagedClusterAgentPoolProfile() { + } + + /** + * Get the name property: Unique name of the pool profile in the context of the subscription and resource group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Unique name of the pool profile in the context of the subscription and resource group. + * + * @param name the name value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the count property: Number of agents (VMs) to host docker containers. + * + * @return the count value. + */ + public int count() { + return this.count; + } + + /** + * Set the count property: Number of agents (VMs) to host docker containers. + * + * @param count the count value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withCount(int count) { + this.count = count; + return this; + } + + /** + * Get the vmSize property: Size of agent VMs. + * + * @return the vmSize value. + */ + public OpenShiftContainerServiceVMSize vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: Size of agent VMs. + * + * @param vmSize the vmSize value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withVmSize(OpenShiftContainerServiceVMSize vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the subnetCidr property: Subnet CIDR for the peering. + * + * @return the subnetCidr value. + */ + public String subnetCidr() { + return this.subnetCidr; + } + + /** + * Set the subnetCidr property: Subnet CIDR for the peering. + * + * @param subnetCidr the subnetCidr value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withSubnetCidr(String subnetCidr) { + this.subnetCidr = subnetCidr; + return this; + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @param osType the osType value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the role property: Define the role of the AgentPoolProfile. + * + * @return the role value. + */ + public OpenShiftAgentPoolProfileRole role() { + return this.role; + } + + /** + * Set the role property: Define the role of the AgentPoolProfile. + * + * @param role the role value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withRole(OpenShiftAgentPoolProfileRole role) { + this.role = role; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model OpenShiftManagedClusterAgentPoolProfile")); + } + if (vmSize() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property vmSize in model OpenShiftManagedClusterAgentPoolProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OpenShiftManagedClusterAgentPoolProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAuthProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAuthProfile.java new file mode 100644 index 0000000000000..8ef4c2d8162a7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAuthProfile.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines all possible authentication profiles for the OpenShift cluster. */ +@Fluent +public final class OpenShiftManagedClusterAuthProfile { + /* + * Type of authentication profile to use. + */ + @JsonProperty(value = "identityProviders") + private List identityProviders; + + /** Creates an instance of OpenShiftManagedClusterAuthProfile class. */ + public OpenShiftManagedClusterAuthProfile() { + } + + /** + * Get the identityProviders property: Type of authentication profile to use. + * + * @return the identityProviders value. + */ + public List identityProviders() { + return this.identityProviders; + } + + /** + * Set the identityProviders property: Type of authentication profile to use. + * + * @param identityProviders the identityProviders value to set. + * @return the OpenShiftManagedClusterAuthProfile object itself. + */ + public OpenShiftManagedClusterAuthProfile withIdentityProviders( + List identityProviders) { + this.identityProviders = identityProviders; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identityProviders() != null) { + identityProviders().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterBaseIdentityProvider.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterBaseIdentityProvider.java new file mode 100644 index 0000000000000..f006b640a47a8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterBaseIdentityProvider.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Structure for any Identity provider. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "kind", + defaultImpl = OpenShiftManagedClusterBaseIdentityProvider.class) +@JsonTypeName("OpenShiftManagedClusterBaseIdentityProvider") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AADIdentityProvider", value = OpenShiftManagedClusterAadIdentityProvider.class) +}) +@Immutable +public class OpenShiftManagedClusterBaseIdentityProvider { + /** Creates an instance of OpenShiftManagedClusterBaseIdentityProvider class. */ + public OpenShiftManagedClusterBaseIdentityProvider() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterIdentityProvider.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterIdentityProvider.java new file mode 100644 index 0000000000000..e2866787dd978 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterIdentityProvider.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Defines the configuration of the identity providers to be used in the OpenShift cluster. */ +@Fluent +public final class OpenShiftManagedClusterIdentityProvider { + /* + * Name of the provider. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Configuration of the provider. + */ + @JsonProperty(value = "provider") + private OpenShiftManagedClusterBaseIdentityProvider provider; + + /** Creates an instance of OpenShiftManagedClusterIdentityProvider class. */ + public OpenShiftManagedClusterIdentityProvider() { + } + + /** + * Get the name property: Name of the provider. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the provider. + * + * @param name the name value to set. + * @return the OpenShiftManagedClusterIdentityProvider object itself. + */ + public OpenShiftManagedClusterIdentityProvider withName(String name) { + this.name = name; + return this; + } + + /** + * Get the provider property: Configuration of the provider. + * + * @return the provider value. + */ + public OpenShiftManagedClusterBaseIdentityProvider provider() { + return this.provider; + } + + /** + * Set the provider property: Configuration of the provider. + * + * @param provider the provider value to set. + * @return the OpenShiftManagedClusterIdentityProvider object itself. + */ + public OpenShiftManagedClusterIdentityProvider withProvider(OpenShiftManagedClusterBaseIdentityProvider provider) { + this.provider = provider; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (provider() != null) { + provider().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterListResult.java new file mode 100644 index 0000000000000..3e02940970f08 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List OpenShift Managed Clusters operation. */ +@Fluent +public final class OpenShiftManagedClusterListResult { + /* + * The list of OpenShift managed clusters. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of OpenShift managed cluster results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of OpenShiftManagedClusterListResult class. */ + public OpenShiftManagedClusterListResult() { + } + + /** + * Get the value property: The list of OpenShift managed clusters. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of OpenShift managed clusters. + * + * @param value the value value to set. + * @return the OpenShiftManagedClusterListResult object itself. + */ + public OpenShiftManagedClusterListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of OpenShift managed cluster results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterMasterPoolProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterMasterPoolProfile.java new file mode 100644 index 0000000000000..2939661274652 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterMasterPoolProfile.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** OpenShiftManagedClusterMaterPoolProfile contains configuration for OpenShift master VMs. */ +@Fluent +public final class OpenShiftManagedClusterMasterPoolProfile { + /* + * Unique name of the master pool profile in the context of the subscription and resource group. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Number of masters (VMs) to host docker containers. The default value is 3. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /* + * Size of agent VMs. + */ + @JsonProperty(value = "vmSize", required = true) + private OpenShiftContainerServiceVMSize vmSize; + + /* + * Subnet CIDR for the peering. + */ + @JsonProperty(value = "subnetCidr") + private String subnetCidr; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /** Creates an instance of OpenShiftManagedClusterMasterPoolProfile class. */ + public OpenShiftManagedClusterMasterPoolProfile() { + } + + /** + * Get the name property: Unique name of the master pool profile in the context of the subscription and resource + * group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Unique name of the master pool profile in the context of the subscription and resource + * group. + * + * @param name the name value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the count property: Number of masters (VMs) to host docker containers. The default value is 3. + * + * @return the count value. + */ + public int count() { + return this.count; + } + + /** + * Set the count property: Number of masters (VMs) to host docker containers. The default value is 3. + * + * @param count the count value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withCount(int count) { + this.count = count; + return this; + } + + /** + * Get the vmSize property: Size of agent VMs. + * + * @return the vmSize value. + */ + public OpenShiftContainerServiceVMSize vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: Size of agent VMs. + * + * @param vmSize the vmSize value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withVmSize(OpenShiftContainerServiceVMSize vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the subnetCidr property: Subnet CIDR for the peering. + * + * @return the subnetCidr value. + */ + public String subnetCidr() { + return this.subnetCidr; + } + + /** + * Set the subnetCidr property: Subnet CIDR for the peering. + * + * @param subnetCidr the subnetCidr value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withSubnetCidr(String subnetCidr) { + this.subnetCidr = subnetCidr; + return this; + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @param osType the osType value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vmSize() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property vmSize in model OpenShiftManagedClusterMasterPoolProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OpenShiftManagedClusterMasterPoolProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusters.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusters.java new file mode 100644 index 0000000000000..2379ac00fe0db --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusters.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of OpenShiftManagedClusters. */ +public interface OpenShiftManagedClusters { + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + *

Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of + * each OpenShift managed cluster. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response from the List OpenShift Managed Clusters operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + *

Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response from the List OpenShift Managed Clusters operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name along with {@link + * Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name. + */ + OpenShiftManagedCluster getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, Context context); + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name along with {@link + * Response}. + */ + OpenShiftManagedCluster getById(String id); + + /** + * Gets a OpenShift managed cluster. + * + *

Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name along with {@link + * Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes an OpenShift managed cluster. + * + *

Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new OpenShiftManagedCluster resource. + * + * @param name resource name. + * @return the first stage of the new OpenShiftManagedCluster definition. + */ + OpenShiftManagedCluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftRouterProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftRouterProfile.java new file mode 100644 index 0000000000000..de61ec09e1fd1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftRouterProfile.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents an OpenShift router. */ +@Fluent +public final class OpenShiftRouterProfile { + /* + * Name of the router profile. + */ + @JsonProperty(value = "name") + private String name; + + /* + * DNS subdomain for OpenShift router. + */ + @JsonProperty(value = "publicSubdomain", access = JsonProperty.Access.WRITE_ONLY) + private String publicSubdomain; + + /* + * Auto-allocated FQDN for the OpenShift router. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** Creates an instance of OpenShiftRouterProfile class. */ + public OpenShiftRouterProfile() { + } + + /** + * Get the name property: Name of the router profile. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the router profile. + * + * @param name the name value to set. + * @return the OpenShiftRouterProfile object itself. + */ + public OpenShiftRouterProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the publicSubdomain property: DNS subdomain for OpenShift router. + * + * @return the publicSubdomain value. + */ + public String publicSubdomain() { + return this.publicSubdomain; + } + + /** + * Get the fqdn property: Auto-allocated FQDN for the OpenShift router. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationListResult.java new file mode 100644 index 0000000000000..881f60b588291 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationListResult.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The List Operation response. */ +@Immutable +public final class OperationListResult { + /* + * The list of operations + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + + /** + * Get the value property: The list of operations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationValue.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationValue.java new file mode 100644 index 0000000000000..d9ebc1d827255 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationValue.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; + +/** An immutable client-side representation of OperationValue. */ +public interface OperationValue { + /** + * Gets the origin property: The origin of the operation. + * + * @return the origin value. + */ + String origin(); + + /** + * Gets the name property: The name of the operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the operation property: The display name of the operation. + * + * @return the operation value. + */ + String operation(); + + /** + * Gets the resource property: The display name of the resource the operation applies to. + * + * @return the resource value. + */ + String resource(); + + /** + * Gets the description property: The description of the operation. + * + * @return the description value. + */ + String description(); + + /** + * Gets the provider property: The resource provider for the operation. + * + * @return the provider value. + */ + String provider(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner + * object. + * + * @return the inner object. + */ + OperationValueInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Operations.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Operations.java new file mode 100644 index 0000000000000..a9e99e0aeee45 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Operations.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of Operations. */ +public interface Operations { + /** + * Gets a list of operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorProfile.java new file mode 100644 index 0000000000000..65de9dd643072 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorProfile.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Contains information about orchestrator. */ +@Fluent +public final class OrchestratorProfile { + /* + * Orchestrator type. + */ + @JsonProperty(value = "orchestratorType") + private String orchestratorType; + + /* + * Orchestrator version (major, minor, patch). + */ + @JsonProperty(value = "orchestratorVersion", required = true) + private String orchestratorVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** Creates an instance of OrchestratorProfile class. */ + public OrchestratorProfile() { + } + + /** + * Get the orchestratorType property: Orchestrator type. + * + * @return the orchestratorType value. + */ + public String orchestratorType() { + return this.orchestratorType; + } + + /** + * Set the orchestratorType property: Orchestrator type. + * + * @param orchestratorType the orchestratorType value to set. + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withOrchestratorType(String orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get the orchestratorVersion property: Orchestrator version (major, minor, patch). + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: Orchestrator version (major, minor, patch). + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the isPreview property: Whether Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (orchestratorVersion() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property orchestratorVersion in model OrchestratorProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfile.java new file mode 100644 index 0000000000000..f0d18553de2d5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfile.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The profile of an orchestrator and its available versions. */ +@Fluent +public final class OrchestratorVersionProfile { + /* + * Orchestrator type. + */ + @JsonProperty(value = "orchestratorType", required = true) + private String orchestratorType; + + /* + * Orchestrator version (major, minor, patch). + */ + @JsonProperty(value = "orchestratorVersion", required = true) + private String orchestratorVersion; + + /* + * Installed by default if version is not specified. + */ + @JsonProperty(value = "default") + private Boolean defaultProperty; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /* + * The list of available upgrade versions. + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /** Creates an instance of OrchestratorVersionProfile class. */ + public OrchestratorVersionProfile() { + } + + /** + * Get the orchestratorType property: Orchestrator type. + * + * @return the orchestratorType value. + */ + public String orchestratorType() { + return this.orchestratorType; + } + + /** + * Set the orchestratorType property: Orchestrator type. + * + * @param orchestratorType the orchestratorType value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withOrchestratorType(String orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get the orchestratorVersion property: Orchestrator version (major, minor, patch). + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: Orchestrator version (major, minor, patch). + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the defaultProperty property: Installed by default if version is not specified. + * + * @return the defaultProperty value. + */ + public Boolean defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: Installed by default if version is not specified. + * + * @param defaultProperty the defaultProperty value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withDefaultProperty(Boolean defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the isPreview property: Whether Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get the upgrades property: The list of available upgrade versions. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: The list of available upgrade versions. + * + * @param upgrades the upgrades value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (orchestratorType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property orchestratorType in model OrchestratorVersionProfile")); + } + if (orchestratorVersion() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property orchestratorVersion in model OrchestratorVersionProfile")); + } + if (upgrades() != null) { + upgrades().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfileListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfileListResult.java new file mode 100644 index 0000000000000..b3c9074d2b2ab --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfileListResult.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; +import java.util.List; + +/** An immutable client-side representation of OrchestratorVersionProfileListResult. */ +public interface OrchestratorVersionProfileListResult { + /** + * Gets the id property: Id of the orchestrator version profile list result. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the orchestrator version profile list result. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Type of the orchestrator version profile list result. + * + * @return the type value. + */ + String type(); + + /** + * Gets the orchestrators property: List of orchestrator version profiles. + * + * @return the orchestrators value. + */ + List orchestrators(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner + * object. + * + * @return the inner object. + */ + OrchestratorVersionProfileListResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Ossku.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Ossku.java new file mode 100644 index 0000000000000..51e508de26f32 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Ossku.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 + * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + */ +public final class Ossku extends ExpandableStringEnum { + /** Static value Ubuntu for Ossku. */ + public static final Ossku UBUNTU = fromString("Ubuntu"); + + /** Static value AzureLinux for Ossku. */ + public static final Ossku AZURE_LINUX = fromString("AzureLinux"); + + /** Static value CBLMariner for Ossku. */ + public static final Ossku CBLMARINER = fromString("CBLMariner"); + + /** Static value Windows2019 for Ossku. */ + public static final Ossku WINDOWS2019 = fromString("Windows2019"); + + /** Static value Windows2022 for Ossku. */ + public static final Ossku WINDOWS2022 = fromString("Windows2022"); + + /** + * Creates a new instance of Ossku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Ossku() { + } + + /** + * Creates or finds a Ossku from its string representation. + * + * @param name a name to look for. + * @return the corresponding Ossku. + */ + @JsonCreator + public static Ossku fromString(String name) { + return fromString(name, Ossku.class); + } + + /** + * Gets known Ossku values. + * + * @return known Ossku values. + */ + public static Collection values() { + return values(Ossku.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpoint.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpoint.java new file mode 100644 index 0000000000000..36e50e0c4b9be --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpoint.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import java.util.List; + +/** An immutable client-side representation of OutboundEnvironmentEndpoint. */ +public interface OutboundEnvironmentEndpoint { + /** + * Gets the category property: The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + * + * @return the category value. + */ + String category(); + + /** + * Gets the endpoints property: The endpoints that AKS agent nodes connect to. + * + * @return the endpoints value. + */ + List endpoints(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner + * object. + * + * @return the inner object. + */ + OutboundEnvironmentEndpointInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpointCollection.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpointCollection.java new file mode 100644 index 0000000000000..fa62ed34bd838 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpointCollection.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of OutboundEnvironmentEndpoint. */ +@Fluent +public final class OutboundEnvironmentEndpointCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of OutboundEnvironmentEndpointCollection class. */ + public OutboundEnvironmentEndpointCollection() { + } + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the OutboundEnvironmentEndpointCollection object itself. + */ + public OutboundEnvironmentEndpointCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model OutboundEnvironmentEndpointCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OutboundEnvironmentEndpointCollection.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundType.java new file mode 100644 index 0000000000000..8c501bed30f19 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundType.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The outbound (egress) routing method. + * + *

This can only be set at cluster creation time and cannot be changed later. For more information see [egress + * outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + */ +public final class OutboundType extends ExpandableStringEnum { + /** Static value loadBalancer for OutboundType. */ + public static final OutboundType LOAD_BALANCER = fromString("loadBalancer"); + + /** Static value userDefinedRouting for OutboundType. */ + public static final OutboundType USER_DEFINED_ROUTING = fromString("userDefinedRouting"); + + /** Static value managedNATGateway for OutboundType. */ + public static final OutboundType MANAGED_NATGATEWAY = fromString("managedNATGateway"); + + /** Static value userAssignedNATGateway for OutboundType. */ + public static final OutboundType USER_ASSIGNED_NATGATEWAY = fromString("userAssignedNATGateway"); + + /** + * Creates a new instance of OutboundType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OutboundType() { + } + + /** + * Creates or finds a OutboundType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OutboundType. + */ + @JsonCreator + public static OutboundType fromString(String name) { + return fromString(name, OutboundType.class); + } + + /** + * Gets known OutboundType values. + * + * @return known OutboundType values. + */ + public static Collection values() { + return values(OutboundType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PowerState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PowerState.java new file mode 100644 index 0000000000000..9bbc16742c24f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PowerState.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the Power State of the cluster. */ +@Fluent +public final class PowerState { + /* + * Tells whether the cluster is Running or Stopped + */ + @JsonProperty(value = "code") + private Code code; + + /** Creates an instance of PowerState class. */ + public PowerState() { + } + + /** + * Get the code property: Tells whether the cluster is Running or Stopped. + * + * @return the code value. + */ + public Code code() { + return this.code; + } + + /** + * Set the code property: Tells whether the cluster is Running or Stopped. + * + * @param code the code value to set. + * @return the PowerState object itself. + */ + public PowerState withCode(Code code) { + this.code = code; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpoint.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpoint.java new file mode 100644 index 0000000000000..ad13f53a2a3b6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpoint.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Private endpoint which a connection belongs to. */ +@Fluent +public final class PrivateEndpoint { + /* + * The resource ID of the private endpoint + */ + @JsonProperty(value = "id") + private String id; + + /** Creates an instance of PrivateEndpoint class. */ + public PrivateEndpoint() { + } + + /** + * Get the id property: The resource ID of the private endpoint. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The resource ID of the private endpoint. + * + * @param id the id value to set. + * @return the PrivateEndpoint object itself. + */ + public PrivateEndpoint withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnection.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnection.java new file mode 100644 index 0000000000000..f02763d399b7e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnection.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; + +/** An immutable client-side representation of PrivateEndpointConnection. */ +public interface PrivateEndpointConnection { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * Gets the privateEndpoint property: The resource of private endpoint. + * + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 0000000000000..c13034676ae04 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import java.util.List; + +/** An immutable client-side representation of PrivateEndpointConnectionListResult. */ +public interface PrivateEndpointConnectionListResult { + /** + * Gets the value property: The collection value. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionListResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionProvisioningState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 0000000000000..b4cb45af07c6b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionProvisioningState.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The current provisioning state. */ +public final class PrivateEndpointConnectionProvisioningState + extends ExpandableStringEnum { + /** Static value Canceled for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates a new instance of PrivateEndpointConnectionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointConnectionProvisioningState() { + } + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointConnectionProvisioningState. + */ + @JsonCreator + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** + * Gets known PrivateEndpointConnectionProvisioningState values. + * + * @return known PrivateEndpointConnectionProvisioningState values. + */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnections.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnections.java new file mode 100644 index 0000000000000..d988a6a2c612c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnections.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; + +/** Resource collection API of PrivateEndpointConnections. */ +public interface PrivateEndpointConnections { + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response}. + */ + Response listWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections. + */ + PrivateEndpointConnectionListResult list(String resourceGroupName, String resourceName); + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); + + /** + * Gets the specified private endpoint connection. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + PrivateEndpointConnection get(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + Response updateWithResponse( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, + Context context); + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + PrivateEndpointConnection update( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResource.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResource.java new file mode 100644 index 0000000000000..f9fceae739ada --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResource.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import java.util.List; + +/** An immutable client-side representation of PrivateLinkResource. */ +public interface PrivateLinkResource { + /** + * Gets the id property: The ID of the private link resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the private link resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The resource type. + * + * @return the type value. + */ + String type(); + + /** + * Gets the groupId property: The group ID of the resource. + * + * @return the groupId value. + */ + String groupId(); + + /** + * Gets the requiredMembers property: The RequiredMembers of the resource. + * + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * Gets the privateLinkServiceId property: The private link service ID of the resource, this field is exposed only + * to NRP internally. + * + * @return the privateLinkServiceId value. + */ + String privateLinkServiceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner + * object. + * + * @return the inner object. + */ + PrivateLinkResourceInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResources.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResources.java new file mode 100644 index 0000000000000..a7df6319addd5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResources.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PrivateLinkResources. */ +public interface PrivateLinkResources { + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response}. + */ + Response listWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets a list of private link resources in the specified managed cluster. + * + *

To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources. + */ + PrivateLinkResourcesListResult list(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResourcesListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResourcesListResult.java new file mode 100644 index 0000000000000..950cc68a0f2f4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResourcesListResult.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; +import java.util.List; + +/** An immutable client-side representation of PrivateLinkResourcesListResult. */ +public interface PrivateLinkResourcesListResult { + /** + * Gets the value property: The collection value. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner + * object. + * + * @return the inner object. + */ + PrivateLinkResourcesListResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkServiceConnectionState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 0000000000000..6cc2e9b45d686 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkServiceConnectionState.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The state of a private link service connection. */ +@Fluent +public final class PrivateLinkServiceConnectionState { + /* + * The private link service connection status. + */ + @JsonProperty(value = "status") + private ConnectionStatus status; + + /* + * The private link service connection description. + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of PrivateLinkServiceConnectionState class. */ + public PrivateLinkServiceConnectionState() { + } + + /** + * Get the status property: The private link service connection status. + * + * @return the status value. + */ + public ConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: The private link service connection status. + * + * @param status the status value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(ConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the description property: The private link service connection description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The private link service connection description. + * + * @param description the description value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PublicNetworkAccess.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PublicNetworkAccess.java new file mode 100644 index 0000000000000..fd28da9e19b1e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PublicNetworkAccess.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * PublicNetworkAccess of the managedCluster + * + *

Allow or deny public network access for AKS. + */ +public final class PublicNetworkAccess extends ExpandableStringEnum { + /** Static value Enabled for PublicNetworkAccess. */ + public static final PublicNetworkAccess ENABLED = fromString("Enabled"); + + /** Static value Disabled for PublicNetworkAccess. */ + public static final PublicNetworkAccess DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PublicNetworkAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicNetworkAccess() { + } + + /** + * Creates or finds a PublicNetworkAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicNetworkAccess. + */ + @JsonCreator + public static PublicNetworkAccess fromString(String name) { + return fromString(name, PublicNetworkAccess.class); + } + + /** + * Gets known PublicNetworkAccess values. + * + * @return known PublicNetworkAccess values. + */ + public static Collection values() { + return values(PublicNetworkAccess.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PurchasePlan.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PurchasePlan.java new file mode 100644 index 0000000000000..4dc5740d35373 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PurchasePlan.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. */ +@Fluent +public final class PurchasePlan { + /* + * The plan ID. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Specifies the product of the image from the marketplace. This is the same value as Offer under the + * imageReference element. + */ + @JsonProperty(value = "product") + private String product; + + /* + * The promotion code. + */ + @JsonProperty(value = "promotionCode") + private String promotionCode; + + /* + * The plan ID. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** Creates an instance of PurchasePlan class. */ + public PurchasePlan() { + } + + /** + * Get the name property: The plan ID. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The plan ID. + * + * @param name the name value to set. + * @return the PurchasePlan object itself. + */ + public PurchasePlan withName(String name) { + this.name = name; + return this; + } + + /** + * Get the product property: Specifies the product of the image from the marketplace. This is the same value as + * Offer under the imageReference element. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: Specifies the product of the image from the marketplace. This is the same value as + * Offer under the imageReference element. + * + * @param product the product value to set. + * @return the PurchasePlan object itself. + */ + public PurchasePlan withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the promotionCode property: The promotion code. + * + * @return the promotionCode value. + */ + public String promotionCode() { + return this.promotionCode; + } + + /** + * Set the promotionCode property: The promotion code. + * + * @param promotionCode the promotionCode value to set. + * @return the PurchasePlan object itself. + */ + public PurchasePlan withPromotionCode(String promotionCode) { + this.promotionCode = promotionCode; + return this; + } + + /** + * Get the publisher property: The plan ID. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The plan ID. + * + * @param publisher the publisher value to set. + * @return the PurchasePlan object itself. + */ + public PurchasePlan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RelativeMonthlySchedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RelativeMonthlySchedule.java new file mode 100644 index 0000000000000..87a03b43b1214 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RelativeMonthlySchedule.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. */ +@Fluent +public final class RelativeMonthlySchedule { + /* + * Specifies the number of months between each set of occurrences. + */ + @JsonProperty(value = "intervalMonths", required = true) + private int intervalMonths; + + /* + * The week index. + * + * Specifies on which week of the month the dayOfWeek applies. + */ + @JsonProperty(value = "weekIndex", required = true) + private Type weekIndex; + + /* + * Specifies on which day of the week the maintenance occurs. + */ + @JsonProperty(value = "dayOfWeek", required = true) + private WeekDay dayOfWeek; + + /** Creates an instance of RelativeMonthlySchedule class. */ + public RelativeMonthlySchedule() { + } + + /** + * Get the intervalMonths property: Specifies the number of months between each set of occurrences. + * + * @return the intervalMonths value. + */ + public int intervalMonths() { + return this.intervalMonths; + } + + /** + * Set the intervalMonths property: Specifies the number of months between each set of occurrences. + * + * @param intervalMonths the intervalMonths value to set. + * @return the RelativeMonthlySchedule object itself. + */ + public RelativeMonthlySchedule withIntervalMonths(int intervalMonths) { + this.intervalMonths = intervalMonths; + return this; + } + + /** + * Get the weekIndex property: The week index. + * + *

Specifies on which week of the month the dayOfWeek applies. + * + * @return the weekIndex value. + */ + public Type weekIndex() { + return this.weekIndex; + } + + /** + * Set the weekIndex property: The week index. + * + *

Specifies on which week of the month the dayOfWeek applies. + * + * @param weekIndex the weekIndex value to set. + * @return the RelativeMonthlySchedule object itself. + */ + public RelativeMonthlySchedule withWeekIndex(Type weekIndex) { + this.weekIndex = weekIndex; + return this; + } + + /** + * Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs. + * + * @return the dayOfWeek value. + */ + public WeekDay dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the RelativeMonthlySchedule object itself. + */ + public RelativeMonthlySchedule withDayOfWeek(WeekDay dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (weekIndex() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property weekIndex in model RelativeMonthlySchedule")); + } + if (dayOfWeek() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dayOfWeek in model RelativeMonthlySchedule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RelativeMonthlySchedule.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResolvePrivateLinkServiceIds.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResolvePrivateLinkServiceIds.java new file mode 100644 index 0000000000000..c6e4ae7524c6d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResolvePrivateLinkServiceIds.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; + +/** Resource collection API of ResolvePrivateLinkServiceIds. */ +public interface ResolvePrivateLinkServiceIds { + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response}. + */ + Response postWithResponse( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context); + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster. + */ + PrivateLinkResource post(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceIdentityType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceIdentityType.java new file mode 100644 index 0000000000000..9b32fc282ad5b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceIdentityType.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of identity used for the managed cluster. + * + *

For more information see [use managed identities in + * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + */ +public enum ResourceIdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** Enum value UserAssigned. */ + USER_ASSIGNED("UserAssigned"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a ResourceIdentityType instance. */ + private final String value; + + ResourceIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceIdentityType object, or null if unable to parse. + */ + @JsonCreator + public static ResourceIdentityType fromString(String value) { + if (value == null) { + return null; + } + ResourceIdentityType[] items = ResourceIdentityType.values(); + for (ResourceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** {@inheritDoc} */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceReference.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceReference.java new file mode 100644 index 0000000000000..1ef5d566e623f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceReference.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A reference to an Azure resource. */ +@Fluent +public final class ResourceReference { + /* + * The fully qualified Azure resource id. + */ + @JsonProperty(value = "id") + private String id; + + /** Creates an instance of ResourceReference class. */ + public ResourceReference() { + } + + /** + * Get the id property: The fully qualified Azure resource id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The fully qualified Azure resource id. + * + * @param id the id value to set. + * @return the ResourceReference object itself. + */ + public ResourceReference withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandRequest.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandRequest.java new file mode 100644 index 0000000000000..33ed2c0894ae4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandRequest.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A run command request. */ +@Fluent +public final class RunCommandRequest { + /* + * The command to run. + */ + @JsonProperty(value = "command", required = true) + private String command; + + /* + * A base64 encoded zip file containing the files required by the command. + */ + @JsonProperty(value = "context") + private String context; + + /* + * AuthToken issued for AKS AAD Server App. + */ + @JsonProperty(value = "clusterToken") + private String clusterToken; + + /** Creates an instance of RunCommandRequest class. */ + public RunCommandRequest() { + } + + /** + * Get the command property: The command to run. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: The command to run. + * + * @param command the command value to set. + * @return the RunCommandRequest object itself. + */ + public RunCommandRequest withCommand(String command) { + this.command = command; + return this; + } + + /** + * Get the context property: A base64 encoded zip file containing the files required by the command. + * + * @return the context value. + */ + public String context() { + return this.context; + } + + /** + * Set the context property: A base64 encoded zip file containing the files required by the command. + * + * @param context the context value to set. + * @return the RunCommandRequest object itself. + */ + public RunCommandRequest withContext(String context) { + this.context = context; + return this; + } + + /** + * Get the clusterToken property: AuthToken issued for AKS AAD Server App. + * + * @return the clusterToken value. + */ + public String clusterToken() { + return this.clusterToken; + } + + /** + * Set the clusterToken property: AuthToken issued for AKS AAD Server App. + * + * @param clusterToken the clusterToken value to set. + * @return the RunCommandRequest object itself. + */ + public RunCommandRequest withClusterToken(String clusterToken) { + this.clusterToken = clusterToken; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (command() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property command in model RunCommandRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RunCommandRequest.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandResult.java new file mode 100644 index 0000000000000..c79b61caf85b4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of RunCommandResult. */ +public interface RunCommandResult { + /** + * Gets the id property: The command id. + * + * @return the id value. + */ + String id(); + + /** + * Gets the provisioningState property: provisioning State. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the exitCode property: The exit code of the command. + * + * @return the exitCode value. + */ + Integer exitCode(); + + /** + * Gets the startedAt property: The time when the command started. + * + * @return the startedAt value. + */ + OffsetDateTime startedAt(); + + /** + * Gets the finishedAt property: The time when the command finished. + * + * @return the finishedAt value. + */ + OffsetDateTime finishedAt(); + + /** + * Gets the logs property: The command output. + * + * @return the logs value. + */ + String logs(); + + /** + * Gets the reason property: An explanation of why provisioningState is set to failed (if so). + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner + * object. + * + * @return the inner object. + */ + RunCommandResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleDownMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleDownMode.java new file mode 100644 index 0000000000000..5f5f384951aeb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleDownMode.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Describes how VMs are added to or removed from Agent Pools. See [billing + * states](https://docs.microsoft.com/azure/virtual-machines/states-billing). + */ +public final class ScaleDownMode extends ExpandableStringEnum { + /** Static value Delete for ScaleDownMode. */ + public static final ScaleDownMode DELETE = fromString("Delete"); + + /** Static value Deallocate for ScaleDownMode. */ + public static final ScaleDownMode DEALLOCATE = fromString("Deallocate"); + + /** + * Creates a new instance of ScaleDownMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScaleDownMode() { + } + + /** + * Creates or finds a ScaleDownMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScaleDownMode. + */ + @JsonCreator + public static ScaleDownMode fromString(String name) { + return fromString(name, ScaleDownMode.class); + } + + /** + * Gets known ScaleDownMode values. + * + * @return known ScaleDownMode values. + */ + public static Collection values() { + return values(ScaleDownMode.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetEvictionPolicy.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetEvictionPolicy.java new file mode 100644 index 0000000000000..21390fd51f757 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetEvictionPolicy.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The Virtual Machine Scale Set eviction policy. + * + *

The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more + * information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms). + */ +public final class ScaleSetEvictionPolicy extends ExpandableStringEnum { + /** Static value Delete for ScaleSetEvictionPolicy. */ + public static final ScaleSetEvictionPolicy DELETE = fromString("Delete"); + + /** Static value Deallocate for ScaleSetEvictionPolicy. */ + public static final ScaleSetEvictionPolicy DEALLOCATE = fromString("Deallocate"); + + /** + * Creates a new instance of ScaleSetEvictionPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScaleSetEvictionPolicy() { + } + + /** + * Creates or finds a ScaleSetEvictionPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScaleSetEvictionPolicy. + */ + @JsonCreator + public static ScaleSetEvictionPolicy fromString(String name) { + return fromString(name, ScaleSetEvictionPolicy.class); + } + + /** + * Gets known ScaleSetEvictionPolicy values. + * + * @return known ScaleSetEvictionPolicy values. + */ + public static Collection values() { + return values(ScaleSetEvictionPolicy.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetPriority.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetPriority.java new file mode 100644 index 0000000000000..7758d5d4d3c43 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetPriority.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The Virtual Machine Scale Set priority. */ +public final class ScaleSetPriority extends ExpandableStringEnum { + /** Static value Spot for ScaleSetPriority. */ + public static final ScaleSetPriority SPOT = fromString("Spot"); + + /** Static value Regular for ScaleSetPriority. */ + public static final ScaleSetPriority REGULAR = fromString("Regular"); + + /** + * Creates a new instance of ScaleSetPriority value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScaleSetPriority() { + } + + /** + * Creates or finds a ScaleSetPriority from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScaleSetPriority. + */ + @JsonCreator + public static ScaleSetPriority fromString(String name) { + return fromString(name, ScaleSetPriority.class); + } + + /** + * Gets known ScaleSetPriority values. + * + * @return known ScaleSetPriority values. + */ + public static Collection values() { + return values(ScaleSetPriority.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Schedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Schedule.java new file mode 100644 index 0000000000000..4ad9a6c3321b1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Schedule.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or + * 'relativeMonthly' for your maintenance schedule. + */ +@Fluent +public final class Schedule { + /* + * For schedules like: 'recur every day' or 'recur every 3 days'. + */ + @JsonProperty(value = "daily") + private DailySchedule daily; + + /* + * For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + */ + @JsonProperty(value = "weekly") + private WeeklySchedule weekly; + + /* + * For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + */ + @JsonProperty(value = "absoluteMonthly") + private AbsoluteMonthlySchedule absoluteMonthly; + + /* + * For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + */ + @JsonProperty(value = "relativeMonthly") + private RelativeMonthlySchedule relativeMonthly; + + /** Creates an instance of Schedule class. */ + public Schedule() { + } + + /** + * Get the daily property: For schedules like: 'recur every day' or 'recur every 3 days'. + * + * @return the daily value. + */ + public DailySchedule daily() { + return this.daily; + } + + /** + * Set the daily property: For schedules like: 'recur every day' or 'recur every 3 days'. + * + * @param daily the daily value to set. + * @return the Schedule object itself. + */ + public Schedule withDaily(DailySchedule daily) { + this.daily = daily; + return this; + } + + /** + * Get the weekly property: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + * + * @return the weekly value. + */ + public WeeklySchedule weekly() { + return this.weekly; + } + + /** + * Set the weekly property: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + * + * @param weekly the weekly value to set. + * @return the Schedule object itself. + */ + public Schedule withWeekly(WeeklySchedule weekly) { + this.weekly = weekly; + return this; + } + + /** + * Get the absoluteMonthly property: For schedules like: 'recur every month on the 15th' or 'recur every 3 months on + * the 20th'. + * + * @return the absoluteMonthly value. + */ + public AbsoluteMonthlySchedule absoluteMonthly() { + return this.absoluteMonthly; + } + + /** + * Set the absoluteMonthly property: For schedules like: 'recur every month on the 15th' or 'recur every 3 months on + * the 20th'. + * + * @param absoluteMonthly the absoluteMonthly value to set. + * @return the Schedule object itself. + */ + public Schedule withAbsoluteMonthly(AbsoluteMonthlySchedule absoluteMonthly) { + this.absoluteMonthly = absoluteMonthly; + return this; + } + + /** + * Get the relativeMonthly property: For schedules like: 'recur every month on the first Monday' or 'recur every 3 + * months on last Friday'. + * + * @return the relativeMonthly value. + */ + public RelativeMonthlySchedule relativeMonthly() { + return this.relativeMonthly; + } + + /** + * Set the relativeMonthly property: For schedules like: 'recur every month on the first Monday' or 'recur every 3 + * months on last Friday'. + * + * @param relativeMonthly the relativeMonthly value to set. + * @return the Schedule object itself. + */ + public Schedule withRelativeMonthly(RelativeMonthlySchedule relativeMonthly) { + this.relativeMonthly = relativeMonthly; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (daily() != null) { + daily().validate(); + } + if (weekly() != null) { + weekly().validate(); + } + if (absoluteMonthly() != null) { + absoluteMonthly().validate(); + } + if (relativeMonthly() != null) { + relativeMonthly().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshMode.java new file mode 100644 index 0000000000000..87219ffdbcd08 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshMode.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Mode of the service mesh. */ +public final class ServiceMeshMode extends ExpandableStringEnum { + /** Static value Istio for ServiceMeshMode. */ + public static final ServiceMeshMode ISTIO = fromString("Istio"); + + /** Static value Disabled for ServiceMeshMode. */ + public static final ServiceMeshMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ServiceMeshMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceMeshMode() { + } + + /** + * Creates or finds a ServiceMeshMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceMeshMode. + */ + @JsonCreator + public static ServiceMeshMode fromString(String name) { + return fromString(name, ServiceMeshMode.class); + } + + /** + * Gets known ServiceMeshMode values. + * + * @return known ServiceMeshMode values. + */ + public static Collection values() { + return values(ServiceMeshMode.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshProfile.java new file mode 100644 index 0000000000000..9910f27813433 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshProfile.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Service mesh profile for a managed cluster. */ +@Fluent +public final class ServiceMeshProfile { + /* + * Mode of the service mesh. + */ + @JsonProperty(value = "mode", required = true) + private ServiceMeshMode mode; + + /* + * Istio service mesh configuration. + */ + @JsonProperty(value = "istio") + private IstioServiceMesh istio; + + /** Creates an instance of ServiceMeshProfile class. */ + public ServiceMeshProfile() { + } + + /** + * Get the mode property: Mode of the service mesh. + * + * @return the mode value. + */ + public ServiceMeshMode mode() { + return this.mode; + } + + /** + * Set the mode property: Mode of the service mesh. + * + * @param mode the mode value to set. + * @return the ServiceMeshProfile object itself. + */ + public ServiceMeshProfile withMode(ServiceMeshMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the istio property: Istio service mesh configuration. + * + * @return the istio value. + */ + public IstioServiceMesh istio() { + return this.istio; + } + + /** + * Set the istio property: Istio service mesh configuration. + * + * @param istio the istio value to set. + * @return the ServiceMeshProfile object itself. + */ + public ServiceMeshProfile withIstio(IstioServiceMesh istio) { + this.istio = istio; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mode() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property mode in model ServiceMeshProfile")); + } + if (istio() != null) { + istio().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceMeshProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshot.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshot.java new file mode 100644 index 0000000000000..5b3f7f4b3ccab --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshot.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import java.util.Map; + +/** An immutable client-side representation of Snapshot. */ +public interface Snapshot { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @return the creationData value. + */ + CreationData creationData(); + + /** + * Gets the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + SnapshotType snapshotType(); + + /** + * Gets the kubernetesVersion property: The version of Kubernetes. + * + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * Gets the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + String nodeImageVersion(); + + /** + * Gets the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + OSType osType(); + + /** + * Gets the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + Ossku osSku(); + + /** + * Gets the vmSize property: The size of the VM. + * + * @return the vmSize value. + */ + String vmSize(); + + /** + * Gets the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + Boolean enableFips(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner + * object. + * + * @return the inner object. + */ + SnapshotInner innerModel(); + + /** The entirety of the Snapshot definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + + /** The Snapshot definition stages. */ + interface DefinitionStages { + /** The first stage of the Snapshot definition. */ + interface Blank extends WithLocation { + } + + /** The stage of the Snapshot definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** The stage of the Snapshot definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the Snapshot definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithCreationData, DefinitionStages.WithSnapshotType { + /** + * Executes the create request. + * + * @return the created resource. + */ + Snapshot create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Snapshot create(Context context); + } + + /** The stage of the Snapshot definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** The stage of the Snapshot definition allowing to specify creationData. */ + interface WithCreationData { + /** + * Specifies the creationData property: CreationData to be used to specify the source agent pool resource ID + * to create this snapshot.. + * + * @param creationData CreationData to be used to specify the source agent pool resource ID to create this + * snapshot. + * @return the next definition stage. + */ + WithCreate withCreationData(CreationData creationData); + } + + /** The stage of the Snapshot definition allowing to specify snapshotType. */ + interface WithSnapshotType { + /** + * Specifies the snapshotType property: The type of a snapshot. The default is NodePool.. + * + * @param snapshotType The type of a snapshot. The default is NodePool. + * @return the next definition stage. + */ + WithCreate withSnapshotType(SnapshotType snapshotType); + } + } + + /** + * Begins update for the Snapshot resource. + * + * @return the stage of resource update. + */ + Snapshot.Update update(); + + /** The template for Snapshot update. */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Snapshot apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Snapshot apply(Context context); + } + + /** The Snapshot update stages. */ + interface UpdateStages { + /** The stage of the Snapshot update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Snapshot refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Snapshot refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotListResult.java new file mode 100644 index 0000000000000..0b4cfd9c298bc --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List Snapshots operation. */ +@Fluent +public final class SnapshotListResult { + /* + * The list of snapshots. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of snapshot results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of SnapshotListResult class. */ + public SnapshotListResult() { + } + + /** + * Get the value property: The list of snapshots. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of snapshots. + * + * @param value the value value to set. + * @return the SnapshotListResult object itself. + */ + public SnapshotListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of snapshot results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotType.java new file mode 100644 index 0000000000000..a1ed673cf5058 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type of a snapshot. The default is NodePool. */ +public final class SnapshotType extends ExpandableStringEnum { + /** Static value NodePool for SnapshotType. */ + public static final SnapshotType NODE_POOL = fromString("NodePool"); + + /** + * Creates a new instance of SnapshotType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnapshotType() { + } + + /** + * Creates or finds a SnapshotType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnapshotType. + */ + @JsonCreator + public static SnapshotType fromString(String name) { + return fromString(name, SnapshotType.class); + } + + /** + * Gets known SnapshotType values. + * + * @return known SnapshotType values. + */ + public static Collection values() { + return values(SnapshotType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshots.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshots.java new file mode 100644 index 0000000000000..359dc52069085 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshots.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Snapshots. */ +public interface Snapshots { + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets a list of snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response from the List Snapshots operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists snapshots in the specified subscription and 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 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 response from the List Snapshots operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot. + */ + Snapshot getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Gets a snapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + Snapshot getById(String id); + + /** + * Gets a snapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a snapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a snapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Snapshot resource. + * + * @param name resource name. + * @return the first stage of the new Snapshot definition. + */ + Snapshot.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SysctlConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SysctlConfig.java new file mode 100644 index 0000000000000..3c2399a420cdc --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SysctlConfig.java @@ -0,0 +1,752 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Sysctl settings for Linux agent nodes. */ +@Fluent +public final class SysctlConfig { + /* + * Sysctl setting net.core.somaxconn. + */ + @JsonProperty(value = "netCoreSomaxconn") + private Integer netCoreSomaxconn; + + /* + * Sysctl setting net.core.netdev_max_backlog. + */ + @JsonProperty(value = "netCoreNetdevMaxBacklog") + private Integer netCoreNetdevMaxBacklog; + + /* + * Sysctl setting net.core.rmem_default. + */ + @JsonProperty(value = "netCoreRmemDefault") + private Integer netCoreRmemDefault; + + /* + * Sysctl setting net.core.rmem_max. + */ + @JsonProperty(value = "netCoreRmemMax") + private Integer netCoreRmemMax; + + /* + * Sysctl setting net.core.wmem_default. + */ + @JsonProperty(value = "netCoreWmemDefault") + private Integer netCoreWmemDefault; + + /* + * Sysctl setting net.core.wmem_max. + */ + @JsonProperty(value = "netCoreWmemMax") + private Integer netCoreWmemMax; + + /* + * Sysctl setting net.core.optmem_max. + */ + @JsonProperty(value = "netCoreOptmemMax") + private Integer netCoreOptmemMax; + + /* + * Sysctl setting net.ipv4.tcp_max_syn_backlog. + */ + @JsonProperty(value = "netIpv4TcpMaxSynBacklog") + private Integer netIpv4TcpMaxSynBacklog; + + /* + * Sysctl setting net.ipv4.tcp_max_tw_buckets. + */ + @JsonProperty(value = "netIpv4TcpMaxTwBuckets") + private Integer netIpv4TcpMaxTwBuckets; + + /* + * Sysctl setting net.ipv4.tcp_fin_timeout. + */ + @JsonProperty(value = "netIpv4TcpFinTimeout") + private Integer netIpv4TcpFinTimeout; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_time. + */ + @JsonProperty(value = "netIpv4TcpKeepaliveTime") + private Integer netIpv4TcpKeepaliveTime; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_probes. + */ + @JsonProperty(value = "netIpv4TcpKeepaliveProbes") + private Integer netIpv4TcpKeepaliveProbes; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_intvl. + */ + @JsonProperty(value = "netIpv4TcpkeepaliveIntvl") + private Integer netIpv4TcpkeepaliveIntvl; + + /* + * Sysctl setting net.ipv4.tcp_tw_reuse. + */ + @JsonProperty(value = "netIpv4TcpTwReuse") + private Boolean netIpv4TcpTwReuse; + + /* + * Sysctl setting net.ipv4.ip_local_port_range. + */ + @JsonProperty(value = "netIpv4IpLocalPortRange") + private String netIpv4IpLocalPortRange; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh1. + */ + @JsonProperty(value = "netIpv4NeighDefaultGcThresh1") + private Integer netIpv4NeighDefaultGcThresh1; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh2. + */ + @JsonProperty(value = "netIpv4NeighDefaultGcThresh2") + private Integer netIpv4NeighDefaultGcThresh2; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh3. + */ + @JsonProperty(value = "netIpv4NeighDefaultGcThresh3") + private Integer netIpv4NeighDefaultGcThresh3; + + /* + * Sysctl setting net.netfilter.nf_conntrack_max. + */ + @JsonProperty(value = "netNetfilterNfConntrackMax") + private Integer netNetfilterNfConntrackMax; + + /* + * Sysctl setting net.netfilter.nf_conntrack_buckets. + */ + @JsonProperty(value = "netNetfilterNfConntrackBuckets") + private Integer netNetfilterNfConntrackBuckets; + + /* + * Sysctl setting fs.inotify.max_user_watches. + */ + @JsonProperty(value = "fsInotifyMaxUserWatches") + private Integer fsInotifyMaxUserWatches; + + /* + * Sysctl setting fs.file-max. + */ + @JsonProperty(value = "fsFileMax") + private Integer fsFileMax; + + /* + * Sysctl setting fs.aio-max-nr. + */ + @JsonProperty(value = "fsAioMaxNr") + private Integer fsAioMaxNr; + + /* + * Sysctl setting fs.nr_open. + */ + @JsonProperty(value = "fsNrOpen") + private Integer fsNrOpen; + + /* + * Sysctl setting kernel.threads-max. + */ + @JsonProperty(value = "kernelThreadsMax") + private Integer kernelThreadsMax; + + /* + * Sysctl setting vm.max_map_count. + */ + @JsonProperty(value = "vmMaxMapCount") + private Integer vmMaxMapCount; + + /* + * Sysctl setting vm.swappiness. + */ + @JsonProperty(value = "vmSwappiness") + private Integer vmSwappiness; + + /* + * Sysctl setting vm.vfs_cache_pressure. + */ + @JsonProperty(value = "vmVfsCachePressure") + private Integer vmVfsCachePressure; + + /** Creates an instance of SysctlConfig class. */ + public SysctlConfig() { + } + + /** + * Get the netCoreSomaxconn property: Sysctl setting net.core.somaxconn. + * + * @return the netCoreSomaxconn value. + */ + public Integer netCoreSomaxconn() { + return this.netCoreSomaxconn; + } + + /** + * Set the netCoreSomaxconn property: Sysctl setting net.core.somaxconn. + * + * @param netCoreSomaxconn the netCoreSomaxconn value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreSomaxconn(Integer netCoreSomaxconn) { + this.netCoreSomaxconn = netCoreSomaxconn; + return this; + } + + /** + * Get the netCoreNetdevMaxBacklog property: Sysctl setting net.core.netdev_max_backlog. + * + * @return the netCoreNetdevMaxBacklog value. + */ + public Integer netCoreNetdevMaxBacklog() { + return this.netCoreNetdevMaxBacklog; + } + + /** + * Set the netCoreNetdevMaxBacklog property: Sysctl setting net.core.netdev_max_backlog. + * + * @param netCoreNetdevMaxBacklog the netCoreNetdevMaxBacklog value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreNetdevMaxBacklog(Integer netCoreNetdevMaxBacklog) { + this.netCoreNetdevMaxBacklog = netCoreNetdevMaxBacklog; + return this; + } + + /** + * Get the netCoreRmemDefault property: Sysctl setting net.core.rmem_default. + * + * @return the netCoreRmemDefault value. + */ + public Integer netCoreRmemDefault() { + return this.netCoreRmemDefault; + } + + /** + * Set the netCoreRmemDefault property: Sysctl setting net.core.rmem_default. + * + * @param netCoreRmemDefault the netCoreRmemDefault value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreRmemDefault(Integer netCoreRmemDefault) { + this.netCoreRmemDefault = netCoreRmemDefault; + return this; + } + + /** + * Get the netCoreRmemMax property: Sysctl setting net.core.rmem_max. + * + * @return the netCoreRmemMax value. + */ + public Integer netCoreRmemMax() { + return this.netCoreRmemMax; + } + + /** + * Set the netCoreRmemMax property: Sysctl setting net.core.rmem_max. + * + * @param netCoreRmemMax the netCoreRmemMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreRmemMax(Integer netCoreRmemMax) { + this.netCoreRmemMax = netCoreRmemMax; + return this; + } + + /** + * Get the netCoreWmemDefault property: Sysctl setting net.core.wmem_default. + * + * @return the netCoreWmemDefault value. + */ + public Integer netCoreWmemDefault() { + return this.netCoreWmemDefault; + } + + /** + * Set the netCoreWmemDefault property: Sysctl setting net.core.wmem_default. + * + * @param netCoreWmemDefault the netCoreWmemDefault value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreWmemDefault(Integer netCoreWmemDefault) { + this.netCoreWmemDefault = netCoreWmemDefault; + return this; + } + + /** + * Get the netCoreWmemMax property: Sysctl setting net.core.wmem_max. + * + * @return the netCoreWmemMax value. + */ + public Integer netCoreWmemMax() { + return this.netCoreWmemMax; + } + + /** + * Set the netCoreWmemMax property: Sysctl setting net.core.wmem_max. + * + * @param netCoreWmemMax the netCoreWmemMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreWmemMax(Integer netCoreWmemMax) { + this.netCoreWmemMax = netCoreWmemMax; + return this; + } + + /** + * Get the netCoreOptmemMax property: Sysctl setting net.core.optmem_max. + * + * @return the netCoreOptmemMax value. + */ + public Integer netCoreOptmemMax() { + return this.netCoreOptmemMax; + } + + /** + * Set the netCoreOptmemMax property: Sysctl setting net.core.optmem_max. + * + * @param netCoreOptmemMax the netCoreOptmemMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreOptmemMax(Integer netCoreOptmemMax) { + this.netCoreOptmemMax = netCoreOptmemMax; + return this; + } + + /** + * Get the netIpv4TcpMaxSynBacklog property: Sysctl setting net.ipv4.tcp_max_syn_backlog. + * + * @return the netIpv4TcpMaxSynBacklog value. + */ + public Integer netIpv4TcpMaxSynBacklog() { + return this.netIpv4TcpMaxSynBacklog; + } + + /** + * Set the netIpv4TcpMaxSynBacklog property: Sysctl setting net.ipv4.tcp_max_syn_backlog. + * + * @param netIpv4TcpMaxSynBacklog the netIpv4TcpMaxSynBacklog value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpMaxSynBacklog(Integer netIpv4TcpMaxSynBacklog) { + this.netIpv4TcpMaxSynBacklog = netIpv4TcpMaxSynBacklog; + return this; + } + + /** + * Get the netIpv4TcpMaxTwBuckets property: Sysctl setting net.ipv4.tcp_max_tw_buckets. + * + * @return the netIpv4TcpMaxTwBuckets value. + */ + public Integer netIpv4TcpMaxTwBuckets() { + return this.netIpv4TcpMaxTwBuckets; + } + + /** + * Set the netIpv4TcpMaxTwBuckets property: Sysctl setting net.ipv4.tcp_max_tw_buckets. + * + * @param netIpv4TcpMaxTwBuckets the netIpv4TcpMaxTwBuckets value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpMaxTwBuckets(Integer netIpv4TcpMaxTwBuckets) { + this.netIpv4TcpMaxTwBuckets = netIpv4TcpMaxTwBuckets; + return this; + } + + /** + * Get the netIpv4TcpFinTimeout property: Sysctl setting net.ipv4.tcp_fin_timeout. + * + * @return the netIpv4TcpFinTimeout value. + */ + public Integer netIpv4TcpFinTimeout() { + return this.netIpv4TcpFinTimeout; + } + + /** + * Set the netIpv4TcpFinTimeout property: Sysctl setting net.ipv4.tcp_fin_timeout. + * + * @param netIpv4TcpFinTimeout the netIpv4TcpFinTimeout value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpFinTimeout(Integer netIpv4TcpFinTimeout) { + this.netIpv4TcpFinTimeout = netIpv4TcpFinTimeout; + return this; + } + + /** + * Get the netIpv4TcpKeepaliveTime property: Sysctl setting net.ipv4.tcp_keepalive_time. + * + * @return the netIpv4TcpKeepaliveTime value. + */ + public Integer netIpv4TcpKeepaliveTime() { + return this.netIpv4TcpKeepaliveTime; + } + + /** + * Set the netIpv4TcpKeepaliveTime property: Sysctl setting net.ipv4.tcp_keepalive_time. + * + * @param netIpv4TcpKeepaliveTime the netIpv4TcpKeepaliveTime value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpKeepaliveTime(Integer netIpv4TcpKeepaliveTime) { + this.netIpv4TcpKeepaliveTime = netIpv4TcpKeepaliveTime; + return this; + } + + /** + * Get the netIpv4TcpKeepaliveProbes property: Sysctl setting net.ipv4.tcp_keepalive_probes. + * + * @return the netIpv4TcpKeepaliveProbes value. + */ + public Integer netIpv4TcpKeepaliveProbes() { + return this.netIpv4TcpKeepaliveProbes; + } + + /** + * Set the netIpv4TcpKeepaliveProbes property: Sysctl setting net.ipv4.tcp_keepalive_probes. + * + * @param netIpv4TcpKeepaliveProbes the netIpv4TcpKeepaliveProbes value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpKeepaliveProbes(Integer netIpv4TcpKeepaliveProbes) { + this.netIpv4TcpKeepaliveProbes = netIpv4TcpKeepaliveProbes; + return this; + } + + /** + * Get the netIpv4TcpkeepaliveIntvl property: Sysctl setting net.ipv4.tcp_keepalive_intvl. + * + * @return the netIpv4TcpkeepaliveIntvl value. + */ + public Integer netIpv4TcpkeepaliveIntvl() { + return this.netIpv4TcpkeepaliveIntvl; + } + + /** + * Set the netIpv4TcpkeepaliveIntvl property: Sysctl setting net.ipv4.tcp_keepalive_intvl. + * + * @param netIpv4TcpkeepaliveIntvl the netIpv4TcpkeepaliveIntvl value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpkeepaliveIntvl(Integer netIpv4TcpkeepaliveIntvl) { + this.netIpv4TcpkeepaliveIntvl = netIpv4TcpkeepaliveIntvl; + return this; + } + + /** + * Get the netIpv4TcpTwReuse property: Sysctl setting net.ipv4.tcp_tw_reuse. + * + * @return the netIpv4TcpTwReuse value. + */ + public Boolean netIpv4TcpTwReuse() { + return this.netIpv4TcpTwReuse; + } + + /** + * Set the netIpv4TcpTwReuse property: Sysctl setting net.ipv4.tcp_tw_reuse. + * + * @param netIpv4TcpTwReuse the netIpv4TcpTwReuse value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpTwReuse(Boolean netIpv4TcpTwReuse) { + this.netIpv4TcpTwReuse = netIpv4TcpTwReuse; + return this; + } + + /** + * Get the netIpv4IpLocalPortRange property: Sysctl setting net.ipv4.ip_local_port_range. + * + * @return the netIpv4IpLocalPortRange value. + */ + public String netIpv4IpLocalPortRange() { + return this.netIpv4IpLocalPortRange; + } + + /** + * Set the netIpv4IpLocalPortRange property: Sysctl setting net.ipv4.ip_local_port_range. + * + * @param netIpv4IpLocalPortRange the netIpv4IpLocalPortRange value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4IpLocalPortRange(String netIpv4IpLocalPortRange) { + this.netIpv4IpLocalPortRange = netIpv4IpLocalPortRange; + return this; + } + + /** + * Get the netIpv4NeighDefaultGcThresh1 property: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + * + * @return the netIpv4NeighDefaultGcThresh1 value. + */ + public Integer netIpv4NeighDefaultGcThresh1() { + return this.netIpv4NeighDefaultGcThresh1; + } + + /** + * Set the netIpv4NeighDefaultGcThresh1 property: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + * + * @param netIpv4NeighDefaultGcThresh1 the netIpv4NeighDefaultGcThresh1 value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4NeighDefaultGcThresh1(Integer netIpv4NeighDefaultGcThresh1) { + this.netIpv4NeighDefaultGcThresh1 = netIpv4NeighDefaultGcThresh1; + return this; + } + + /** + * Get the netIpv4NeighDefaultGcThresh2 property: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + * + * @return the netIpv4NeighDefaultGcThresh2 value. + */ + public Integer netIpv4NeighDefaultGcThresh2() { + return this.netIpv4NeighDefaultGcThresh2; + } + + /** + * Set the netIpv4NeighDefaultGcThresh2 property: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + * + * @param netIpv4NeighDefaultGcThresh2 the netIpv4NeighDefaultGcThresh2 value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4NeighDefaultGcThresh2(Integer netIpv4NeighDefaultGcThresh2) { + this.netIpv4NeighDefaultGcThresh2 = netIpv4NeighDefaultGcThresh2; + return this; + } + + /** + * Get the netIpv4NeighDefaultGcThresh3 property: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + * + * @return the netIpv4NeighDefaultGcThresh3 value. + */ + public Integer netIpv4NeighDefaultGcThresh3() { + return this.netIpv4NeighDefaultGcThresh3; + } + + /** + * Set the netIpv4NeighDefaultGcThresh3 property: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + * + * @param netIpv4NeighDefaultGcThresh3 the netIpv4NeighDefaultGcThresh3 value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4NeighDefaultGcThresh3(Integer netIpv4NeighDefaultGcThresh3) { + this.netIpv4NeighDefaultGcThresh3 = netIpv4NeighDefaultGcThresh3; + return this; + } + + /** + * Get the netNetfilterNfConntrackMax property: Sysctl setting net.netfilter.nf_conntrack_max. + * + * @return the netNetfilterNfConntrackMax value. + */ + public Integer netNetfilterNfConntrackMax() { + return this.netNetfilterNfConntrackMax; + } + + /** + * Set the netNetfilterNfConntrackMax property: Sysctl setting net.netfilter.nf_conntrack_max. + * + * @param netNetfilterNfConntrackMax the netNetfilterNfConntrackMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetNetfilterNfConntrackMax(Integer netNetfilterNfConntrackMax) { + this.netNetfilterNfConntrackMax = netNetfilterNfConntrackMax; + return this; + } + + /** + * Get the netNetfilterNfConntrackBuckets property: Sysctl setting net.netfilter.nf_conntrack_buckets. + * + * @return the netNetfilterNfConntrackBuckets value. + */ + public Integer netNetfilterNfConntrackBuckets() { + return this.netNetfilterNfConntrackBuckets; + } + + /** + * Set the netNetfilterNfConntrackBuckets property: Sysctl setting net.netfilter.nf_conntrack_buckets. + * + * @param netNetfilterNfConntrackBuckets the netNetfilterNfConntrackBuckets value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetNetfilterNfConntrackBuckets(Integer netNetfilterNfConntrackBuckets) { + this.netNetfilterNfConntrackBuckets = netNetfilterNfConntrackBuckets; + return this; + } + + /** + * Get the fsInotifyMaxUserWatches property: Sysctl setting fs.inotify.max_user_watches. + * + * @return the fsInotifyMaxUserWatches value. + */ + public Integer fsInotifyMaxUserWatches() { + return this.fsInotifyMaxUserWatches; + } + + /** + * Set the fsInotifyMaxUserWatches property: Sysctl setting fs.inotify.max_user_watches. + * + * @param fsInotifyMaxUserWatches the fsInotifyMaxUserWatches value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withFsInotifyMaxUserWatches(Integer fsInotifyMaxUserWatches) { + this.fsInotifyMaxUserWatches = fsInotifyMaxUserWatches; + return this; + } + + /** + * Get the fsFileMax property: Sysctl setting fs.file-max. + * + * @return the fsFileMax value. + */ + public Integer fsFileMax() { + return this.fsFileMax; + } + + /** + * Set the fsFileMax property: Sysctl setting fs.file-max. + * + * @param fsFileMax the fsFileMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withFsFileMax(Integer fsFileMax) { + this.fsFileMax = fsFileMax; + return this; + } + + /** + * Get the fsAioMaxNr property: Sysctl setting fs.aio-max-nr. + * + * @return the fsAioMaxNr value. + */ + public Integer fsAioMaxNr() { + return this.fsAioMaxNr; + } + + /** + * Set the fsAioMaxNr property: Sysctl setting fs.aio-max-nr. + * + * @param fsAioMaxNr the fsAioMaxNr value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withFsAioMaxNr(Integer fsAioMaxNr) { + this.fsAioMaxNr = fsAioMaxNr; + return this; + } + + /** + * Get the fsNrOpen property: Sysctl setting fs.nr_open. + * + * @return the fsNrOpen value. + */ + public Integer fsNrOpen() { + return this.fsNrOpen; + } + + /** + * Set the fsNrOpen property: Sysctl setting fs.nr_open. + * + * @param fsNrOpen the fsNrOpen value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withFsNrOpen(Integer fsNrOpen) { + this.fsNrOpen = fsNrOpen; + return this; + } + + /** + * Get the kernelThreadsMax property: Sysctl setting kernel.threads-max. + * + * @return the kernelThreadsMax value. + */ + public Integer kernelThreadsMax() { + return this.kernelThreadsMax; + } + + /** + * Set the kernelThreadsMax property: Sysctl setting kernel.threads-max. + * + * @param kernelThreadsMax the kernelThreadsMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withKernelThreadsMax(Integer kernelThreadsMax) { + this.kernelThreadsMax = kernelThreadsMax; + return this; + } + + /** + * Get the vmMaxMapCount property: Sysctl setting vm.max_map_count. + * + * @return the vmMaxMapCount value. + */ + public Integer vmMaxMapCount() { + return this.vmMaxMapCount; + } + + /** + * Set the vmMaxMapCount property: Sysctl setting vm.max_map_count. + * + * @param vmMaxMapCount the vmMaxMapCount value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withVmMaxMapCount(Integer vmMaxMapCount) { + this.vmMaxMapCount = vmMaxMapCount; + return this; + } + + /** + * Get the vmSwappiness property: Sysctl setting vm.swappiness. + * + * @return the vmSwappiness value. + */ + public Integer vmSwappiness() { + return this.vmSwappiness; + } + + /** + * Set the vmSwappiness property: Sysctl setting vm.swappiness. + * + * @param vmSwappiness the vmSwappiness value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withVmSwappiness(Integer vmSwappiness) { + this.vmSwappiness = vmSwappiness; + return this; + } + + /** + * Get the vmVfsCachePressure property: Sysctl setting vm.vfs_cache_pressure. + * + * @return the vmVfsCachePressure value. + */ + public Integer vmVfsCachePressure() { + return this.vmVfsCachePressure; + } + + /** + * Set the vmVfsCachePressure property: Sysctl setting vm.vfs_cache_pressure. + * + * @param vmVfsCachePressure the vmVfsCachePressure value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withVmVfsCachePressure(Integer vmVfsCachePressure) { + this.vmVfsCachePressure = vmVfsCachePressure; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TagsObject.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TagsObject.java new file mode 100644 index 0000000000000..390b554dca4a8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TagsObject.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Tags object for patch operations. */ +@Fluent +public final class TagsObject { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of TagsObject class. */ + public TagsObject() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the TagsObject object itself. + */ + public TagsObject withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeInWeek.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeInWeek.java new file mode 100644 index 0000000000000..d3939ef36e816 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeInWeek.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Time in a week. */ +@Fluent +public final class TimeInWeek { + /* + * The day of the week. + */ + @JsonProperty(value = "day") + private WeekDay day; + + /* + * A list of hours in the day used to identify a time range. + * + * Each integer hour represents a time range beginning at 0m after the hour ending at the next hour + * (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - + * 02:00 UTC time range. + */ + @JsonProperty(value = "hourSlots") + private List hourSlots; + + /** Creates an instance of TimeInWeek class. */ + public TimeInWeek() { + } + + /** + * Get the day property: The day of the week. + * + * @return the day value. + */ + public WeekDay day() { + return this.day; + } + + /** + * Set the day property: The day of the week. + * + * @param day the day value to set. + * @return the TimeInWeek object itself. + */ + public TimeInWeek withDay(WeekDay day) { + this.day = day; + return this; + } + + /** + * Get the hourSlots property: A list of hours in the day used to identify a time range. + * + *

Each integer hour represents a time range beginning at 0m after the hour ending at the next hour + * (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - + * 02:00 UTC time range. + * + * @return the hourSlots value. + */ + public List hourSlots() { + return this.hourSlots; + } + + /** + * Set the hourSlots property: A list of hours in the day used to identify a time range. + * + *

Each integer hour represents a time range beginning at 0m after the hour ending at the next hour + * (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - + * 02:00 UTC time range. + * + * @param hourSlots the hourSlots value to set. + * @return the TimeInWeek object itself. + */ + public TimeInWeek withHourSlots(List hourSlots) { + this.hourSlots = hourSlots; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeSpan.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeSpan.java new file mode 100644 index 0000000000000..4a61978571ef9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeSpan.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * A time range. + * + *

For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + */ +@Fluent +public final class TimeSpan { + /* + * The start of a time span + */ + @JsonProperty(value = "start") + private OffsetDateTime start; + + /* + * The end of a time span + */ + @JsonProperty(value = "end") + private OffsetDateTime end; + + /** Creates an instance of TimeSpan class. */ + public TimeSpan() { + } + + /** + * Get the start property: The start of a time span. + * + * @return the start value. + */ + public OffsetDateTime start() { + return this.start; + } + + /** + * Set the start property: The start of a time span. + * + * @param start the start value to set. + * @return the TimeSpan object itself. + */ + public TimeSpan withStart(OffsetDateTime start) { + this.start = start; + return this; + } + + /** + * Get the end property: The end of a time span. + * + * @return the end value. + */ + public OffsetDateTime end() { + return this.end; + } + + /** + * Set the end property: The end of a time span. + * + * @param end the end value to set. + * @return the TimeSpan object itself. + */ + public TimeSpan withEnd(OffsetDateTime end) { + this.end = end; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRole.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRole.java new file mode 100644 index 0000000000000..797009b269b38 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRole.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import java.util.List; + +/** An immutable client-side representation of TrustedAccessRole. */ +public interface TrustedAccessRole { + /** + * Gets the sourceResourceType property: Resource type of Azure resource. + * + * @return the sourceResourceType value. + */ + String sourceResourceType(); + + /** + * Gets the name property: Name of role, name is unique under a source resource type. + * + * @return the name value. + */ + String name(); + + /** + * Gets the rules property: List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster + * Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). + * + * @return the rules value. + */ + List rules(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner + * object. + * + * @return the inner object. + */ + TrustedAccessRoleInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBinding.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBinding.java new file mode 100644 index 0000000000000..f855ce861a7fb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBinding.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import java.util.List; + +/** An immutable client-side representation of TrustedAccessRoleBinding. */ +public interface TrustedAccessRoleBinding { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The current provisioning state of trusted access role binding. + * + * @return the provisioningState value. + */ + TrustedAccessRoleBindingProvisioningState provisioningState(); + + /** + * Gets the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @return the sourceResourceId value. + */ + String sourceResourceId(); + + /** + * Gets the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @return the roles value. + */ + List roles(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner + * object. + * + * @return the inner object. + */ + TrustedAccessRoleBindingInner innerModel(); + + /** The entirety of the TrustedAccessRoleBinding definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithSourceResourceId, + DefinitionStages.WithRoles, + DefinitionStages.WithCreate { + } + + /** The TrustedAccessRoleBinding definition stages. */ + interface DefinitionStages { + /** The first stage of the TrustedAccessRoleBinding definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the TrustedAccessRoleBinding definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @return the next definition stage. + */ + WithSourceResourceId withExistingManagedCluster(String resourceGroupName, String resourceName); + } + + /** The stage of the TrustedAccessRoleBinding definition allowing to specify sourceResourceId. */ + interface WithSourceResourceId { + /** + * Specifies the sourceResourceId property: The ARM resource ID of source resource that trusted access is + * configured for.. + * + * @param sourceResourceId The ARM resource ID of source resource that trusted access is configured for. + * @return the next definition stage. + */ + WithRoles withSourceResourceId(String sourceResourceId); + } + + /** The stage of the TrustedAccessRoleBinding definition allowing to specify roles. */ + interface WithRoles { + /** + * Specifies the roles property: A list of roles to bind, each item is a resource type qualified role name. + * For example: 'Microsoft.MachineLearningServices/workspaces/reader'.. + * + * @param roles A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * @return the next definition stage. + */ + WithCreate withRoles(List roles); + } + + /** + * The stage of the TrustedAccessRoleBinding definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate { + /** + * Executes the create request. + * + * @return the created resource. + */ + TrustedAccessRoleBinding create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + TrustedAccessRoleBinding create(Context context); + } + } + + /** + * Begins update for the TrustedAccessRoleBinding resource. + * + * @return the stage of resource update. + */ + TrustedAccessRoleBinding.Update update(); + + /** The template for TrustedAccessRoleBinding update. */ + interface Update extends UpdateStages.WithSourceResourceId, UpdateStages.WithRoles { + /** + * Executes the update request. + * + * @return the updated resource. + */ + TrustedAccessRoleBinding apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + TrustedAccessRoleBinding apply(Context context); + } + + /** The TrustedAccessRoleBinding update stages. */ + interface UpdateStages { + /** The stage of the TrustedAccessRoleBinding update allowing to specify sourceResourceId. */ + interface WithSourceResourceId { + /** + * Specifies the sourceResourceId property: The ARM resource ID of source resource that trusted access is + * configured for.. + * + * @param sourceResourceId The ARM resource ID of source resource that trusted access is configured for. + * @return the next definition stage. + */ + Update withSourceResourceId(String sourceResourceId); + } + + /** The stage of the TrustedAccessRoleBinding update allowing to specify roles. */ + interface WithRoles { + /** + * Specifies the roles property: A list of roles to bind, each item is a resource type qualified role name. + * For example: 'Microsoft.MachineLearningServices/workspaces/reader'.. + * + * @param roles A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * @return the next definition stage. + */ + Update withRoles(List roles); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + TrustedAccessRoleBinding refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + TrustedAccessRoleBinding refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingListResult.java new file mode 100644 index 0000000000000..2ff9e74f7bae1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of trusted access role bindings. */ +@Fluent +public final class TrustedAccessRoleBindingListResult { + /* + * Role binding list + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of TrustedAccessRoleBindingListResult class. */ + public TrustedAccessRoleBindingListResult() { + } + + /** + * Get the value property: Role binding list. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Role binding list. + * + * @param value the value value to set. + * @return the TrustedAccessRoleBindingListResult object itself. + */ + public TrustedAccessRoleBindingListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingProvisioningState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingProvisioningState.java new file mode 100644 index 0000000000000..f7f73b09e6985 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingProvisioningState.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The current provisioning state of trusted access role binding. */ +public final class TrustedAccessRoleBindingProvisioningState + extends ExpandableStringEnum { + /** Static value Canceled for TrustedAccessRoleBindingProvisioningState. */ + public static final TrustedAccessRoleBindingProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Deleting for TrustedAccessRoleBindingProvisioningState. */ + public static final TrustedAccessRoleBindingProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for TrustedAccessRoleBindingProvisioningState. */ + public static final TrustedAccessRoleBindingProvisioningState FAILED = fromString("Failed"); + + /** Static value Succeeded for TrustedAccessRoleBindingProvisioningState. */ + public static final TrustedAccessRoleBindingProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Updating for TrustedAccessRoleBindingProvisioningState. */ + public static final TrustedAccessRoleBindingProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of TrustedAccessRoleBindingProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TrustedAccessRoleBindingProvisioningState() { + } + + /** + * Creates or finds a TrustedAccessRoleBindingProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrustedAccessRoleBindingProvisioningState. + */ + @JsonCreator + public static TrustedAccessRoleBindingProvisioningState fromString(String name) { + return fromString(name, TrustedAccessRoleBindingProvisioningState.class); + } + + /** + * Gets known TrustedAccessRoleBindingProvisioningState values. + * + * @return known TrustedAccessRoleBindingProvisioningState values. + */ + public static Collection values() { + return values(TrustedAccessRoleBindingProvisioningState.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindings.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindings.java new file mode 100644 index 0000000000000..bad00b4c9d443 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindings.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of TrustedAccessRoleBindings. */ +public interface TrustedAccessRoleBindings { + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding. + */ + TrustedAccessRoleBinding get(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); + + /** + * Get a trusted access role binding. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response}. + */ + TrustedAccessRoleBinding getById(String id); + + /** + * Get a trusted access role binding. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a trusted access role binding. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a trusted access role binding. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new TrustedAccessRoleBinding resource. + * + * @param name resource name. + * @return the first stage of the new TrustedAccessRoleBinding definition. + */ + TrustedAccessRoleBinding.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleListResult.java new file mode 100644 index 0000000000000..ab795680cb994 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleListResult.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of trusted access roles. */ +@Immutable +public final class TrustedAccessRoleListResult { + /* + * Role list + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of TrustedAccessRoleListResult class. */ + public TrustedAccessRoleListResult() { + } + + /** + * Get the value property: Role list. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleRule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleRule.java new file mode 100644 index 0000000000000..7e399a2fabe9d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleRule.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Rule for trusted access role. */ +@Immutable +public final class TrustedAccessRoleRule { + /* + * List of allowed verbs + */ + @JsonProperty(value = "verbs", access = JsonProperty.Access.WRITE_ONLY) + private List verbs; + + /* + * List of allowed apiGroups + */ + @JsonProperty(value = "apiGroups", access = JsonProperty.Access.WRITE_ONLY) + private List apiGroups; + + /* + * List of allowed resources + */ + @JsonProperty(value = "resources", access = JsonProperty.Access.WRITE_ONLY) + private List resources; + + /* + * List of allowed names + */ + @JsonProperty(value = "resourceNames", access = JsonProperty.Access.WRITE_ONLY) + private List resourceNames; + + /* + * List of allowed nonResourceURLs + */ + @JsonProperty(value = "nonResourceURLs", access = JsonProperty.Access.WRITE_ONLY) + private List nonResourceUrls; + + /** Creates an instance of TrustedAccessRoleRule class. */ + public TrustedAccessRoleRule() { + } + + /** + * Get the verbs property: List of allowed verbs. + * + * @return the verbs value. + */ + public List verbs() { + return this.verbs; + } + + /** + * Get the apiGroups property: List of allowed apiGroups. + * + * @return the apiGroups value. + */ + public List apiGroups() { + return this.apiGroups; + } + + /** + * Get the resources property: List of allowed resources. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Get the resourceNames property: List of allowed names. + * + * @return the resourceNames value. + */ + public List resourceNames() { + return this.resourceNames; + } + + /** + * Get the nonResourceUrls property: List of allowed nonResourceURLs. + * + * @return the nonResourceUrls value. + */ + public List nonResourceUrls() { + return this.nonResourceUrls; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoles.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoles.java new file mode 100644 index 0000000000000..7390825b2b02a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoles.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of TrustedAccessRoles. */ +public interface TrustedAccessRoles { + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of trusted access roles as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Type.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Type.java new file mode 100644 index 0000000000000..74ab63e2be441 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Type.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The week index. + * + *

Specifies on which week of the month the dayOfWeek applies. + */ +public final class Type extends ExpandableStringEnum { + /** Static value First for Type. */ + public static final Type FIRST = fromString("First"); + + /** Static value Second for Type. */ + public static final Type SECOND = fromString("Second"); + + /** Static value Third for Type. */ + public static final Type THIRD = fromString("Third"); + + /** Static value Fourth for Type. */ + public static final Type FOURTH = fromString("Fourth"); + + /** Static value Last for Type. */ + public static final Type LAST = fromString("Last"); + + /** + * Creates a new instance of Type value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Type() { + } + + /** + * Creates or finds a Type from its string representation. + * + * @param name a name to look for. + * @return the corresponding Type. + */ + @JsonCreator + public static Type fromString(String name) { + return fromString(name, Type.class); + } + + /** + * Gets known Type values. + * + * @return known Type values. + */ + public static Collection values() { + return values(Type.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeChannel.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeChannel.java new file mode 100644 index 0000000000000..e20684644202a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeChannel.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The upgrade channel for auto upgrade. The default is 'none'. + * + *

For more information see [setting the AKS cluster auto-upgrade + * channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + */ +public final class UpgradeChannel extends ExpandableStringEnum { + /** Static value rapid for UpgradeChannel. */ + public static final UpgradeChannel RAPID = fromString("rapid"); + + /** Static value stable for UpgradeChannel. */ + public static final UpgradeChannel STABLE = fromString("stable"); + + /** Static value patch for UpgradeChannel. */ + public static final UpgradeChannel PATCH = fromString("patch"); + + /** Static value node-image for UpgradeChannel. */ + public static final UpgradeChannel NODE_IMAGE = fromString("node-image"); + + /** Static value none for UpgradeChannel. */ + public static final UpgradeChannel NONE = fromString("none"); + + /** + * Creates a new instance of UpgradeChannel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpgradeChannel() { + } + + /** + * Creates or finds a UpgradeChannel from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpgradeChannel. + */ + @JsonCreator + public static UpgradeChannel fromString(String name) { + return fromString(name, UpgradeChannel.class); + } + + /** + * Gets known UpgradeChannel values. + * + * @return known UpgradeChannel values. + */ + public static Collection values() { + return values(UpgradeChannel.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeOverrideSettings.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeOverrideSettings.java new file mode 100644 index 0000000000000..6cc18ae77d74a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeOverrideSettings.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Settings for overrides when upgrading a cluster. */ +@Fluent +public final class UpgradeOverrideSettings { + /* + * Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade + * protections such as checking for deprecated API usage. Enable this option only with caution. + */ + @JsonProperty(value = "forceUpgrade") + private Boolean forceUpgrade; + + /* + * Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the + * effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is + * not set by default. It must be set for the overrides to take effect. + */ + @JsonProperty(value = "until") + private OffsetDateTime until; + + /** Creates an instance of UpgradeOverrideSettings class. */ + public UpgradeOverrideSettings() { + } + + /** + * Get the forceUpgrade property: Whether to force upgrade the cluster. Note that this option instructs upgrade + * operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with + * caution. + * + * @return the forceUpgrade value. + */ + public Boolean forceUpgrade() { + return this.forceUpgrade; + } + + /** + * Set the forceUpgrade property: Whether to force upgrade the cluster. Note that this option instructs upgrade + * operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with + * caution. + * + * @param forceUpgrade the forceUpgrade value to set. + * @return the UpgradeOverrideSettings object itself. + */ + public UpgradeOverrideSettings withForceUpgrade(Boolean forceUpgrade) { + this.forceUpgrade = forceUpgrade; + return this; + } + + /** + * Get the until property: Until when the overrides are effective. Note that this only matches the start time of an + * upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade + * proceeds. This field is not set by default. It must be set for the overrides to take effect. + * + * @return the until value. + */ + public OffsetDateTime until() { + return this.until; + } + + /** + * Set the until property: Until when the overrides are effective. Note that this only matches the start time of an + * upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade + * proceeds. This field is not set by default. It must be set for the overrides to take effect. + * + * @param until the until value to set. + * @return the UpgradeOverrideSettings object itself. + */ + public UpgradeOverrideSettings withUntil(OffsetDateTime until) { + this.until = until; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UserAssignedIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UserAssignedIdentity.java new file mode 100644 index 0000000000000..61c9eba8c0e0b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UserAssignedIdentity.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details about a user assigned identity. */ +@Fluent +public class UserAssignedIdentity { + /* + * The resource ID of the user assigned identity. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * The client ID of the user assigned identity. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The object ID of the user assigned identity. + */ + @JsonProperty(value = "objectId") + private String objectId; + + /** Creates an instance of UserAssignedIdentity class. */ + public UserAssignedIdentity() { + } + + /** + * Get the resourceId property: The resource ID of the user assigned identity. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resource ID of the user assigned identity. + * + * @param resourceId the resourceId value to set. + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the clientId property: The client ID of the user assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The client ID of the user assigned identity. + * + * @param clientId the clientId value to set. + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the objectId property: The object ID of the user assigned identity. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Set the objectId property: The object ID of the user assigned identity. + * + * @param objectId the objectId value to set. + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withObjectId(String objectId) { + this.objectId = objectId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeekDay.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeekDay.java new file mode 100644 index 0000000000000..0a0b94c4b50ef --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeekDay.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The weekday enum. */ +public final class WeekDay extends ExpandableStringEnum { + /** Static value Sunday for WeekDay. */ + public static final WeekDay SUNDAY = fromString("Sunday"); + + /** Static value Monday for WeekDay. */ + public static final WeekDay MONDAY = fromString("Monday"); + + /** Static value Tuesday for WeekDay. */ + public static final WeekDay TUESDAY = fromString("Tuesday"); + + /** Static value Wednesday for WeekDay. */ + public static final WeekDay WEDNESDAY = fromString("Wednesday"); + + /** Static value Thursday for WeekDay. */ + public static final WeekDay THURSDAY = fromString("Thursday"); + + /** Static value Friday for WeekDay. */ + public static final WeekDay FRIDAY = fromString("Friday"); + + /** Static value Saturday for WeekDay. */ + public static final WeekDay SATURDAY = fromString("Saturday"); + + /** + * Creates a new instance of WeekDay value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WeekDay() { + } + + /** + * Creates or finds a WeekDay from its string representation. + * + * @param name a name to look for. + * @return the corresponding WeekDay. + */ + @JsonCreator + public static WeekDay fromString(String name) { + return fromString(name, WeekDay.class); + } + + /** + * Gets known WeekDay values. + * + * @return known WeekDay values. + */ + public static Collection values() { + return values(WeekDay.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeeklySchedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeeklySchedule.java new file mode 100644 index 0000000000000..7677657db6157 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeeklySchedule.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. */ +@Fluent +public final class WeeklySchedule { + /* + * Specifies the number of weeks between each set of occurrences. + */ + @JsonProperty(value = "intervalWeeks", required = true) + private int intervalWeeks; + + /* + * Specifies on which day of the week the maintenance occurs. + */ + @JsonProperty(value = "dayOfWeek", required = true) + private WeekDay dayOfWeek; + + /** Creates an instance of WeeklySchedule class. */ + public WeeklySchedule() { + } + + /** + * Get the intervalWeeks property: Specifies the number of weeks between each set of occurrences. + * + * @return the intervalWeeks value. + */ + public int intervalWeeks() { + return this.intervalWeeks; + } + + /** + * Set the intervalWeeks property: Specifies the number of weeks between each set of occurrences. + * + * @param intervalWeeks the intervalWeeks value to set. + * @return the WeeklySchedule object itself. + */ + public WeeklySchedule withIntervalWeeks(int intervalWeeks) { + this.intervalWeeks = intervalWeeks; + return this; + } + + /** + * Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs. + * + * @return the dayOfWeek value. + */ + public WeekDay dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the WeeklySchedule object itself. + */ + public WeeklySchedule withDayOfWeek(WeekDay dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dayOfWeek() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property dayOfWeek in model WeeklySchedule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WeeklySchedule.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WindowsGmsaProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WindowsGmsaProfile.java new file mode 100644 index 0000000000000..f83abe0b8e9ff --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WindowsGmsaProfile.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Windows gMSA Profile in the managed cluster. */ +@Fluent +public final class WindowsGmsaProfile { + /* + * Whether to enable Windows gMSA. + * + * Specifies whether to enable Windows gMSA in the managed cluster. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Specifies the DNS server for Windows gMSA.

Set it to empty if you have configured the DNS server in the + * vnet which is used to create the managed cluster. + */ + @JsonProperty(value = "dnsServer") + private String dnsServer; + + /* + * Specifies the root domain name for Windows gMSA.

Set it to empty if you have configured the DNS server + * in the vnet which is used to create the managed cluster. + */ + @JsonProperty(value = "rootDomainName") + private String rootDomainName; + + /** Creates an instance of WindowsGmsaProfile class. */ + public WindowsGmsaProfile() { + } + + /** + * Get the enabled property: Whether to enable Windows gMSA. + * + *

Specifies whether to enable Windows gMSA in the managed cluster. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Windows gMSA. + * + *

Specifies whether to enable Windows gMSA in the managed cluster. + * + * @param enabled the enabled value to set. + * @return the WindowsGmsaProfile object itself. + */ + public WindowsGmsaProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the dnsServer property: Specifies the DNS server for Windows gMSA. <br><br> Set it to empty if + * you have configured the DNS server in the vnet which is used to create the managed cluster. + * + * @return the dnsServer value. + */ + public String dnsServer() { + return this.dnsServer; + } + + /** + * Set the dnsServer property: Specifies the DNS server for Windows gMSA. <br><br> Set it to empty if + * you have configured the DNS server in the vnet which is used to create the managed cluster. + * + * @param dnsServer the dnsServer value to set. + * @return the WindowsGmsaProfile object itself. + */ + public WindowsGmsaProfile withDnsServer(String dnsServer) { + this.dnsServer = dnsServer; + return this; + } + + /** + * Get the rootDomainName property: Specifies the root domain name for Windows gMSA. <br><br> Set it to + * empty if you have configured the DNS server in the vnet which is used to create the managed cluster. + * + * @return the rootDomainName value. + */ + public String rootDomainName() { + return this.rootDomainName; + } + + /** + * Set the rootDomainName property: Specifies the root domain name for Windows gMSA. <br><br> Set it to + * empty if you have configured the DNS server in the vnet which is used to create the managed cluster. + * + * @param rootDomainName the rootDomainName value to set. + * @return the WindowsGmsaProfile object itself. + */ + public WindowsGmsaProfile withRootDomainName(String rootDomainName) { + this.rootDomainName = rootDomainName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WorkloadRuntime.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WorkloadRuntime.java new file mode 100644 index 0000000000000..c18652832f78d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WorkloadRuntime.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Determines the type of workload a node can run. */ +public final class WorkloadRuntime extends ExpandableStringEnum { + /** Static value OCIContainer for WorkloadRuntime. */ + public static final WorkloadRuntime OCICONTAINER = fromString("OCIContainer"); + + /** Static value WasmWasi for WorkloadRuntime. */ + public static final WorkloadRuntime WASM_WASI = fromString("WasmWasi"); + + /** + * Creates a new instance of WorkloadRuntime value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkloadRuntime() { + } + + /** + * Creates or finds a WorkloadRuntime from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkloadRuntime. + */ + @JsonCreator + public static WorkloadRuntime fromString(String name) { + return fromString(name, WorkloadRuntime.class); + } + + /** + * Gets known WorkloadRuntime values. + * + * @return known WorkloadRuntime values. + */ + public static Collection values() { + return values(WorkloadRuntime.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/package-info.java new file mode 100644 index 0000000000000..e55a08a55815f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for ContainerServiceManagementClient. Container Service Client. */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/package-info.java new file mode 100644 index 0000000000000..4f49e305ae5dc --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for ContainerServiceManagementClient. Container Service Client. */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/module-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/module-info.java new file mode 100644 index 0000000000000..2c7b780e4a6e6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/module-info.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated; + exports com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + exports com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + exports com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + + opens com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models to + com.azure.core, + com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models to + com.azure.core, + com.fasterxml.jackson.databind; +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/proxy-config.json b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/proxy-config.json new file mode 100644 index 0000000000000..9ecc9efc0e82c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ContainerServicesClientImpl$ContainerServicesService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ManagedClustersClientImpl$ManagedClustersService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.AgentPoolsClientImpl$AgentPoolsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService" ] ] \ No newline at end of file diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/reflect-config.json b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/reflect-config.json new file mode 100644 index 0000000000000..a3b3b2466c4ce --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/reflect-config.json @@ -0,0 +1,1006 @@ +[ { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PurchasePlan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterIdentityProvider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterBaseIdentityProvider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionPropertyList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersionCapabilities", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesPatchVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ExtendedLocation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.DelegatedResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedServiceIdentityUserAssignedIdentitiesValue", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAgentPoolProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SysctlConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceSshConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceSshPublicKey", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WindowsGmsaProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfileIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UserAssignedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProvisioningInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProvisioningError", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProvisioningErrorBody", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityException", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterOidcIssuerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileOutboundIpPrefixes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileOutboundIPs", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNatGatewayProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterManagedOutboundIpProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAutoUpgradeProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UpgradeOverrideSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefender", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AzureKeyVaultKms", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileWorkloadIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileImageCleaner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfileDiskCsiDriver", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfileFileCsiDriver", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfileSnapshotController", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfileBlobCsiDriver", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfileKeda", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileKubeStateMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioServiceMesh", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioComponents", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGateway", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioEgressGateway", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioCertificateAuthority", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioPluginCertificateAuthority", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfileUpgradesItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AccessProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfigurationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Schedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.DailySchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WeeklySchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AbsoluteMonthlySchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RelativeMonthlySchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.DateSpan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CommandResultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundEnvironmentEndpointCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EndpointDependency", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EndpointDetail", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevision", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CompatibleVersions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAadIdentityProvider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClustersGetCommandResultHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftContainerServiceVMSize", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftAgentPoolProfileRole", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuTier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ExtendedLocationTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Code", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletDiskType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LicenseType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkPlugin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkPluginMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkDataplane", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LoadBalancerSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IpFamily", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UpgradeChannel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NodeOSUpgradeChannel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Expander", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KeyVaultNetworkAccessTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PublicNetworkAccess", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGatewayMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WeekDay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Type", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ConnectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsAbor.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsAbor.java new file mode 100644 index 0000000000000..557a263fb1cc0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsAbor.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for AgentPools AbortLatestOperation. */ +public final class AgentPoolsAbor { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsAbortOperation.json + */ + /** + * Sample code: Abort operation on agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void abortOperationOnAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .abortLatestOperation("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsCrea.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsCrea.java new file mode 100644 index 0000000000000..e862f2d76ea57 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsCrea.java @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPool; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Code; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SysctlConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for AgentPools CreateOrUpdate. */ +public final class AgentPoolsCrea { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_EnableFIPS.json + */ + /** + * Sample code: Create Agent Pool with FIPS enabled OS. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithFIPSEnabledOS( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableFips(true) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_GPUMIG.json + */ + /** + * Sample code: Create Agent Pool with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithGPUMIG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_ND96asr_v4") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withKubeletConfig( + new KubeletConfig() + .withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig( + new LinuxOSConfig() + .withSysctls( + new SysctlConfig() + .withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)) + .withGpuInstanceProfile(GpuInstanceProfile.MIG2G) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_WindowsOSSKU.json + */ + /** + * Sample code: Create Agent Pool with Windows OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithWindowsOSSKU( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("wnp2") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_D4s_v3") + .withOsType(OSType.WINDOWS) + .withOsSku(Ossku.WINDOWS2022) + .withOrchestratorVersion("1.23.3") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_DedicatedHostGroup.json + */ + /** + * Sample code: Create Agent Pool with Dedicated Host Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithDedicatedHostGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_Update.json + */ + /** + * Sample code: Create/Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withTags(mapOf("name1", "val1")) + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPools_Start.json + */ + /** + * Sample code: Start Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void startAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withPowerState(new PowerState().withCode(Code.RUNNING)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_Spot.json + */ + /** + * Sample code: Create Spot Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createSpotAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withTags(mapOf("name1", "val1")) + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_Ephemeral.json + */ + /** + * Sample code: Create Agent Pool with Ephemeral OS Disk. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithEphemeralOSDisk( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsDiskSizeGB(64) + .withOsDiskType(OSDiskType.EPHEMERAL) + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json + */ + /** + * Sample code: Create Agent Pool with EncryptionAtHost enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithEncryptionAtHostEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableEncryptionAtHost(true) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_EnableUltraSSD.json + */ + /** + * Sample code: Create Agent Pool with UltraSSD enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithUltraSSDEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableUltraSsd(true) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_WasmWasi.json + */ + /** + * Sample code: Create Agent Pool with Krustlet and the WASI runtime. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithKrustletAndTheWASIRuntime( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsDiskSizeGB(64) + .withWorkloadRuntime(WorkloadRuntime.WASM_WASI) + .withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER) + .withOrchestratorVersion("") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_Snapshot.json + */ + /** + * Sample code: Create Agent Pool using an agent pool snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolUsingAnAgentPoolSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableFips(true) + .withCreationData( + new CreationData() + .withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_PPG.json + */ + /** + * Sample code: Create Agent Pool with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithPPG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_CustomNodeConfig.json + */ + /** + * Sample code: Create Agent Pool with KubeletConfig and LinuxOSConfig. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithKubeletConfigAndLinuxOSConfig( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withKubeletConfig( + new KubeletConfig() + .withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig( + new LinuxOSConfig() + .withSysctls( + new SysctlConfig() + .withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPools_Stop.json + */ + /** + * Sample code: Stop Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withPowerState(new PowerState().withCode(Code.STOPPED)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsCreate_OSSKU.json + */ + /** + * Sample code: Create Agent Pool with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithOSSKU( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .define("agentpool1") + .withExistingManagedCluster("rg1", "clustername1") + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOsSku(Ossku.AZURE_LINUX) + .withOrchestratorVersion("") + .withKubeletConfig( + new KubeletConfig() + .withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig( + new LinuxOSConfig() + .withSysctls( + new SysctlConfig() + .withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPools_Update.json + */ + /** + * Sample code: Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + AgentPool resource = + manager + .agentPools() + .getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withMaxCount(2) + .withMinCount(2) + .withEnableAutoScaling(true) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsDele.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsDele.java new file mode 100644 index 0000000000000..ada79ade4c9ae --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsDele.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for AgentPools Delete. */ +public final class AgentPoolsDele { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsDelete.json + */ + /** + * Sample code: Delete Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.agentPools().delete("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetA.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetA.java new file mode 100644 index 0000000000000..34d67bdc5d3a7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetA.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for AgentPools GetAvailableAgentPoolVersions. */ +public final class AgentPoolsGetA { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json + */ + /** + * Sample code: Get available versions for agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAvailableVersionsForAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .getAvailableAgentPoolVersionsWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetS.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetS.java new file mode 100644 index 0000000000000..c71cea6b534f6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetS.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for AgentPools Get. */ +public final class AgentPoolsGetS { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsGet.json + */ + /** + * Sample code: Get Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.agentPools().getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetU.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetU.java new file mode 100644 index 0000000000000..cb8f6b1c46ee6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetU.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for AgentPools GetUpgradeProfile. */ +public final class AgentPoolsGetU { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsGetUpgradeProfile.json + */ + /** + * Sample code: Get Upgrade Profile for Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getUpgradeProfileForAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .getUpgradeProfileWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsList.java new file mode 100644 index 0000000000000..2d38a6b9d47a2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsList.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for AgentPools List. */ +public final class AgentPoolsList { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsList.json + */ + /** + * Sample code: List Agent Pools by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listAgentPoolsByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.agentPools().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsUpgr.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsUpgr.java new file mode 100644 index 0000000000000..19d01bf2e5015 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsUpgr.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for AgentPools UpgradeNodeImageVersion. */ +public final class AgentPoolsUpgr { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/AgentPoolsUpgradeNodeImageVersion.json + */ + /** + * Sample code: Upgrade Agent Pool Node Image Version. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void upgradeAgentPoolNodeImageVersion( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .agentPools() + .upgradeNodeImageVersion("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ContainerServi.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ContainerServi.java new file mode 100644 index 0000000000000..bdf3876c53d3b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ContainerServi.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for ContainerServices ListOrchestrators. */ +public final class ContainerServi { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-08-01/examples/ContainerServiceListOrchestrators.json + */ + /** + * Sample code: List Container Service Orchestrators. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listContainerServiceOrchestrators( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.containerServices().listOrchestratorsWithResponse("location1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MaintenanceCon.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MaintenanceCon.java new file mode 100644 index 0000000000000..bc42ae769a84d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MaintenanceCon.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for MaintenanceConfigurations ListByManagedCluster. */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json + */ + /** + * Sample code: List maintenance configurations configured with maintenance window by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsList.json + */ + /** + * Sample code: List maintenance configurations by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceConfigurationsByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +ger + .maintenanceConfigurations() + .define("default") + .withExistingManagedCluster("rg1", "clustername1") + .withTimeInWeek(Arrays.asList(new TimeInWeek().withDay(WeekDay.MONDAY).withHourSlots(Arrays.asList(1, 2)))) + .withNotAllowedTime( + Arrays + .asList( + new TimeSpan() + .withStart(OffsetDateTime.parse("2020-11-26T03:00:00Z")) + .withEnd(OffsetDateTime.parse("2020-11-30T12:00:00Z")))) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + */ + /** + * Sample code: Create/Update Maintenance Configuration with Maintenance Window. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateMaintenanceConfigurationWithMaintenanceWindow( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .maintenanceConfigurations() + .define("aksManagedAutoUpgradeSchedule") + .withExistingManagedCluster("rg1", "clustername1") + .withMaintenanceWindow( + new MaintenanceWindow() + .withSchedule( + new Schedule() + .withRelativeMonthly( + new RelativeMonthlySchedule() + .withIntervalMonths(3) + .withWeekIndex(Type.FIRST) + .withDayOfWeek(WeekDay.MONDAY))) + .withDurationHours(10) + .withUtcOffset("+05:30") + .withStartDate(LocalDate.parse("2023-01-01")) + .withStartTime("08:30") + .withNotAllowedDates( + Arrays + .asList( + new DateSpan() + .withStart(LocalDate.parse("2023-02-18")) + .withEnd(LocalDate.parse("2023-02-25")), + new DateSpan() + .withStart(LocalDate.parse("2023-12-23")) + .withEnd(LocalDate.parse("2024-01-05"))))) + .create(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ManagedCluster.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ManagedCluster.java new file mode 100644 index 0000000000000..3047fe1b84b5d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ManagedCluster.java @@ -0,0 +1,1905 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedClusters UpdateTags. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersUpdateTags.json + */ + /** + * Sample code: Update Managed Cluster Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateManagedClusterTags( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + ManagedCluster resource = + manager + .managedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("archv3", "", "tier", "testing")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +util.Context.NONE); + } +} +viceaks.generated.models.IstioComponents; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioEgressGateway; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGateway; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGatewayMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioPluginCertificateAuthority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioServiceMesh; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LicenseType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LoadBalancerSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterManagedOutboundIpProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNatGatewayProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefender; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileWorkloadIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuName; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuTier; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedServiceIdentityUserAssignedIdentitiesValue; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceIdentityType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UpgradeOverrideSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WindowsGmsaProfile; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedClusters CreateOrUpdate. */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_DualStackNetworking.json + */ + /** + * Sample code: Create/Update Managed Cluster with dual-stack networking. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithDualStackNetworking( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity( + new ManagedClusterIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withScaleDownMode(ScaleDownMode.DEALLOCATE) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) + .withIpFamilies(Arrays.asList(IpFamily.IPV4, IpFamily.IPV6))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withBalanceSimilarNodeGroups("true") + .withExpander(Expander.PRIORITY) + .withMaxNodeProvisionTime("15m") + .withNewPodScaleUpDelay("1m") + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m") + .withSkipNodesWithSystemPods("false")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_PodIdentity.json + */ + /** + * Sample code: Create Managed Cluster with PodIdentity enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithPodIdentityEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withPodIdentityProfile( + new ManagedClusterPodIdentityProfile().withEnabled(true).withAllowNetworkPluginKubenet(true)) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json + */ + /** + * Sample code: Create Managed Cluster with user-assigned NAT gateway as outbound type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(false) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.USER_ASSIGNED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD)) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity( + new ManagedClusterIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withScaleDownMode(ScaleDownMode.DEALLOCATE) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withUpgradeSettings( + new ClusterUpgradeSettings() + .withOverrideSettings( + new UpgradeOverrideSettings() + .withForceUpgrade(false) + .withUntil(OffsetDateTime.parse("2022-11-01T13:00:00Z")))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withBalanceSimilarNodeGroups("true") + .withExpander(Expander.PRIORITY) + .withMaxNodeProvisionTime("15m") + .withNewPodScaleUpDelay("1m") + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m") + .withSkipNodesWithSystemPods("false")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + */ + /** + * Sample code: Create Managed Private Cluster with fqdn subdomain specified. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withFqdnSubdomain("domain1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile( + new ManagedClusterApiServerAccessProfile() + .withEnablePrivateCluster(true) + .withPrivateDnsZone( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_ManagedNATGateway.json + */ + /** + * Sample code: Create Managed Cluster with AKS-managed NAT gateway as outbound type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(false) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.MANAGED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withNatGatewayProfile( + new ManagedClusterNatGatewayProfile() + .withManagedOutboundIpProfile(new ManagedClusterManagedOutboundIpProfile().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_Premium.json + */ + /** + * Sample code: Create Managed Cluster with LongTermSupport. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithLongTermSupport( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku().withName(ManagedClusterSkuName.BASE).withTier(ManagedClusterSkuTier.PREMIUM)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withSupportPlan(KubernetesSupportPlan.AKSLONG_TERM_SUPPORT) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json + */ + /** + * Sample code: Create Managed Cluster with Node Public IP Prefix. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithNodePublicIPPrefix( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withNodePublicIpPrefixId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix") + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json + */ + /** + * Sample code: Create Managed Cluster with EncryptionAtHost enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithEncryptionAtHostEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json + */ + /** + * Sample code: Create Managed Private Cluster with Public FQDN specified. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithPublicFQDNSpecified( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile( + new ManagedClusterApiServerAccessProfile() + .withEnablePrivateCluster(true) + .withEnablePrivateClusterPublicFqdn(true)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_HTTPProxy.json + */ + /** + * Sample code: Create Managed Cluster with HTTP proxy configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithHTTPProxyConfigured( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig( + new ManagedClusterHttpProxyConfig() + .withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_DedicatedHostGroup.json + */ + /** + * Sample code: Create Managed Cluster with Dedicated Host Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithDedicatedHostGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withEnableNodePublicIp(true) + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(false) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_EnabledFIPS.json + */ + /** + * Sample code: Create Managed Cluster with FIPS enabled OS. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithFIPSEnabledOS( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(false) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_SecurityProfile.json + */ + /** + * Sample code: Create Managed Cluster with Security Profile configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithSecurityProfileConfigured( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withSecurityProfile( + new ManagedClusterSecurityProfile() + .withDefender( + new ManagedClusterSecurityProfileDefender() + .withLogAnalyticsWorkspaceResourceId( + "/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME") + .withSecurityMonitoring( + new ManagedClusterSecurityProfileDefenderSecurityMonitoring().withEnabled(true))) + .withWorkloadIdentity(new ManagedClusterSecurityProfileWorkloadIdentity().withEnabled(true))) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_PPG.json + */ + /** + * Sample code: Create Managed Cluster with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithPPG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1") + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_UpdateWithAHUB.json + */ + /** + * Sample code: Create/Update Managed Cluster with EnableAHUB. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithEnableAHUB( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity( + new ManagedClusterIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder") + .withLicenseType(LicenseType.WINDOWS_SERVER)) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_DisableRunCommand.json + */ + /** + * Sample code: Create Managed Cluster with RunCommand disabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithRunCommandDisabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_Snapshot.json + */ + /** + * Sample code: Create Managed Cluster using an agent pool snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterUsingAnAgentPoolSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withCreationData( + new CreationData() + .withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(false) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_AzureServiceMesh.json + */ + /** + * Sample code: Create/Update Managed Cluster with Azure Service Mesh. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithAzureServiceMesh( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles( + mapOf( + "azureKeyvaultSecretsProvider", + new ManagedClusterAddonProfile() + .withEnabled(true) + .withConfig( + mapOf("enableSecretRotation", "fakeTokenPlaceholder", "rotationPollInterval", "2m")))) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withServiceMeshProfile( + new ServiceMeshProfile() + .withMode(ServiceMeshMode.ISTIO) + .withIstio( + new IstioServiceMesh() + .withComponents( + new IstioComponents() + .withIngressGateways( + Arrays + .asList( + new IstioIngressGateway() + .withMode(IstioIngressGatewayMode.INTERNAL) + .withEnabled(true))) + .withEgressGateways( + Arrays + .asList( + new IstioEgressGateway() + .withEnabled(true) + .withNodeSelector(mapOf("istio", "egress"))))) + .withCertificateAuthority( + new IstioCertificateAuthority() + .withPlugin( + new IstioPluginCertificateAuthority() + .withKeyVaultId("fakeTokenPlaceholder") + .withCertObjectName("ca-cert") + .withKeyObjectName("fakeTokenPlaceholder") + .withRootCertObjectName("root-cert") + .withCertChainObjectName("cert-chain"))))) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + */ + /** + * Sample code: Create Managed Cluster with Azure KeyVault Secrets Provider Addon. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles( + mapOf( + "azureKeyvaultSecretsProvider", + new ManagedClusterAddonProfile() + .withEnabled(true) + .withConfig( + mapOf("enableSecretRotation", "fakeTokenPlaceholder", "rotationPollInterval", "2m")))) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_OSSKU.json + */ + /** + * Sample code: Create Managed Cluster with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithOSSKU( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOsSku(Ossku.AZURE_LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig( + new ManagedClusterHttpProxyConfig() + .withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")) + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + */ + /** + * Sample code: Create/Update AAD Managed Cluster with EnableAzureRBAC. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateAADManagedClusterWithEnableAzureRBAC( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAadProfile(new ManagedClusterAadProfile().withManaged(true).withEnableAzureRbac(true)) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_EnableUltraSSD.json + */ + /** + * Sample code: Create Managed Cluster with UltraSSD enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithUltraSSDEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableUltraSsd(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json + */ + /** + * Sample code: Create/Update Managed Cluster with Windows gMSA enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithWindowsGMSAEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity( + new ManagedClusterIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder") + .withGmsaProfile(new WindowsGmsaProfile().withEnabled(true))) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ManagedClustersCreate_GPUMIG.json + */ + /** + * Sample code: Create Managed Cluster with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithGPUMIG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .managedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku( + new ManagedClusterSku() + .withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles( + Arrays + .asList( + new ManagedClusterAgentPoolProfile() + .withCount(3) + .withVmSize("Standard_ND96asr_v4") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withGpuInstanceProfile(GpuInstanceProfile.MIG3G) + .withName("nodepool1"))) + .withLinuxProfile( + new ContainerServiceLinuxProfile() + .withAdminUsername("azureuser") + .withSsh( + new ContainerServiceSshConfiguration() + .withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile( + new ManagedClusterWindowsProfile() + .withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile( + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withEnablePodSecurityPolicy(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile() + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile( + new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig( + new ManagedClusterHttpProxyConfig() + .withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OpenShiftManag.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OpenShiftManag.java new file mode 100644 index 0000000000000..728a038926b16 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OpenShiftManag.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OpenShiftManagedClusters UpdateTags. */ +public final class OpenShiftManag { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/OpenShiftManagedClustersUpdateTags.json + */ + /** + * Sample code: Update OpenShift Managed Cluster Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateOpenShiftManagedClusterTags( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + OpenShiftManagedCluster resource = + manager + .openShiftManagedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("archv3", "", "tier", "testing")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +ce-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/OpenShiftManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update OpenShift Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateOpenShiftManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .openShiftManagedClusters() + .define("clustername1") + .withRegion("location1") + .withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withOpenShiftVersion("v3.11") + .withNetworkProfile(new NetworkProfile().withVnetCidr("10.0.0.0/8")) + .withRouterProfiles(Arrays.asList(new OpenShiftRouterProfile().withName("default"))) + .withMasterPoolProfile( + new OpenShiftManagedClusterMasterPoolProfile() + .withName("master") + .withCount(3) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX)) + .withAgentPoolProfiles( + Arrays + .asList( + new OpenShiftManagedClusterAgentPoolProfile() + .withName("infra") + .withCount(2) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX) + .withRole(OpenShiftAgentPoolProfileRole.INFRA), + new OpenShiftManagedClusterAgentPoolProfile() + .withName("compute") + .withCount(4) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX) + .withRole(OpenShiftAgentPoolProfileRole.COMPUTE))) + .withAuthProfile( + new OpenShiftManagedClusterAuthProfile() + .withIdentityProviders( + Arrays + .asList( + new OpenShiftManagedClusterIdentityProvider() + .withName("Azure AD") + .withProvider( + new OpenShiftManagedClusterAadIdentityProvider() + .withClientId("clientId") + .withSecret("fakeTokenPlaceholder") + .withTenantId("tenantId") + .withCustomerAdminGroupId("customerAdminGroupId"))))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationsList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationsList.java new file mode 100644 index 0000000000000..8eb868516af5a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationsList.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for Operations List. */ +public final class OperationsList { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/Operation_List.json + */ + /** + * Sample code: List available operations for the container service resource provider. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listAvailableOperationsForTheContainerServiceResourceProvider( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateEndpoin.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateEndpoin.java new file mode 100644 index 0000000000000..d8de4887cae05 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateEndpoin.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; + +/** Samples for PrivateEndpointConnections Update. */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/PrivateEndpointConnectionsUpdate.json + */ + /** + * Sample code: Update Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updatePrivateEndpointConnection( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .privateEndpointConnections() + .updateWithResponse( + "rg1", + "clustername1", + "privateendpointconnection1", + new PrivateEndpointConnectionInner() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateLinkRes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateLinkRes.java new file mode 100644 index 0000000000000..558bc876df754 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateLinkRes.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for PrivateLinkResources List. */ +public final class PrivateLinkRes { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/PrivateLinkResourcesList.json + */ + /** + * Sample code: List Private Link Resources by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listPrivateLinkResourcesByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.privateLinkResources().listWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ResolvePrivate.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ResolvePrivate.java new file mode 100644 index 0000000000000..69eb287bf4df9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ResolvePrivate.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; + +/** Samples for ResolvePrivateLinkServiceId Post. */ +public final class ResolvePrivate { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/ResolvePrivateLinkServiceId.json + */ + /** + * Sample code: Resolve the Private Link Service ID for Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void resolveThePrivateLinkServiceIDForManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .resolvePrivateLinkServiceIds() + .postWithResponse( + "rg1", + "clustername1", + new PrivateLinkResourceInner().withName("management"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsCreat.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsCreat.java new file mode 100644 index 0000000000000..00d9638b0361c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsCreat.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Snapshots CreateOrUpdate. */ +public final class SnapshotsCreat { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsCreate.json + */ + /** + * Sample code: Create/Update Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager + .snapshots() + .define("snapshot1") + .withRegion("westus") + .withExistingResourceGroup("rg1") + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withCreationData( + new CreationData() + .withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsDelet.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsDelet.java new file mode 100644 index 0000000000000..3623676b5d659 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsDelet.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for Snapshots Delete. */ +public final class SnapshotsDelet { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsDelete.json + */ + /** + * Sample code: Delete Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.snapshots().deleteByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsGetBy.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsGetBy.java new file mode 100644 index 0000000000000..a497626b3856d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsGetBy.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for Snapshots GetByResourceGroup. */ +public final class SnapshotsGetBy { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsGet.json + */ + /** + * Sample code: Get Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.snapshots().getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListB.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListB.java new file mode 100644 index 0000000000000..0c62e1f784b41 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListB.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for Snapshots ListByResourceGroup. */ +public final class SnapshotsListB { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsListByResourceGroup.json + */ + /** + * Sample code: List Snapshots by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshotsByResourceGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.snapshots().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListS.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListS.java new file mode 100644 index 0000000000000..3a02d69be274b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListS.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for Snapshots List. */ +public final class SnapshotsListS { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsList.json + */ + /** + * Sample code: List Snapshots. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshots( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.snapshots().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsUpdat.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsUpdat.java new file mode 100644 index 0000000000000..33e34d9f79dff --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsUpdat.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshot; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Snapshots UpdateTags. */ +public final class SnapshotsUpdat { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/SnapshotsUpdateTags.json + */ + /** + * Sample code: Update Snapshot Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateSnapshotTags( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + Snapshot resource = + manager + .snapshots() + .getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key2", "fakeTokenPlaceholder", "key3", "fakeTokenPlaceholder")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/TrustedAccessR.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/TrustedAccessR.java new file mode 100644 index 0000000000000..ecbd8a1a52e1c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/TrustedAccessR.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** Samples for TrustedAccessRoles List. */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-09-01/examples/TrustedAccessRoles_List.json + */ + /** + * Sample code: List trusted access roles. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listTrustedAccessRoles( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager) { + manager.trustedAccessRoles().list("westus2", com.azure.core.util.Context.NONE); + } +} +"clustername1", "binding1", com.azure.core.util.Context.NONE); + } +} +.define("binding1") + .withExistingManagedCluster("rg1", "clustername1") + .withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/b/providers/Microsoft.MachineLearningServices/workspaces/c") + .withRoles( + Arrays + .asList( + "Microsoft.MachineLearningServices/workspaces/reader", + "Microsoft.MachineLearningServices/workspaces/writer")) + .create(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/ci.yml b/sdk/containerservicemicrosoftcontainerserviceaks/ci.yml new file mode 100644 index 0000000000000..887378479a979 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/ci.yml @@ -0,0 +1,47 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/containerservicemicrosoftcontainerserviceaks/ci.yml + - sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/ + exclude: + - sdk/containerservicemicrosoftcontainerserviceaks/pom.xml + - sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerservicemicrosoftcontainerserviceaks/ci.yml + - sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/ + exclude: + - sdk/containerservicemicrosoftcontainerserviceaks/pom.xml + - sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml + +parameters: + - name: release_azureresourcemanagercontainerservicemicrosoftcontainerserviceaksgenerated + displayName: azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + type: boolean + default: false + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: containerservicemicrosoftcontainerserviceaks + EnableBatchRelease: true + Artifacts: + - name: azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + groupId: com.azure.resourcemanager + safeName: azureresourcemanagercontainerservicemicrosoftcontainerserviceaksgenerated + releaseInBatch: ${{ parameters.release_azureresourcemanagercontainerservicemicrosoftcontainerserviceaksgenerated }} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/pom.xml b/sdk/containerservicemicrosoftcontainerserviceaks/pom.xml new file mode 100644 index 0000000000000..624b59f297545 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-containerservicemicrosoftcontainerserviceaks-service + pom + 1.0.0 + + + azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + +