From 17bafb5338f6455495a9b24c969fda9e770dfb0e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 7 Apr 2021 05:00:02 +0000 Subject: [PATCH] CodeGen from PR 13763 in Azure/azure-rest-api-specs [aks] fix vm size model and osDiskType description (#13763) * fix: agent pool vm size should be string, not enum * fix: osDiskType default description for >= 2020-11-01 --- eng/versioning/version_client.txt | 1 + pom.xml | 1 + .../CHANGELOG.md | 5 + .../README.md | 99 + .../pom.xml | 67 + .../generated/ContainerServiceManager.java | 290 ++ .../generated/fluent/AgentPoolsClient.java | 330 ++ .../ContainerServiceManagementClient.java | 96 + .../MaintenanceConfigurationsClient.java | 141 + .../fluent/ManagedClustersClient.java | 832 ++++ .../generated/fluent/OperationsClient.java | 36 + .../PrivateEndpointConnectionsClient.java | 176 + .../fluent/PrivateLinkResourcesClient.java | 44 + .../ResolvePrivateLinkServiceIdsClient.java | 44 + .../AgentPoolAvailableVersionsInner.java | 103 + .../fluent/models/AgentPoolInner.java | 1025 ++++ .../models/AgentPoolUpgradeProfileInner.java | 194 + .../fluent/models/CredentialResultsInner.java | 44 + .../models/MaintenanceConfigurationInner.java | 143 + .../ManagedClusterAccessProfileInner.java | 69 + .../fluent/models/ManagedClusterInner.java | 888 ++++ .../ManagedClusterUpgradeProfileInner.java | 143 + .../fluent/models/OSOptionProfileInner.java | 107 + .../fluent/models/OperationValueInner.java | 116 + .../PrivateEndpointConnectionInner.java | 107 + ...vateEndpointConnectionListResultInner.java | 54 + .../models/PrivateLinkResourceInner.java | 172 + .../PrivateLinkResourcesListResultInner.java | 54 + .../fluent/models/RunCommandResultInner.java | 132 + .../generated/fluent/models/package-info.java | 6 + .../generated/fluent/package-info.java | 6 + .../AgentPoolAvailableVersionsImpl.java | 53 + .../implementation/AgentPoolImpl.java | 470 ++ .../AgentPoolUpgradeProfileImpl.java | 66 + .../implementation/AgentPoolsClientImpl.java | 1740 +++++++ .../implementation/AgentPoolsImpl.java | 269 + ...ntainerServiceManagementClientBuilder.java | 149 + .../ContainerServiceManagementClientImpl.java | 382 ++ .../implementation/CredentialResultsImpl.java | 41 + .../MaintenanceConfigurationImpl.java | 168 + .../MaintenanceConfigurationsClientImpl.java | 910 ++++ .../MaintenanceConfigurationsImpl.java | 209 + .../ManagedClusterAccessProfileImpl.java | 60 + .../implementation/ManagedClusterImpl.java | 553 +++ .../ManagedClusterUpgradeProfileImpl.java | 57 + .../ManagedClustersClientImpl.java | 4360 +++++++++++++++++ .../implementation/ManagedClustersImpl.java | 429 ++ .../implementation/OSOptionProfileImpl.java | 53 + .../implementation/OperationValueImpl.java | 53 + .../implementation/OperationsClientImpl.java | 176 + .../implementation/OperationsImpl.java | 47 + .../PrivateEndpointConnectionImpl.java | 56 + ...ivateEndpointConnectionListResultImpl.java | 48 + .../PrivateEndpointConnectionsClientImpl.java | 923 ++++ .../PrivateEndpointConnectionsImpl.java | 137 + .../PrivateLinkResourceImpl.java | 60 + .../PrivateLinkResourcesClientImpl.java | 227 + .../PrivateLinkResourcesImpl.java | 62 + .../PrivateLinkResourcesListResultImpl.java | 48 + ...esolvePrivateLinkServiceIdsClientImpl.java | 244 + .../ResolvePrivateLinkServiceIdsImpl.java | 63 + .../implementation/RunCommandResultImpl.java | 58 + .../generated/implementation/Utils.java | 204 + .../implementation/package-info.java | 6 + .../generated/models/AgentPool.java | 1192 +++++ .../models/AgentPoolAvailableVersions.java | 47 + ...rsionsPropertiesAgentPoolVersionsItem.java | 104 + .../generated/models/AgentPoolListResult.java | 70 + .../generated/models/AgentPoolMode.java | 34 + .../generated/models/AgentPoolType.java | 34 + .../models/AgentPoolUpgradeProfile.java | 68 + ...lUpgradeProfilePropertiesUpgradesItem.java | 77 + .../models/AgentPoolUpgradeSettings.java | 53 + .../generated/models/AgentPools.java | 228 + .../generated/models/BaseManagedCluster.java | 799 +++ .../generated/models/Code.java | 34 + .../generated/models/ConnectionStatus.java | 40 + .../models/ContainerServiceLinuxProfile.java | 90 + .../ContainerServiceNetworkProfile.java | 299 ++ .../ContainerServiceSshConfiguration.java | 62 + .../models/ContainerServiceSshPublicKey.java | 59 + .../ContainerServiceStorageProfileTypes.java | 35 + .../models/ContainerServiceVMDiagnostics.java | 65 + .../models/ContainerServiceVMSizeTypes.java | 550 +++ .../generated/models/Count.java | 54 + .../generated/models/CredentialResult.java | 55 + .../generated/models/CredentialResults.java | 25 + .../generated/models/Expander.java | 40 + .../generated/models/ExtendedLocation.java | 76 + .../models/ExtendedLocationTypes.java | 31 + .../generated/models/GpuInstanceProfile.java | 43 + .../generated/models/KubeletConfig.java | 323 ++ .../generated/models/KubeletDiskType.java | 34 + .../generated/models/LicenseType.java | 34 + .../generated/models/LinuxOSConfig.java | 132 + .../generated/models/LoadBalancerSku.java | 34 + .../models/MaintenanceConfiguration.java | 187 + .../MaintenanceConfigurationListResult.java | 70 + .../models/MaintenanceConfigurations.java | 148 + .../generated/models/ManagedCluster.java | 885 ++++ .../models/ManagedClusterAadProfile.java | 210 + .../models/ManagedClusterAccessProfile.java | 61 + .../models/ManagedClusterAddonProfile.java | 95 + .../ManagedClusterAddonProfileIdentity.java | 46 + .../ManagedClusterAgentPoolProfile.java | 287 ++ ...agedClusterAgentPoolProfileProperties.java | 971 ++++ .../ManagedClusterApiServerAccessProfile.java | 103 + .../ManagedClusterAutoUpgradeProfile.java | 50 + .../models/ManagedClusterHttpProxyConfig.java | 129 + .../models/ManagedClusterIdentity.java | 139 + ...ClusterIdentityUserAssignedIdentities.java | 55 + .../models/ManagedClusterListResult.java | 70 + .../ManagedClusterLoadBalancerProfile.java | 202 + ...LoadBalancerProfileManagedOutboundIPs.java | 55 + ...ClusterLoadBalancerProfileOutboundIPs.java | 55 + ...LoadBalancerProfileOutboundIpPrefixes.java | 56 + .../models/ManagedClusterPodIdentity.java | 180 + .../ManagedClusterPodIdentityException.java | 121 + .../ManagedClusterPodIdentityProfile.java | 140 + ...gedClusterPodIdentityProvisioningInfo.java | 51 + ...edClusterPodIdentityProvisioningState.java | 41 + .../ManagedClusterPoolUpgradeProfile.java | 145 + ...ClusterPoolUpgradeProfileUpgradesItem.java | 77 + ...gedClusterPropertiesAutoScalerProfile.java | 467 ++ ...nagedClusterPropertiesIdentityProfile.java | 46 + ...ManagedClusterServicePrincipalProfile.java | 82 + .../generated/models/ManagedClusterSku.java | 76 + .../models/ManagedClusterSkuName.java | 31 + .../models/ManagedClusterSkuTier.java | 34 + .../models/ManagedClusterUpgradeProfile.java | 54 + .../models/ManagedClusterWindowsProfile.java | 171 + .../generated/models/ManagedClusters.java | 509 ++ .../generated/models/NetworkMode.java | 34 + .../generated/models/NetworkPlugin.java | 34 + .../generated/models/NetworkPolicy.java | 34 + .../generated/models/OSDiskType.java | 34 + .../generated/models/OSOptionProfile.java | 46 + .../generated/models/OSOptionProperty.java | 81 + .../generated/models/OSType.java | 34 + .../generated/models/OperationListResult.java | 44 + .../generated/models/OperationValue.java | 59 + .../generated/models/Operations.java | 31 + .../generated/models/Ossku.java | 34 + .../generated/models/OutboundType.java | 34 + .../generated/models/PowerState.java | 50 + .../generated/models/PrivateEndpoint.java | 50 + .../models/PrivateEndpointConnection.java | 61 + .../PrivateEndpointConnectionListResult.java | 27 + ...teEndpointConnectionProvisioningState.java | 41 + .../models/PrivateEndpointConnections.java | 131 + .../generated/models/PrivateLinkResource.java | 62 + .../models/PrivateLinkResources.java | 39 + .../PrivateLinkResourcesListResult.java | 26 + .../PrivateLinkServiceConnectionState.java | 76 + .../models/ResolvePrivateLinkServiceIds.java | 40 + .../models/ResourceIdentityType.java | 50 + .../generated/models/ResourceReference.java | 50 + .../generated/models/RunCommandRequest.java | 107 + .../generated/models/RunCommandResult.java | 67 + .../models/ScaleSetEvictionPolicy.java | 34 + .../generated/models/ScaleSetPriority.java | 34 + .../generated/models/SysctlConfig.java | 752 +++ .../generated/models/TagsObject.java | 51 + .../generated/models/TimeInWeek.java | 77 + .../generated/models/TimeSpan.java | 77 + .../generated/models/UpgradeChannel.java | 43 + .../models/UserAssignedIdentity.java | 102 + .../generated/models/WeekDay.java | 49 + .../generated/models/package-info.java | 6 + .../generated/package-info.java | 6 + .../src/main/java/module-info.java | 19 + sdk/containerservice/ci.yml | 33 + sdk/containerservice/pom.xml | 53 + 173 files changed, 31538 insertions(+) create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/CHANGELOG.md create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/README.md create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/pom.xml create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/ContainerServiceManager.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/AgentPoolsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ContainerServiceManagementClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/MaintenanceConfigurationsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ManagedClustersClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/OperationsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/PrivateLinkResourcesClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ResolvePrivateLinkServiceIdsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolAvailableVersionsInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolUpgradeProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/CredentialResultsInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/MaintenanceConfigurationInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterAccessProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterUpgradeProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/OSOptionProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/OperationValueInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateEndpointConnectionListResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateLinkResourcesListResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/RunCommandResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/package-info.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/package-info.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolAvailableVersionsImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolUpgradeProfileImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolsImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ContainerServiceManagementClientBuilder.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ContainerServiceManagementClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/CredentialResultsImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationsImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterAccessProfileImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterUpgradeProfileImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClustersClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClustersImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OSOptionProfileImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationValueImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationsImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionListResultImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesListResultImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/RunCommandResultImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/Utils.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/package-info.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPool.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolAvailableVersions.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeSettings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPools.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/BaseManagedCluster.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Code.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ConnectionStatus.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceLinuxProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceNetworkProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceSshConfiguration.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceSshPublicKey.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceStorageProfileTypes.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceVMDiagnostics.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceVMSizeTypes.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Count.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/CredentialResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/CredentialResults.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Expander.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ExtendedLocation.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ExtendedLocationTypes.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/GpuInstanceProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/KubeletConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/KubeletDiskType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LicenseType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LinuxOSConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LoadBalancerSku.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfiguration.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfigurationListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfigurations.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedCluster.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAadProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAccessProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAddonProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAddonProfileIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAgentPoolProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAgentPoolProfileProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterApiServerAccessProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAutoUpgradeProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterHttpProxyConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterIdentityUserAssignedIdentities.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityException.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProvisioningInfo.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPoolUpgradeProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPropertiesAutoScalerProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPropertiesIdentityProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterServicePrincipalProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSku.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSkuName.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSkuTier.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterUpgradeProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterWindowsProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusters.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkPlugin.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkPolicy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSDiskType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSOptionProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSOptionProperty.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OperationListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OperationValue.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Operations.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Ossku.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OutboundType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PowerState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpoint.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnection.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnections.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResource.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResources.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResourcesListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResolvePrivateLinkServiceIds.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResourceIdentityType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResourceReference.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/RunCommandRequest.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/RunCommandResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ScaleSetEvictionPolicy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ScaleSetPriority.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/SysctlConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TagsObject.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TimeInWeek.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TimeSpan.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/UpgradeChannel.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/UserAssignedIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/WeekDay.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/package-info.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/package-info.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/module-info.java create mode 100644 sdk/containerservice/ci.yml create mode 100644 sdk/containerservice/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 45b5c55ee3f9e..5e03d1d1c4973 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -222,6 +222,7 @@ com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration;1.0.0-be com.azure.resourcemanager:azure-resourcemanager-resourcegraph;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-changeanalysis;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-delegatednetwork;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-containerservice-generated;1.0.0-beta.1;1.0.0-beta.1 # Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current # version. Unreleased dependencies are only valid for dependency versions. diff --git a/pom.xml b/pom.xml index 3ccc9cad09e8d..37b30518ab9fd 100644 --- a/pom.xml +++ b/pom.xml @@ -668,6 +668,7 @@ sdk/communication sdk/confluent sdk/containerregistry + sdk/containerservice sdk/core sdk/cosmos sdk/costmanagement diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice-generated/CHANGELOG.md new file mode 100644 index 0000000000000..aa1ee68f42e88 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2021-04-07) + +- Azure Resource Manager ContainerService client library for Java. This package contains Microsoft Azure SDK for ContainerService Management SDK. Container Service Client. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/README.md b/sdk/containerservice/azure-resourcemanager-containerservice-generated/README.md new file mode 100644 index 0000000000000..5fd7ace6e0e69 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/README.md @@ -0,0 +1,99 @@ +# 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-2021-03. 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-containerservice-generated;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-containerservice-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] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. + +### Authentication + +By default, Azure Active Directory token authentication depends on correct configure of following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. + +With above configuration, `azure` client can be authenticated by 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 + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/pom.xml b/sdk/containerservice/azure-resourcemanager-containerservice-generated/pom.xml new file mode 100644 index 0000000000000..dcdd1e12e0dc6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/pom.xml @@ -0,0 +1,67 @@ + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-containerservice-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-2021-03. + 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 + + + + + com.azure + azure-core + 1.15.0 + + + com.azure + azure-core-management + 1.2.1 + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + true + + + + + diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/ContainerServiceManager.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/ContainerServiceManager.java new file mode 100644 index 0000000000000..c7b51b2826abb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/ContainerServiceManager.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.policy.AddDatePolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +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.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservice.generated.implementation.AgentPoolsImpl; +import com.azure.resourcemanager.containerservice.generated.implementation.ContainerServiceManagementClientBuilder; +import com.azure.resourcemanager.containerservice.generated.implementation.MaintenanceConfigurationsImpl; +import com.azure.resourcemanager.containerservice.generated.implementation.ManagedClustersImpl; +import com.azure.resourcemanager.containerservice.generated.implementation.OperationsImpl; +import com.azure.resourcemanager.containerservice.generated.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.containerservice.generated.implementation.PrivateLinkResourcesImpl; +import com.azure.resourcemanager.containerservice.generated.implementation.ResolvePrivateLinkServiceIdsImpl; +import com.azure.resourcemanager.containerservice.generated.models.AgentPools; +import com.azure.resourcemanager.containerservice.generated.models.MaintenanceConfigurations; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusters; +import com.azure.resourcemanager.containerservice.generated.models.Operations; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpointConnections; +import com.azure.resourcemanager.containerservice.generated.models.PrivateLinkResources; +import com.azure.resourcemanager.containerservice.generated.models.ResolvePrivateLinkServiceIds; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** Entry point to ContainerServiceManager. Container Service Client. */ +public final class ContainerServiceManager { + private Operations operations; + + private ManagedClusters managedClusters; + + private MaintenanceConfigurations maintenanceConfigurations; + + private AgentPools agentPools; + + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateLinkResources privateLinkResources; + + private ResolvePrivateLinkServiceIds resolvePrivateLinkServiceIds; + + 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); + } + + /** + * 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 final ClientLogger logger = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private RetryPolicy retryPolicy; + 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; + } + + /** + * 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 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, "'retryPolicy' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' 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.containerservice.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 (retryPolicy == null) { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new RequestIdPolicy()); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies + .add( + new BearerTokenAuthenticationPolicy( + credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); + policies.addAll(this.policies); + 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); + } + } + + /** @return Resource collection API of Operations. */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** @return Resource collection API of ManagedClusters. */ + public ManagedClusters managedClusters() { + if (this.managedClusters == null) { + this.managedClusters = new ManagedClustersImpl(clientObject.getManagedClusters(), this); + } + return managedClusters; + } + + /** @return Resource collection API of MaintenanceConfigurations. */ + public MaintenanceConfigurations maintenanceConfigurations() { + if (this.maintenanceConfigurations == null) { + this.maintenanceConfigurations = + new MaintenanceConfigurationsImpl(clientObject.getMaintenanceConfigurations(), this); + } + return maintenanceConfigurations; + } + + /** @return Resource collection API of AgentPools. */ + public AgentPools agentPools() { + if (this.agentPools == null) { + this.agentPools = new AgentPoolsImpl(clientObject.getAgentPools(), this); + } + return agentPools; + } + + /** @return Resource collection API of PrivateEndpointConnections. */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = + new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** @return Resource collection API of PrivateLinkResources. */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + + /** @return Resource collection API of ResolvePrivateLinkServiceIds. */ + public ResolvePrivateLinkServiceIds resolvePrivateLinkServiceIds() { + if (this.resolvePrivateLinkServiceIds == null) { + this.resolvePrivateLinkServiceIds = + new ResolvePrivateLinkServiceIdsImpl(clientObject.getResolvePrivateLinkServiceIds(), this); + } + return resolvePrivateLinkServiceIds; + } + + /** + * @return Wrapped service client ContainerServiceManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + */ + public ContainerServiceManagementClient serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/AgentPoolsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/AgentPoolsClient.java new file mode 100644 index 0000000000000..62aa71385a1bd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/AgentPoolsClient.java @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolUpgradeProfileInner; + +/** An instance of this class provides access to all the operations defined in AgentPoolsClient. */ +public interface AgentPoolsClient { + /** + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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) + 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner createOrUpdate( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + Context context); + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName); + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAvailableAgentPoolVersionsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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) + SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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) + SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ContainerServiceManagementClient.java new file mode 100644 index 0000000000000..9c1af16a2dc85 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ContainerServiceManagementClient.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the 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(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/MaintenanceConfigurationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/MaintenanceConfigurationsClient.java new file mode 100644 index 0000000000000..7ed932e31234d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/MaintenanceConfigurationsClient.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.containerservice.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.containerservice.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. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceConfigurationInner get(String resourceGroupName, String resourceName, String configName); + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String configName, Context context); + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters Parameters supplied to the Create or Update a default 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 maintenance configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceConfigurationInner createOrUpdate( + String resourceGroupName, String resourceName, String configName, MaintenanceConfigurationInner parameters); + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters Parameters supplied to the Create or Update a default 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 maintenance configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + String configName, + MaintenanceConfigurationInner parameters, + Context context); + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String resourceName, String configName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ManagedClustersClient.java new file mode 100644 index 0000000000000..1c98f4dd561fb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ManagedClustersClient.java @@ -0,0 +1,832 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservice.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 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 supported OS options in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OSOptionProfileInner getOSOptions(String location); + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of a supported Azure region. + * @param resourceType 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getOSOptionsWithResponse(String location, String resourceType, Context context); + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each + * 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 Managed Clusters operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each + * 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 Managed Clusters operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName); + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, String roleName); + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAccessProfileWithResponse( + String resourceGroupName, String resourceName, String roleName, Context context); + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName); + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterAdminCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName); + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterUserCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName); + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterMonitoringUserCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters); + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context); + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters); + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner createOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context); + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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) + SyncPoller, ManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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) + SyncPoller, ManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context); + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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 a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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 the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName); + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginResetServicePrincipalProfile( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters); + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for 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. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginResetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context); + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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); + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context); + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginResetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for 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. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginResetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context); + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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); + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context); + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginRotateClusterCertificates( + String resourceGroupName, String resourceName, Context context); + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginStop(String resourceGroupName, String resourceName); + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, Context context); + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginStart(String resourceGroupName, String resourceName); + + /** + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginStart(String resourceGroupName, String resourceName, Context context); + + /** + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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) + SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload); + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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 run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context); + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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); + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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 run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunCommandResultInner runCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context); + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId); + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCommandResultWithResponse( + String resourceGroupName, String resourceName, String commandId, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/OperationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/OperationsClient.java new file mode 100644 index 0000000000000..5444df6c7c090 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.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.containerservice.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 compute 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 compute operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of compute 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 compute operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 0000000000000..87a1cc5b5ee64 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/PrivateEndpointConnectionsClient.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservice.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. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get( + String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner update( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection 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 private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, + Context context); + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/PrivateLinkResourcesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/PrivateLinkResourcesClient.java new file mode 100644 index 0000000000000..6798763853dfc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/PrivateLinkResourcesClient.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.containerservice.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.containerservice.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. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName); + + /** + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String resourceName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ResolvePrivateLinkServiceIdsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/ResolvePrivateLinkServiceIdsClient.java new file mode 100644 index 0000000000000..de6c08027c42d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.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.containerservice.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 the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner post(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); + + /** + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response postWithResponse( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolAvailableVersionsInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolAvailableVersionsInner.java new file mode 100644 index 0000000000000..d4868fe26f462 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolAvailableVersionsInner.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.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available versions for an agent pool. */ +@JsonFlatten +@Fluent +public class AgentPoolAvailableVersionsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AgentPoolAvailableVersionsInner.class); + + /* + * Id of the agent pool available versions. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Name of the agent pool available versions. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Type of the agent pool available versions. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * List of versions available for agent pool. + */ + @JsonProperty(value = "properties.agentPoolVersions") + private List agentPoolVersions; + + /** + * Get the id property: Id of the agent pool available versions. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the agent pool available versions. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Type of the agent pool available versions. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * 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 AgentPoolAvailableVersionsInner object itself. + */ + public AgentPoolAvailableVersionsInner 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolInner.java new file mode 100644 index 0000000000000..e253d61c5f65b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolInner.java @@ -0,0 +1,1025 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SubResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservice.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservice.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservice.generated.models.KubeletDiskType; +import com.azure.resourcemanager.containerservice.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservice.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservice.generated.models.OSType; +import com.azure.resourcemanager.containerservice.generated.models.Ossku; +import com.azure.resourcemanager.containerservice.generated.models.PowerState; +import com.azure.resourcemanager.containerservice.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservice.generated.models.ScaleSetPriority; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Agent Pool. */ +@JsonFlatten +@Fluent +public class AgentPoolInner extends SubResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AgentPoolInner.class); + + /* + * Number of agents (VMs) to host docker containers. Allowed values must be + * in the range of 0 to 100 (inclusive) for user pools and in the range of + * 1 to 100 (inclusive) for system pools. The default value is 1. + */ + @JsonProperty(value = "properties.count") + private Integer count; + + /* + * Size of agent VMs. + */ + @JsonProperty(value = "properties.vmSize") + private String vmSize; + + /* + * OS Disk Size in GB to be used to specify the disk size for every machine + * in this master/agent pool. If you specify 0, it will apply the default + * osDisk size according to the vmSize specified. + */ + @JsonProperty(value = "properties.osDiskSizeGB") + private Integer osDiskSizeGB; + + /* + * OS disk type to be used for machines in a given agent pool. Allowed + * values are 'Ephemeral' and 'Managed'. If unspecified, defaults to + * 'Ephemeral' when the VM supports ephemeral OS and has a cache disk + * larger than the requested OSDiskSizeGB. Otherwise, defaults to + * 'Managed'. May not be changed after creation. + */ + @JsonProperty(value = "properties.osDiskType") + private OSDiskType osDiskType; + + /* + * KubeletDiskType determines the placement of emptyDir volumes, container + * runtime data root, and Kubelet ephemeral storage. Currently allows one + * value, OS, resulting in Kubelet using the OS disk for data. + */ + @JsonProperty(value = "properties.kubeletDiskType") + private KubeletDiskType kubeletDiskType; + + /* + * VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + * pods + */ + @JsonProperty(value = "properties.vnetSubnetID") + private String vnetSubnetId; + + /* + * Pod SubnetID specifies the VNet's subnet identifier for pods. + */ + @JsonProperty(value = "properties.podSubnetID") + private String podSubnetId; + + /* + * Maximum number of pods that can run on a node. + */ + @JsonProperty(value = "properties.maxPods") + private Integer maxPods; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux. + */ + @JsonProperty(value = "properties.osType") + private OSType osType; + + /* + * OsSKU to be used to specify os sku. Choose from Ubuntu(default) and + * CBLMariner for Linux OSType. Not applicable to Windows OSType. + */ + @JsonProperty(value = "properties.osSKU") + private Ossku osSku; + + /* + * Maximum number of nodes for auto-scaling + */ + @JsonProperty(value = "properties.maxCount") + private Integer maxCount; + + /* + * Minimum number of nodes for auto-scaling + */ + @JsonProperty(value = "properties.minCount") + private Integer minCount; + + /* + * Whether to enable auto-scaler + */ + @JsonProperty(value = "properties.enableAutoScaling") + private Boolean enableAutoScaling; + + /* + * AgentPoolType represents types of an agent pool + */ + @JsonProperty(value = "properties.type") + private AgentPoolType typePropertiesType; + + /* + * AgentPoolMode represents mode of an agent pool + */ + @JsonProperty(value = "properties.mode") + private AgentPoolMode mode; + + /* + * Version of orchestrator specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.orchestratorVersion") + private String orchestratorVersion; + + /* + * Version of node image + */ + @JsonProperty(value = "properties.nodeImageVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeImageVersion; + + /* + * Settings for upgrading the agentpool + */ + @JsonProperty(value = "properties.upgradeSettings") + private AgentPoolUpgradeSettings upgradeSettings; + + /* + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Describes whether the Agent Pool is Running or Stopped + */ + @JsonProperty(value = "properties.powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /* + * Availability zones for nodes. Must use VirtualMachineScaleSets + * AgentPoolType. + */ + @JsonProperty(value = "properties.availabilityZones") + private List availabilityZones; + + /* + * Enable public IP for nodes + */ + @JsonProperty(value = "properties.enableNodePublicIP") + private Boolean enableNodePublicIp; + + /* + * Public IP Prefix ID. VM nodes use IPs assigned from this Public IP + * Prefix. + */ + @JsonProperty(value = "properties.nodePublicIPPrefixID") + private String nodePublicIpPrefixId; + + /* + * ScaleSetPriority to be used to specify virtual machine scale set + * priority. Default to regular. + */ + @JsonProperty(value = "properties.scaleSetPriority") + private ScaleSetPriority scaleSetPriority; + + /* + * ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to Delete. + */ + @JsonProperty(value = "properties.scaleSetEvictionPolicy") + private ScaleSetEvictionPolicy scaleSetEvictionPolicy; + + /* + * SpotMaxPrice to be used to specify the maximum price you are willing to + * pay in US Dollars. Possible values are any decimal value greater than + * zero or -1 which indicates default price to be up-to on-demand. + */ + @JsonProperty(value = "properties.spotMaxPrice") + private Float spotMaxPrice; + + /* + * Agent pool tags to be persisted on the agent pool virtual machine scale + * set. + */ + @JsonProperty(value = "properties.tags") + private Map tags; + + /* + * Agent pool node labels to be persisted across all nodes in agent pool. + */ + @JsonProperty(value = "properties.nodeLabels") + private Map nodeLabels; + + /* + * Taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule. + */ + @JsonProperty(value = "properties.nodeTaints") + private List nodeTaints; + + /* + * The ID for Proximity Placement Group. + */ + @JsonProperty(value = "properties.proximityPlacementGroupID") + private String proximityPlacementGroupId; + + /* + * KubeletConfig specifies the configuration of kubelet on agent nodes. + */ + @JsonProperty(value = "properties.kubeletConfig") + private KubeletConfig kubeletConfig; + + /* + * LinuxOSConfig specifies the OS configuration of linux agent nodes. + */ + @JsonProperty(value = "properties.linuxOSConfig") + private LinuxOSConfig linuxOSConfig; + + /* + * Whether to enable EncryptionAtHost + */ + @JsonProperty(value = "properties.enableEncryptionAtHost") + private Boolean enableEncryptionAtHost; + + /* + * Whether to use FIPS enabled OS + */ + @JsonProperty(value = "properties.enableFIPS") + private Boolean enableFips; + + /* + * GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g + * and MIG7g. + */ + @JsonProperty(value = "properties.gpuInstanceProfile") + private GpuInstanceProfile gpuInstanceProfile; + + /* + * 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; + + /** + * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (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 100 (inclusive) for user pools and in the range of 1 to 100 (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) { + this.count = count; + return this; + } + + /** + * Get the vmSize property: Size of agent VMs. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: Size of agent VMs. + * + * @param vmSize the vmSize value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner 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 this + * 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 this + * 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) { + this.osDiskSizeGB = osDiskSizeGB; + return this; + } + + /** + * Get the osDiskType property: OS disk type to be used for machines in a given agent pool. Allowed values are + * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a + * cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after + * creation. + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set the osDiskType property: OS disk type to be used for machines in a given agent pool. Allowed values are + * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a + * cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after + * creation. + * + * @param osDiskType the osDiskType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsDiskType(OSDiskType osDiskType) { + this.osDiskType = osDiskType; + return this; + } + + /** + * Get the kubeletDiskType property: KubeletDiskType determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the OS disk + * for data. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.kubeletDiskType; + } + + /** + * Set the kubeletDiskType property: KubeletDiskType determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the OS disk + * for data. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.kubeletDiskType = kubeletDiskType; + return this; + } + + /** + * Get the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.vnetSubnetId; + } + + /** + * Set the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVnetSubnetId(String vnetSubnetId) { + this.vnetSubnetId = vnetSubnetId; + return this; + } + + /** + * Get the podSubnetId property: Pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.podSubnetId; + } + + /** + * Set the podSubnetId property: Pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @param podSubnetId the podSubnetId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withPodSubnetId(String podSubnetId) { + this.podSubnetId = podSubnetId; + return this; + } + + /** + * Get the maxPods property: Maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set the maxPods property: 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) { + 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 AgentPoolInner object itself. + */ + public AgentPoolInner withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the osSku property: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. + * + * @return the osSku value. + */ + public Ossku osSku() { + return this.osSku; + } + + /** + * Set the osSku property: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. + * + * @param osSku the osSku value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsSku(Ossku osSku) { + this.osSku = osSku; + return this; + } + + /** + * Get the maxCount property: Maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + public Integer maxCount() { + return this.maxCount; + } + + /** + * Set the maxCount property: Maximum number of nodes for auto-scaling. + * + * @param maxCount the maxCount value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMaxCount(Integer maxCount) { + this.maxCount = maxCount; + return this; + } + + /** + * Get the minCount property: Minimum number of nodes for auto-scaling. + * + * @return the minCount value. + */ + public Integer minCount() { + return this.minCount; + } + + /** + * Set the minCount property: Minimum number of nodes for auto-scaling. + * + * @param minCount the minCount value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner 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 AgentPoolInner object itself. + */ + public AgentPoolInner withEnableAutoScaling(Boolean enableAutoScaling) { + this.enableAutoScaling = enableAutoScaling; + return this; + } + + /** + * Get the typePropertiesType property: AgentPoolType represents types of an agent pool. + * + * @return the typePropertiesType value. + */ + public AgentPoolType typePropertiesType() { + return this.typePropertiesType; + } + + /** + * Set the typePropertiesType property: AgentPoolType represents types of an agent pool. + * + * @param typePropertiesType the typePropertiesType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withTypePropertiesType(AgentPoolType typePropertiesType) { + this.typePropertiesType = typePropertiesType; + return this; + } + + /** + * Get the mode property: AgentPoolMode represents mode of an agent pool. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set the mode property: AgentPoolMode represents mode of an agent pool. + * + * @param mode the mode value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMode(AgentPoolMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the orchestratorVersion property: Version of orchestrator specified when creating the managed cluster. + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: Version of orchestrator specified when creating the managed cluster. + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the nodeImageVersion property: 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 AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + this.upgradeSettings = upgradeSettings; + 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.provisioningState; + } + + /** + * Get the powerState property: Describes whether the Agent Pool is Running or Stopped. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * Get the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * + * @return the availabilityZones value. + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * + * @param availabilityZones the availabilityZones value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withAvailabilityZones(List availabilityZones) { + this.availabilityZones = availabilityZones; + return this; + } + + /** + * Get the enableNodePublicIp property: Enable public IP for nodes. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.enableNodePublicIp; + } + + /** + * Set the enableNodePublicIp property: Enable public IP for nodes. + * + * @param enableNodePublicIp the enableNodePublicIp value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableNodePublicIp(Boolean enableNodePublicIp) { + this.enableNodePublicIp = enableNodePublicIp; + return this; + } + + /** + * Get the nodePublicIpPrefixId property: Public IP Prefix ID. VM nodes use IPs assigned from this Public IP Prefix. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.nodePublicIpPrefixId; + } + + /** + * Set the nodePublicIpPrefixId property: Public IP Prefix ID. VM nodes use IPs assigned from this Public IP Prefix. + * + * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + this.nodePublicIpPrefixId = nodePublicIpPrefixId; + return this; + } + + /** + * Get the scaleSetPriority property: ScaleSetPriority to be used to specify virtual machine scale set priority. + * Default to regular. + * + * @return the scaleSetPriority value. + */ + public ScaleSetPriority scaleSetPriority() { + return this.scaleSetPriority; + } + + /** + * Set the scaleSetPriority property: ScaleSetPriority to be used to specify virtual machine scale set priority. + * Default to regular. + * + * @param scaleSetPriority the scaleSetPriority value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + this.scaleSetPriority = scaleSetPriority; + return this; + } + + /** + * Get the scaleSetEvictionPolicy property: ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to Delete. + * + * @return the scaleSetEvictionPolicy value. + */ + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.scaleSetEvictionPolicy; + } + + /** + * Set the scaleSetEvictionPolicy property: ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to Delete. + * + * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + this.scaleSetEvictionPolicy = scaleSetEvictionPolicy; + return this; + } + + /** + * Get the spotMaxPrice property: SpotMaxPrice to be used to specify the maximum price you are willing to pay in US + * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to + * on-demand. + * + * @return the spotMaxPrice value. + */ + public Float spotMaxPrice() { + return this.spotMaxPrice; + } + + /** + * Set the spotMaxPrice property: SpotMaxPrice to be used to specify the maximum price you are willing to pay in US + * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to + * on-demand. + * + * @param spotMaxPrice the spotMaxPrice value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withSpotMaxPrice(Float spotMaxPrice) { + this.spotMaxPrice = spotMaxPrice; + return this; + } + + /** + * Get the tags property: Agent pool 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: Agent pool 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) { + this.tags = tags; + return this; + } + + /** + * Get the nodeLabels property: Agent pool 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: Agent pool 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) { + this.nodeLabels = nodeLabels; + return this; + } + + /** + * Get the nodeTaints property: 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: 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) { + 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 AgentPoolInner object itself. + */ + public AgentPoolInner withProximityPlacementGroupId(String proximityPlacementGroupId) { + this.proximityPlacementGroupId = proximityPlacementGroupId; + return this; + } + + /** + * Get the kubeletConfig property: KubeletConfig specifies the configuration of kubelet on agent nodes. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.kubeletConfig; + } + + /** + * Set the kubeletConfig property: KubeletConfig specifies the configuration of kubelet on agent nodes. + * + * @param kubeletConfig the kubeletConfig value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withKubeletConfig(KubeletConfig kubeletConfig) { + this.kubeletConfig = kubeletConfig; + return this; + } + + /** + * Get the linuxOSConfig property: LinuxOSConfig specifies the OS configuration of linux agent nodes. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.linuxOSConfig; + } + + /** + * Set the linuxOSConfig property: LinuxOSConfig specifies the OS configuration of linux agent nodes. + * + * @param linuxOSConfig the linuxOSConfig value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + this.linuxOSConfig = linuxOSConfig; + return this; + } + + /** + * Get the enableEncryptionAtHost property: Whether to enable EncryptionAtHost. + * + * @return the enableEncryptionAtHost value. + */ + public Boolean enableEncryptionAtHost() { + return this.enableEncryptionAtHost; + } + + /** + * Set the enableEncryptionAtHost property: Whether to enable EncryptionAtHost. + * + * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + this.enableEncryptionAtHost = enableEncryptionAtHost; + return this; + } + + /** + * Get the enableFips property: Whether to use FIPS enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Set the enableFips property: Whether to use FIPS enabled OS. + * + * @param enableFips the enableFips value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner 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. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + * + * @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. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.gpuInstanceProfile = gpuInstanceProfile; + return this; + } + + /** + * 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; + } + + /** + * 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(); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolUpgradeProfileInner.java new file mode 100644 index 0000000000000..69d67b789b310 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/AgentPoolUpgradeProfileInner.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.generated.models.OSType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available upgrades for an agent pool. */ +@JsonFlatten +@Fluent +public class AgentPoolUpgradeProfileInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AgentPoolUpgradeProfileInner.class); + + /* + * Id of the agent pool upgrade profile. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Name of the agent pool upgrade profile. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Type of the agent pool upgrade profile. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Kubernetes version (major, minor, patch). + */ + @JsonProperty(value = "properties.kubernetesVersion", required = true) + private String kubernetesVersion; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux. + */ + @JsonProperty(value = "properties.osType", required = true) + private OSType osType; + + /* + * List of orchestrator types and versions available for upgrade. + */ + @JsonProperty(value = "properties.upgrades") + private List upgrades; + + /* + * LatestNodeImageVersion is the latest AKS supported node image version. + */ + @JsonProperty(value = "properties.latestNodeImageVersion") + private String latestNodeImageVersion; + + /** + * Get the id property: Id of the agent pool upgrade profile. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the agent pool upgrade profile. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Type of the agent pool upgrade profile. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the kubernetesVersion property: Kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: Kubernetes version (major, minor, patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner 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 AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner 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 AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Get the latestNodeImageVersion property: LatestNodeImageVersion is the latest AKS supported node image version. + * + * @return the latestNodeImageVersion value. + */ + public String latestNodeImageVersion() { + return this.latestNodeImageVersion; + } + + /** + * Set the latestNodeImageVersion property: LatestNodeImageVersion is the latest AKS supported node image version. + * + * @param latestNodeImageVersion the latestNodeImageVersion value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner 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 AgentPoolUpgradeProfileInner")); + } + if (osType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property osType in model AgentPoolUpgradeProfileInner")); + } + if (upgrades() != null) { + upgrades().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/CredentialResultsInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/CredentialResultsInner.java new file mode 100644 index 0000000000000..79b866a289459 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.CredentialResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of credential result response. */ +@Immutable +public final class CredentialResultsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CredentialResultsInner.class); + + /* + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "kubeconfigs", access = JsonProperty.Access.WRITE_ONLY) + private List kubeconfigs; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/MaintenanceConfigurationInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/MaintenanceConfigurationInner.java new file mode 100644 index 0000000000000..9112627c77dc0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/MaintenanceConfigurationInner.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SubResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservice.generated.models.TimeSpan; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** maintenance configuration. */ +@JsonFlatten +@Fluent +public class MaintenanceConfigurationInner extends SubResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceConfigurationInner.class); + + /* + * The system meta data relating to this resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Weekday time slots allowed to upgrade. + */ + @JsonProperty(value = "properties.timeInWeek") + private List timeInWeek; + + /* + * Time slots on which upgrade is not allowed. + */ + @JsonProperty(value = "properties.notAllowedTime") + private List notAllowedTime; + + /* + * 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; + + /** + * Get the systemData property: The system meta data relating to this resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the timeInWeek property: Weekday time slots allowed to upgrade. + * + * @return the timeInWeek value. + */ + public List timeInWeek() { + return this.timeInWeek; + } + + /** + * Set the timeInWeek property: Weekday time slots allowed to upgrade. + * + * @param timeInWeek the timeInWeek value to set. + * @return the MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner 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 MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner withNotAllowedTime(List notAllowedTime) { + this.notAllowedTime = notAllowedTime; + return this; + } + + /** + * 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; + } + + /** + * 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()); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterAccessProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterAccessProfileInner.java new file mode 100644 index 0000000000000..f19a547270369 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterAccessProfileInner.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.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Managed cluster Access Profile. */ +@JsonFlatten +@Fluent +public class ManagedClusterAccessProfileInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterAccessProfileInner.class); + + /* + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "properties.kubeConfig") + private byte[] kubeConfig; + + /** + * 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 ManagedClusterAccessProfileInner object itself. + */ + public ManagedClusterAccessProfileInner withKubeConfig(byte[] kubeConfig) { + this.kubeConfig = CoreUtils.clone(kubeConfig); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAccessProfileInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAccessProfileInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterInner.java new file mode 100644 index 0000000000000..24412f4febc20 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterInner.java @@ -0,0 +1,888 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservice.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.generated.models.ExtendedLocation; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterPropertiesIdentityProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservice.generated.models.PowerState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Managed cluster. */ +@JsonFlatten +@Fluent +public class ManagedClusterInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterInner.class); + + /* + * 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; + + /* + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Represents the Power State of the cluster + */ + @JsonProperty(value = "properties.powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /* + * The max number of agent pools for the managed cluster. + */ + @JsonProperty(value = "properties.maxAgentPools", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxAgentPools; + + /* + * Version of Kubernetes specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.kubernetesVersion") + private String kubernetesVersion; + + /* + * DNS prefix specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.dnsPrefix") + private String dnsPrefix; + + /* + * FQDN subdomain specified when creating private cluster with custom + * private dns zone. + */ + @JsonProperty(value = "properties.fqdnSubdomain") + private String fqdnSubdomain; + + /* + * FQDN for the master pool. + */ + @JsonProperty(value = "properties.fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * FQDN of private cluster. + */ + @JsonProperty(value = "properties.privateFQDN", access = JsonProperty.Access.WRITE_ONLY) + private String privateFqdn; + + /* + * FQDN for the master pool which used by proxy config. + */ + @JsonProperty(value = "properties.azurePortalFQDN", access = JsonProperty.Access.WRITE_ONLY) + private String azurePortalFqdn; + + /* + * Properties of the agent pool. + */ + @JsonProperty(value = "properties.agentPoolProfiles") + private List agentPoolProfiles; + + /* + * Profile for Linux VMs in the container service cluster. + */ + @JsonProperty(value = "properties.linuxProfile") + private ContainerServiceLinuxProfile linuxProfile; + + /* + * Profile for Windows VMs in the container service cluster. + */ + @JsonProperty(value = "properties.windowsProfile") + private ManagedClusterWindowsProfile windowsProfile; + + /* + * Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + */ + @JsonProperty(value = "properties.servicePrincipalProfile") + private ManagedClusterServicePrincipalProfile servicePrincipalProfile; + + /* + * Profile of managed cluster add-on. + */ + @JsonProperty(value = "properties.addonProfiles") + private Map addonProfiles; + + /* + * Profile of managed cluster pod identity. + */ + @JsonProperty(value = "properties.podIdentityProfile") + private ManagedClusterPodIdentityProfile podIdentityProfile; + + /* + * Name of the resource group containing agent pool nodes. + */ + @JsonProperty(value = "properties.nodeResourceGroup") + private String nodeResourceGroup; + + /* + * Whether to enable Kubernetes Role-Based Access Control. + */ + @JsonProperty(value = "properties.enableRBAC") + private Boolean enableRbac; + + /* + * (DEPRECATING) Whether to enable Kubernetes pod security policy + * (preview). This feature is set for removal on October 15th, 2020. Learn + * more at aka.ms/aks/azpodpolicy. + */ + @JsonProperty(value = "properties.enablePodSecurityPolicy") + private Boolean enablePodSecurityPolicy; + + /* + * Profile of network configuration. + */ + @JsonProperty(value = "properties.networkProfile") + private ContainerServiceNetworkProfile networkProfile; + + /* + * Profile of Azure Active Directory configuration. + */ + @JsonProperty(value = "properties.aadProfile") + private ManagedClusterAadProfile aadProfile; + + /* + * Profile of auto upgrade configuration. + */ + @JsonProperty(value = "properties.autoUpgradeProfile") + private ManagedClusterAutoUpgradeProfile autoUpgradeProfile; + + /* + * Parameters to be applied to the cluster-autoscaler when enabled + */ + @JsonProperty(value = "properties.autoScalerProfile") + private ManagedClusterPropertiesAutoScalerProfile autoScalerProfile; + + /* + * Access profile for managed cluster API server. + */ + @JsonProperty(value = "properties.apiServerAccessProfile") + private ManagedClusterApiServerAccessProfile apiServerAccessProfile; + + /* + * ResourceId of the disk encryption set to use for enabling encryption at + * rest. + */ + @JsonProperty(value = "properties.diskEncryptionSetID") + private String diskEncryptionSetId; + + /* + * Identities associated with the cluster. + */ + @JsonProperty(value = "properties.identityProfile") + private Map identityProfile; + + /* + * Private link resources associated with the cluster. + */ + @JsonProperty(value = "properties.privateLinkResources") + private List privateLinkResources; + + /* + * If set to true, getting static credential will be disabled for this + * cluster. Expected to only be used for AAD clusters. + */ + @JsonProperty(value = "properties.disableLocalAccounts") + private Boolean disableLocalAccounts; + + /* + * Configurations for provisioning the cluster with HTTP proxy servers. + */ + @JsonProperty(value = "properties.httpProxyConfig") + private ManagedClusterHttpProxyConfig httpProxyConfig; + + /** + * 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 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 powerState property: Represents 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: Version of Kubernetes specified when creating the managed cluster. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: Version of Kubernetes specified when creating the managed cluster. + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the dnsPrefix property: DNS prefix specified when creating the managed cluster. + * + * @return the dnsPrefix value. + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set the dnsPrefix property: DNS prefix specified when creating the managed cluster. + * + * @param dnsPrefix the dnsPrefix value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get the fqdnSubdomain property: FQDN subdomain specified when creating private cluster with custom private dns + * zone. + * + * @return the fqdnSubdomain value. + */ + public String fqdnSubdomain() { + return this.fqdnSubdomain; + } + + /** + * Set the fqdnSubdomain property: FQDN subdomain specified when creating private cluster with custom private dns + * zone. + * + * @param fqdnSubdomain the fqdnSubdomain value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withFqdnSubdomain(String fqdnSubdomain) { + this.fqdnSubdomain = fqdnSubdomain; + return this; + } + + /** + * Get the fqdn property: FQDN for the master pool. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the privateFqdn property: FQDN of private cluster. + * + * @return the privateFqdn value. + */ + public String privateFqdn() { + return this.privateFqdn; + } + + /** + * Get the azurePortalFqdn property: FQDN for the master pool which used by proxy config. + * + * @return the azurePortalFqdn value. + */ + public String azurePortalFqdn() { + return this.azurePortalFqdn; + } + + /** + * Get the agentPoolProfiles property: Properties of the agent pool. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles property: Properties of the agent pool. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get the linuxProfile property: Profile for Linux VMs in the container service cluster. + * + * @return the linuxProfile value. + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set the linuxProfile property: Profile for Linux VMs in the container service cluster. + * + * @param linuxProfile the linuxProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get the windowsProfile property: Profile for Windows VMs in the container service cluster. + * + * @return the windowsProfile value. + */ + public ManagedClusterWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile property: Profile for Windows VMs in the container service cluster. + * + * @param windowsProfile the windowsProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner 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 ManagedClusterInner object itself. + */ + public ManagedClusterInner withServicePrincipalProfile( + ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + this.servicePrincipalProfile = servicePrincipalProfile; + return this; + } + + /** + * Get the addonProfiles property: Profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + public Map addonProfiles() { + return this.addonProfiles; + } + + /** + * Set the addonProfiles property: Profile of managed cluster add-on. + * + * @param addonProfiles the addonProfiles value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAddonProfiles(Map addonProfiles) { + this.addonProfiles = addonProfiles; + return this; + } + + /** + * Get the podIdentityProfile property: Profile of managed cluster pod identity. + * + * @return the podIdentityProfile value. + */ + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.podIdentityProfile; + } + + /** + * Set the podIdentityProfile property: Profile of managed cluster pod identity. + * + * @param podIdentityProfile the podIdentityProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + this.podIdentityProfile = podIdentityProfile; + return this; + } + + /** + * Get the nodeResourceGroup property: Name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value. + */ + public String nodeResourceGroup() { + return this.nodeResourceGroup; + } + + /** + * Set the nodeResourceGroup property: 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) { + 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 ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnableRbac(Boolean enableRbac) { + this.enableRbac = enableRbac; + return this; + } + + /** + * Get the enablePodSecurityPolicy property: (DEPRECATING) Whether to enable Kubernetes pod security policy + * (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + * + * @return the enablePodSecurityPolicy value. + */ + public Boolean enablePodSecurityPolicy() { + return this.enablePodSecurityPolicy; + } + + /** + * Set the enablePodSecurityPolicy property: (DEPRECATING) Whether to enable Kubernetes pod security policy + * (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + * + * @param enablePodSecurityPolicy the enablePodSecurityPolicy value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + this.enablePodSecurityPolicy = enablePodSecurityPolicy; + return this; + } + + /** + * Get the networkProfile property: Profile of network configuration. + * + * @return the networkProfile value. + */ + public ContainerServiceNetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Profile of network configuration. + * + * @param networkProfile the networkProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the aadProfile property: Profile of Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + public ManagedClusterAadProfile aadProfile() { + return this.aadProfile; + } + + /** + * Set the aadProfile property: Profile of Azure Active Directory configuration. + * + * @param aadProfile the aadProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAadProfile(ManagedClusterAadProfile aadProfile) { + this.aadProfile = aadProfile; + return this; + } + + /** + * Get the autoUpgradeProfile property: Profile of auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.autoUpgradeProfile; + } + + /** + * Set the autoUpgradeProfile property: Profile of auto upgrade configuration. + * + * @param autoUpgradeProfile the autoUpgradeProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + this.autoUpgradeProfile = autoUpgradeProfile; + 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 ManagedClusterInner object itself. + */ + public ManagedClusterInner withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + this.autoScalerProfile = autoScalerProfile; + return this; + } + + /** + * Get the apiServerAccessProfile property: Access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { + return this.apiServerAccessProfile; + } + + /** + * Set the apiServerAccessProfile property: Access profile for managed cluster API server. + * + * @param apiServerAccessProfile the apiServerAccessProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { + this.apiServerAccessProfile = apiServerAccessProfile; + return this; + } + + /** + * Get the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at + * rest. + * + * @return the diskEncryptionSetId value. + */ + public String diskEncryptionSetId() { + return this.diskEncryptionSetId; + } + + /** + * Set the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at + * rest. + * + * @param diskEncryptionSetId the diskEncryptionSetId value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner 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 ManagedClusterInner object itself. + */ + public ManagedClusterInner 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 ManagedClusterInner object itself. + */ + public ManagedClusterInner withPrivateLinkResources(List privateLinkResources) { + this.privateLinkResources = privateLinkResources; + return this; + } + + /** + * Get the disableLocalAccounts property: If set to true, getting static credential will be disabled for this + * cluster. Expected to only be used for AAD clusters. + * + * @return the disableLocalAccounts value. + */ + public Boolean disableLocalAccounts() { + return this.disableLocalAccounts; + } + + /** + * Set the disableLocalAccounts property: If set to true, getting static credential will be disabled for this + * cluster. Expected to only be used for AAD clusters. + * + * @param disableLocalAccounts the disableLocalAccounts value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner 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 ManagedClusterInner object itself. + */ + public ManagedClusterInner withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { + this.httpProxyConfig = httpProxyConfig; + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * 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 (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 (networkProfile() != null) { + networkProfile().validate(); + } + if (aadProfile() != null) { + aadProfile().validate(); + } + if (autoUpgradeProfile() != null) { + autoUpgradeProfile().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(); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterUpgradeProfileInner.java new file mode 100644 index 0000000000000..e9e79acaeb971 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/ManagedClusterUpgradeProfileInner.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterPoolUpgradeProfile; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available upgrades for compute pools. */ +@JsonFlatten +@Fluent +public class ManagedClusterUpgradeProfileInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterUpgradeProfileInner.class); + + /* + * Id of upgrade profile. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Name of upgrade profile. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Type of upgrade profile. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The list of available upgrade versions for the control plane. + */ + @JsonProperty(value = "properties.controlPlaneProfile", required = true) + private ManagedClusterPoolUpgradeProfile controlPlaneProfile; + + /* + * The list of available upgrade versions for agent pools. + */ + @JsonProperty(value = "properties.agentPoolProfiles", required = true) + private List agentPoolProfiles; + + /** + * Get the id property: Id of upgrade profile. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of upgrade profile. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Type of upgrade profile. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * 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 ManagedClusterUpgradeProfileInner object itself. + */ + public ManagedClusterUpgradeProfileInner 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 ManagedClusterUpgradeProfileInner object itself. + */ + public ManagedClusterUpgradeProfileInner 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 ManagedClusterUpgradeProfileInner")); + } else { + controlPlaneProfile().validate(); + } + if (agentPoolProfiles() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property agentPoolProfiles in model ManagedClusterUpgradeProfileInner")); + } else { + agentPoolProfiles().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/OSOptionProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/OSOptionProfileInner.java new file mode 100644 index 0000000000000..fa35be30c7fe2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/OSOptionProfileInner.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.OSOptionProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The OS option profile. */ +@JsonFlatten +@Fluent +public class OSOptionProfileInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OSOptionProfileInner.class); + + /* + * Id of the OS option profile. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Name of the OS option profile. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Type of the OS option profile. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The list of OS option properties. + */ + @JsonProperty(value = "properties.osOptionPropertyList", required = true) + private List osOptionPropertyList; + + /** + * Get the id property: Id of the OS option profile. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the OS option profile. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Type of the OS option profile. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the osOptionPropertyList property: The list of OS option properties. + * + * @return the osOptionPropertyList value. + */ + public List osOptionPropertyList() { + return this.osOptionPropertyList; + } + + /** + * Set the osOptionPropertyList property: The list of OS option properties. + * + * @param osOptionPropertyList the osOptionPropertyList value to set. + * @return the OSOptionProfileInner object itself. + */ + public OSOptionProfileInner 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 OSOptionProfileInner")); + } else { + osOptionPropertyList().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/OperationValueInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/OperationValueInner.java new file mode 100644 index 0000000000000..10de5bd3b00d6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/OperationValueInner.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the properties of a Compute Operation value. */ +@JsonFlatten +@Immutable +public class OperationValueInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationValueInner.class); + + /* + * The origin of the compute operation. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private String origin; + + /* + * The name of the compute operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The display name of the compute operation. + */ + @JsonProperty(value = "display.operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The display name of the resource the operation applies to. + */ + @JsonProperty(value = "display.resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The description of the operation. + */ + @JsonProperty(value = "display.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * The resource provider for the operation. + */ + @JsonProperty(value = "display.provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Get the origin property: The origin of the compute operation. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Get the name property: The name of the compute operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the operation property: The display name of the compute 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateEndpointConnectionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 0000000000000..1954dc5d33cad --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservice.generated.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A private endpoint connection. */ +@JsonFlatten +@Fluent +public class PrivateEndpointConnectionInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); + + /* + * The current provisioning state. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /* + * The resource of private endpoint. + */ + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * 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 PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner 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 PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner 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) { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateEndpointConnectionListResultInner.java new file mode 100644 index 0000000000000..c822c4f716f13 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of private endpoint connections. */ +@Fluent +public final class PrivateEndpointConnectionListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResultInner.class); + + /* + * The collection value. + */ + @JsonProperty(value = "value") + private List value; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateLinkResourceInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 0000000000000..1e2da7169d26e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A private link resource. */ +@Fluent +public final class PrivateLinkResourceInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); + + /* + * 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; + + /* + * 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; + + /** + * 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: RequiredMembers of the resource. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Set the requiredMembers property: 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateLinkResourcesListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/PrivateLinkResourcesListResultInner.java new file mode 100644 index 0000000000000..98787f879dc4f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of private link resources. */ +@Fluent +public final class PrivateLinkResourcesListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesListResultInner.class); + + /* + * The collection value. + */ + @JsonProperty(value = "value") + private List value; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/RunCommandResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/RunCommandResultInner.java new file mode 100644 index 0000000000000..fd54ab362f883 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/RunCommandResultInner.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.containerservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** run command result. */ +@JsonFlatten +@Immutable +public class RunCommandResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RunCommandResultInner.class); + + /* + * command id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * provisioning State + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * exit code of the command + */ + @JsonProperty(value = "properties.exitCode", access = JsonProperty.Access.WRITE_ONLY) + private Integer exitCode; + + /* + * time when the command started. + */ + @JsonProperty(value = "properties.startedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startedAt; + + /* + * time when the command finished. + */ + @JsonProperty(value = "properties.finishedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime finishedAt; + + /* + * command output. + */ + @JsonProperty(value = "properties.logs", access = JsonProperty.Access.WRITE_ONLY) + private String logs; + + /* + * explain why provisioningState is set to failed (if so). + */ + @JsonProperty(value = "properties.reason", access = JsonProperty.Access.WRITE_ONLY) + private String reason; + + /** + * Get the id property: command id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the provisioningState property: provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the exitCode property: exit code of the command. + * + * @return the exitCode value. + */ + public Integer exitCode() { + return this.exitCode; + } + + /** + * Get the startedAt property: time when the command started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.startedAt; + } + + /** + * Get the finishedAt property: time when the command finished. + * + * @return the finishedAt value. + */ + public OffsetDateTime finishedAt() { + return this.finishedAt; + } + + /** + * Get the logs property: command output. + * + * @return the logs value. + */ + public String logs() { + return this.logs; + } + + /** + * Get the reason property: explain 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/models/package-info.java new file mode 100644 index 0000000000000..e6d443bef7d93 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/fluent/package-info.java new file mode 100644 index 0000000000000..383b8e3c63277 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolAvailableVersionsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolAvailableVersionsImpl.java new file mode 100644 index 0000000000000..57d97bd1c377a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolAvailableVersionsImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolAvailableVersions; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + AgentPoolAvailableVersionsImpl( + AgentPoolAvailableVersionsInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolImpl.java new file mode 100644 index 0000000000000..b444e4269755a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolImpl.java @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservice.generated.models.AgentPool; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservice.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservice.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservice.generated.models.KubeletDiskType; +import com.azure.resourcemanager.containerservice.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservice.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservice.generated.models.OSType; +import com.azure.resourcemanager.containerservice.generated.models.Ossku; +import com.azure.resourcemanager.containerservice.generated.models.PowerState; +import com.azure.resourcemanager.containerservice.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservice.generated.models.ScaleSetPriority; +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.containerservice.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + 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 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 AgentPoolType typePropertiesType() { + return this.innerModel().typePropertiesType(); + } + + public AgentPoolMode mode() { + return this.innerModel().mode(); + } + + public String orchestratorVersion() { + return this.innerModel().orchestratorVersion(); + } + + 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 enableFips() { + return this.innerModel().enableFips(); + } + + public GpuInstanceProfile gpuInstanceProfile() { + return this.innerModel().gpuInstanceProfile(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public AgentPoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservice.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.containerservice.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.containerservice.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 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 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 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 withEnableFips(Boolean enableFips) { + this.innerModel().withEnableFips(enableFips); + return this; + } + + public AgentPoolImpl withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.innerModel().withGpuInstanceProfile(gpuInstanceProfile); + return this; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolUpgradeProfileImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolUpgradeProfileImpl.java new file mode 100644 index 0000000000000..d394a5ce03402 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolUpgradeProfileImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolUpgradeProfile; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + AgentPoolUpgradeProfileImpl( + AgentPoolUpgradeProfileInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolsClientImpl.java new file mode 100644 index 0000000000000..82acd0703c1b5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolsClientImpl.java @@ -0,0 +1,1740 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.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 { + private final ClientLogger logger = new ClientLogger(AgentPoolsClientImpl.class); + + /** 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") + private interface AgentPoolsService { + @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); + } + + /** + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName) { + return getAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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 agent Pool. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + 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, Context.NONE); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SyncPoller, AgentPoolInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + return 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AgentPoolInner> beginCreateOrUpdate( + String resourceGroupName, + String resourceName, + String agentPoolName, + AgentPoolInner parameters, + Context context) { + return 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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 agent Pool. + */ + @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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters Parameters supplied to the Create or Update an agent pool 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 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 the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, Context.NONE); + } + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String agentPoolName) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, context).getSyncPoller(); + } + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getUpgradeProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getUpgradeProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getUpgradeProfileAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolUpgradeProfileInner getUpgradeProfile( + String resourceGroupName, String resourceName, String agentPoolName) { + return getUpgradeProfileAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getAvailableAgentPoolVersions( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getAvailableAgentPoolVersions( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAvailableAgentPoolVersionsAsync( + String resourceGroupName, String resourceName) { + return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions( + String resourceGroupName, String resourceName) { + return getAvailableAgentPoolVersionsAsync(resourceGroupName, resourceName).block(); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAvailableAgentPoolVersionsWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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) + 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .upgradeNodeImageVersion( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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) + 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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .upgradeNodeImageVersion( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + agentPoolName, + accept, + context); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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) + 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, Context.NONE); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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) + 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); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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 SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName) { + return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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 SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context) + .getSyncPoller(); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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) + private Mono upgradeNodeImageVersionAsync( + String resourceGroupName, String resourceName, String agentPoolName) { + return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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) + private Mono upgradeNodeImageVersionAsync( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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(); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Agent Pools operation. + */ + @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolsImpl.java new file mode 100644 index 0000000000000..945f472167288 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/AgentPoolsImpl.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.generated.models.AgentPool; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolAvailableVersions; +import com.azure.resourcemanager.containerservice.generated.models.AgentPoolUpgradeProfile; +import com.azure.resourcemanager.containerservice.generated.models.AgentPools; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class AgentPoolsImpl implements AgentPools { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AgentPoolsImpl.class); + + private final AgentPoolsClient innerClient; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + public AgentPoolsImpl( + AgentPoolsClient innerClient, + com.azure.resourcemanager.containerservice.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 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 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 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 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 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 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 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 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 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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } + + public AgentPoolImpl define(String name) { + return new AgentPoolImpl(name, this.manager()); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ContainerServiceManagementClientBuilder.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ContainerServiceManagementClientBuilder.java new file mode 100644 index 0000000000000..be257665e16f6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ContainerServiceManagementClientBuilder.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.containerservice.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.CookiePolicy; +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 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 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 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() { + if (endpoint == null) { + this.endpoint = "https://management.azure.com"; + } + if (environment == null) { + this.environment = AzureEnvironment.AZURE; + } + if (defaultPollInterval == null) { + this.defaultPollInterval = Duration.ofSeconds(30); + } + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); + } + ContainerServiceManagementClientImpl client = + new ContainerServiceManagementClientImpl( + pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + return client; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ContainerServiceManagementClientImpl.java new file mode 100644 index 0000000000000..18778ea6602c1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ContainerServiceManagementClientImpl.java @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.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.containerservice.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservice.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservice.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservice.generated.fluent.ResolvePrivateLinkServiceIdsClient; +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 java.util.Map; +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 { + private final ClientLogger logger = new ClientLogger(ContainerServiceManagementClientImpl.class); + + /** + * 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; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + 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 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; + } + + /** + * 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.apiVersion = "2021-03-01"; + 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); + } + + /** + * 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) { + for (Map.Entry entry : this.getContext().getValues().entrySet()) { + context = context.addData(entry.getKey(), entry.getValue()); + } + return 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)); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/CredentialResultsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/CredentialResultsImpl.java new file mode 100644 index 0000000000000..15d36b816b79a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/CredentialResultsImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.generated.models.CredentialResult; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + CredentialResultsImpl( + CredentialResultsInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationImpl.java new file mode 100644 index 0000000000000..65db44d0dc7c9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationImpl.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservice.generated.models.MaintenanceConfiguration; +import com.azure.resourcemanager.containerservice.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + 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 String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public MaintenanceConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservice.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.containerservice.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.containerservice.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; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationsClientImpl.java new file mode 100644 index 0000000000000..b83bf4295de11 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationsClientImpl.java @@ -0,0 +1,910 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservice.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 { + private final ClientLogger logger = new ClientLogger(MaintenanceConfigurationsClientImpl.class); + + /** 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") + private 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}) + @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. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByManagedCluster( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @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. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster( + String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + accept, + context); + } + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String resourceName, String configName) { + return getWithResponseAsync(resourceGroupName, resourceName, configName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceConfigurationInner get(String resourceGroupName, String resourceName, String configName) { + return getAsync(resourceGroupName, resourceName, configName).block(); + } + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String configName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, configName, context).block(); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters Parameters supplied to the Create or Update a default 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 maintenance configuration. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters Parameters supplied to the Create or Update a default 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 maintenance configuration. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters Parameters supplied to the Create or Update a default 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 maintenance configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, String configName, MaintenanceConfigurationInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters Parameters supplied to the Create or Update a default 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 maintenance configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceConfigurationInner createOrUpdate( + String resourceGroupName, String resourceName, String configName, MaintenanceConfigurationInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, configName, parameters).block(); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. + * @param parameters Parameters supplied to the Create or Update a default 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 maintenance configuration. + */ + @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(); + } + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + configName, + accept, + context); + } + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String configName) { + return deleteWithResponseAsync(resourceGroupName, resourceName, configName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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) { + deleteAsync(resourceGroupName, resourceName, configName).block(); + } + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String configName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, configName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List maintenance configurations operation. + */ + @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 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. + */ + @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationsImpl.java new file mode 100644 index 0000000000000..ab7b89ce6dc24 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/MaintenanceConfigurationsImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservice.generated.models.MaintenanceConfiguration; +import com.azure.resourcemanager.containerservice.generated.models.MaintenanceConfigurations; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class MaintenanceConfigurationsImpl implements MaintenanceConfigurations { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceConfigurationsImpl.class); + + private final MaintenanceConfigurationsClient innerClient; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + public MaintenanceConfigurationsImpl( + MaintenanceConfigurationsClient innerClient, + com.azure.resourcemanager.containerservice.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 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 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 void delete(String resourceGroupName, String resourceName, String configName) { + this.serviceClient().delete(resourceGroupName, resourceName, configName); + } + + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String configName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, configName, context); + } + + 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).getValue(); + } + + 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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } + + public MaintenanceConfigurationImpl define(String name) { + return new MaintenanceConfigurationImpl(name, this.manager()); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterAccessProfileImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterAccessProfileImpl.java new file mode 100644 index 0000000000000..fe8b64679bb2a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterAccessProfileImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + ManagedClusterAccessProfileImpl( + ManagedClusterAccessProfileInner innerObject, + com.azure.resourcemanager.containerservice.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 byte[] kubeConfig() { + return this.innerModel().kubeConfig(); + } + + public ManagedClusterAccessProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterImpl.java new file mode 100644 index 0000000000000..fc36b5716a49a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterImpl.java @@ -0,0 +1,553 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservice.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservice.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.generated.models.CredentialResults; +import com.azure.resourcemanager.containerservice.generated.models.ExtendedLocation; +import com.azure.resourcemanager.containerservice.generated.models.ManagedCluster; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterPropertiesIdentityProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservice.generated.models.PowerState; +import com.azure.resourcemanager.containerservice.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservice.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservice.generated.models.RunCommandResult; +import com.azure.resourcemanager.containerservice.generated.models.TagsObject; +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.containerservice.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 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 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 String nodeResourceGroup() { + return this.innerModel().nodeResourceGroup(); + } + + public Boolean enableRbac() { + return this.innerModel().enableRbac(); + } + + 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 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 Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public ManagedClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservice.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.containerservice.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.containerservice.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 CredentialResults listClusterAdminCredentials() { + return serviceManager.managedClusters().listClusterAdminCredentials(resourceGroupName, resourceName); + } + + public Response listClusterAdminCredentialsWithResponse(Context context) { + return serviceManager + .managedClusters() + .listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, context); + } + + public CredentialResults listClusterUserCredentials() { + return serviceManager.managedClusters().listClusterUserCredentials(resourceGroupName, resourceName); + } + + public Response listClusterUserCredentialsWithResponse(Context context) { + return serviceManager + .managedClusters() + .listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, context); + } + + public CredentialResults listClusterMonitoringUserCredentials() { + return serviceManager.managedClusters().listClusterMonitoringUserCredentials(resourceGroupName, resourceName); + } + + public Response listClusterMonitoringUserCredentialsWithResponse(Context context) { + return serviceManager + .managedClusters() + .listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, context); + } + + 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 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 withNodeResourceGroup(String nodeResourceGroup) { + this.innerModel().withNodeResourceGroup(nodeResourceGroup); + return this; + } + + public ManagedClusterImpl withEnableRbac(Boolean enableRbac) { + this.innerModel().withEnableRbac(enableRbac); + 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 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; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterUpgradeProfileImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterUpgradeProfileImpl.java new file mode 100644 index 0000000000000..aef12a142e0b3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClusterUpgradeProfileImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterPoolUpgradeProfile; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + ManagedClusterUpgradeProfileImpl( + ManagedClusterUpgradeProfileInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClustersClientImpl.java new file mode 100644 index 0000000000000..e09a908e814aa --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClustersClientImpl.java @@ -0,0 +1,4360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterListResult; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservice.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 { + private final ClientLogger logger = new ClientLogger(ManagedClustersClientImpl.class); + + /** 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") + private 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/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, + @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, + @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, + @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}/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("{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 supported OS options in the specified subscription. + * + * @param location The name of a supported Azure region. + * @param resourceType 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. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getOSOptions( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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 a supported Azure region. + * @param resourceType 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. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getOSOptions( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + location, + resourceType, + accept, + context); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of a supported Azure region. + * @param resourceType 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getOSOptionsAsync(String location, String resourceType) { + return getOSOptionsWithResponseAsync(location, resourceType) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @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 supported OS options in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getOSOptionsAsync(String location) { + final String resourceType = null; + return getOSOptionsWithResponseAsync(location, resourceType) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @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 supported OS options in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OSOptionProfileInner getOSOptions(String location) { + final String resourceType = null; + return getOSOptionsAsync(location, resourceType).block(); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of a supported Azure region. + * @param resourceType 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOSOptionsWithResponse( + String location, String resourceType, Context context) { + return getOSOptionsWithResponseAsync(location, resourceType, context).block(); + } + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + @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. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each + * 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 Managed Clusters operation. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each + * 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 Managed Clusters operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each + * 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 Managed Clusters operation. + */ + @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. The operation returns properties of each + * 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 Managed Clusters operation. + */ + @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. The operation returns properties of each + * 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 Managed Clusters operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each + * 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 Managed Clusters operation. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getUpgradeProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getUpgradeProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getUpgradeProfileAsync( + String resourceGroupName, String resourceName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { + return getUpgradeProfileAsync(resourceGroupName, resourceName).block(); + } + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getAccessProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + roleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getAccessProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + roleName, + accept, + context); + } + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAccessProfileAsync( + String resourceGroupName, String resourceName, String roleName) { + return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterAccessProfileInner getAccessProfile( + String resourceGroupName, String resourceName, String roleName) { + return getAccessProfileAsync(resourceGroupName, resourceName, roleName).block(); + } + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccessProfileWithResponse( + String resourceGroupName, String resourceName, String roleName, Context context) { + return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName, context).block(); + } + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterAdminCredentialsWithResponseAsync( + 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listClusterAdminCredentials( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterAdminCredentialsWithResponseAsync( + 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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listClusterAdminCredentials( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listClusterAdminCredentialsAsync( + String resourceGroupName, String resourceName) { + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName) { + return listClusterAdminCredentialsAsync(resourceGroupName, resourceName).block(); + } + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterAdminCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterUserCredentialsWithResponseAsync( + 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listClusterUserCredentials( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterUserCredentialsWithResponseAsync( + 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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listClusterUserCredentials( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listClusterUserCredentialsAsync( + String resourceGroupName, String resourceName) { + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) { + return listClusterUserCredentialsAsync(resourceGroupName, resourceName).block(); + } + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterUserCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listClusterMonitoringUserCredentials( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + 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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listClusterMonitoringUserCredentials( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listClusterMonitoringUserCredentialsAsync( + String resourceGroupName, String resourceName) { + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { + return listClusterMonitoringUserCredentialsAsync(resourceGroupName, resourceName).block(); + } + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterMonitoringUserCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupAsync(resourceGroupName, resourceName).block(); + } + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, + Context.NONE); + } + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @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 with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 managed cluster. + */ + @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 with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 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 with the specified configuration for agents and Kubernetes version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a 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 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 a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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) + 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateTags( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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) + 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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateTags( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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) + 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, + Context.NONE); + } + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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) + 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 a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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 SyncPoller, ManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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 SyncPoller, ManagedClusterInner> beginUpdateTags( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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) + private Mono updateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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) + private Mono updateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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 a managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @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 the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, Context.NONE); + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { + return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return beginDeleteAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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(); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resetServicePrincipalProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resetServicePrincipalProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, Context.NONE); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginResetServicePrincipalProfile( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginResetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context) + .getSyncPoller(); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetServicePrincipalProfileAsync( + String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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 completion. + */ + @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); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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(); + } + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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(); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resetAadProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resetAadProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, Context.NONE); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginResetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginResetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context) { + return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetAadProfileAsync( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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 completion. + */ + @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); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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(); + } + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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(); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .rotateClusterCertificates( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .rotateClusterCertificates( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, Context.NONE); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRotateClusterCertificates( + String resourceGroupName, String resourceName) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRotateClusterCertificates( + String resourceGroupName, String resourceName, Context context) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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(); + } + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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(); + } + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .stop( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .stop( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, Context.NONE); + } + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName) { + return beginStopAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStop( + String resourceGroupName, String resourceName, Context context) { + return beginStopAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String resourceName) { + return beginStopAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .start( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .start( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, Context.NONE); + } + + /** + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName) { + return beginStartAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStart( + String resourceGroupName, String resourceName, Context context) { + return beginStartAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String resourceGroupName, String resourceName) { + return beginStartAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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(); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .runCommand( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + requestPayload, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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 run command result. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .runCommand( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + requestPayload, + accept, + context); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + 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, + Context.NONE); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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 run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).getSyncPoller(); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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 run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).getSyncPoller(); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + private Mono runCommandAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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 run command result. + */ + @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); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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(); + } + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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 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(); + } + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getCommandResult( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + commandId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getCommandResult( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + commandId, + accept, + context); + } + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCommandResultAsync( + String resourceGroupName, String resourceName, String commandId) { + return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId) { + return getCommandResultAsync(resourceGroupName, resourceName, commandId).block(); + } + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCommandResultWithResponse( + String resourceGroupName, String resourceName, String commandId, Context context) { + return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Clusters operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Clusters operation. + */ + @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 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. + */ + @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 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. + */ + @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClustersImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClustersImpl.java new file mode 100644 index 0000000000000..85b7efd60e60b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ManagedClustersImpl.java @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.generated.models.CredentialResults; +import com.azure.resourcemanager.containerservice.generated.models.ManagedCluster; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterAccessProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusterUpgradeProfile; +import com.azure.resourcemanager.containerservice.generated.models.ManagedClusters; +import com.azure.resourcemanager.containerservice.generated.models.OSOptionProfile; +import com.azure.resourcemanager.containerservice.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservice.generated.models.RunCommandResult; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ManagedClustersImpl implements ManagedClusters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClustersImpl.class); + + private final ManagedClustersClient innerClient; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + public ManagedClustersImpl( + ManagedClustersClient innerClient, + com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + 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 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 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 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 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 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 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 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 listClusterAdminCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, 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 listClusterUserCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, 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 listClusterMonitoringUserCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context) { + Response inner = + this + .serviceClient() + .listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CredentialResultsImpl(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 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 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 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 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 Response getCommandResultWithResponse( + String resourceGroupName, String resourceName, String commandId, Context context) { + Response 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 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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } + + public ManagedClusterImpl define(String name) { + return new ManagedClusterImpl(name, this.manager()); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OSOptionProfileImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OSOptionProfileImpl.java new file mode 100644 index 0000000000000..3958239a65207 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OSOptionProfileImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservice.generated.models.OSOptionProfile; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + OSOptionProfileImpl( + OSOptionProfileInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationValueImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationValueImpl.java new file mode 100644 index 0000000000000..21df82661f94f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationValueImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservice.generated.models.OperationValue; + +public final class OperationValueImpl implements OperationValue { + private OperationValueInner innerObject; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + OperationValueImpl( + OperationValueInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationsClientImpl.java new file mode 100644 index 0000000000000..382e8f1c7a1ec --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationsClientImpl.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservice.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 { + private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); + + /** 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") + private 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 compute 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 compute operations. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of compute 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 compute operations. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Gets a list of compute 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 compute operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync()); + } + + /** + * Gets a list of compute 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 compute operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context)); + } + + /** + * Gets a list of compute 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 compute operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of compute 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 compute operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..7d9c8ad4d72ea --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/OperationsImpl.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.containerservice.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.containerservice.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservice.generated.models.OperationValue; +import com.azure.resourcemanager.containerservice.generated.models.Operations; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OperationsImpl implements Operations { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + public OperationsImpl( + OperationsClient innerClient, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 0000000000000..77afcf6d8169a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservice.generated.models.PrivateLinkServiceConnectionState; + +public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection { + private PrivateEndpointConnectionInner innerObject; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + PrivateEndpointConnectionImpl( + PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionListResultImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionListResultImpl.java new file mode 100644 index 0000000000000..f9f390e2e0a2c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionListResultImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + PrivateEndpointConnectionListResultImpl( + PrivateEndpointConnectionListResultInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 0000000000000..f78e1828855d3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.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.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservice.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 { + private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); + + /** 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") + private 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}) + @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. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String resourceName) { + return listWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName) { + return listAsync(resourceGroupName, resourceName).block(); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + accept, + context); + } + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return getAsync(resourceGroupName, resourceName, privateEndpointConnectionName).block(); + } + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); + } + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection 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 private endpoint connection. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + parameters, + accept, + context); + } + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + private Mono updateAsync( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + return updateWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 updateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters).block(); + } + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection 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 private endpoint connection. + */ + @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(); + } + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + privateEndpointConnectionName, + accept, + context); + } + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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, Context.NONE); + } + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).getSyncPoller(); + } + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 completion. + */ + @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 the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 0000000000000..d471cde3ccb1f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateEndpointConnectionsImpl.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.containerservice.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.containerservice.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.containerservice.generated.models.PrivateEndpointConnections; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + public PrivateEndpointConnectionsImpl( + PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + 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 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 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 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 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 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 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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourceImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 0000000000000..5a19b1c0096e5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourceImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + PrivateLinkResourceImpl( + PrivateLinkResourceInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesClientImpl.java new file mode 100644 index 0000000000000..f60b1d9f08d79 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesClientImpl.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservice.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 { + private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class); + + /** 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") + private 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. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + 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. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String resourceName) { + return listWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName) { + return listAsync(resourceGroupName, resourceName).block(); + } + + /** + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 0000000000000..21c1d272ff475 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesImpl.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.containerservice.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.containerservice.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateLinkResourcesListResultInner; +import com.azure.resourcemanager.containerservice.generated.models.PrivateLinkResources; +import com.azure.resourcemanager.containerservice.generated.models.PrivateLinkResourcesListResult; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class PrivateLinkResourcesImpl implements PrivateLinkResources { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class); + + private final PrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + public PrivateLinkResourcesImpl( + PrivateLinkResourcesClient innerClient, + com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + 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; + } + } + + 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; + } + } + + private PrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesListResultImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesListResultImpl.java new file mode 100644 index 0000000000000..19a0adca83997 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/PrivateLinkResourcesListResultImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateLinkResourcesListResultInner; +import com.azure.resourcemanager.containerservice.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager serviceManager; + + PrivateLinkResourcesListResultImpl( + PrivateLinkResourcesListResultInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java new file mode 100644 index 0000000000000..f184472ad7953 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservice.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 { + private final ClientLogger logger = new ClientLogger(ResolvePrivateLinkServiceIdsClientImpl.class); + + /** 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") + private 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 the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + @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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .post( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + @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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .post( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + parameters, + accept, + context); + } + + /** + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono postAsync( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + return postWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner post( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + return postAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response postWithResponse( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context) { + return postWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java new file mode 100644 index 0000000000000..c49a830d7ab0d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/ResolvePrivateLinkServiceIdsImpl.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.containerservice.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.containerservice.generated.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservice.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservice.generated.models.ResolvePrivateLinkServiceIds; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ResolvePrivateLinkServiceIdsImpl implements ResolvePrivateLinkServiceIds { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResolvePrivateLinkServiceIdsImpl.class); + + private final ResolvePrivateLinkServiceIdsClient innerClient; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + public ResolvePrivateLinkServiceIdsImpl( + ResolvePrivateLinkServiceIdsClient innerClient, + com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + 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; + } + } + + 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; + } + } + + private ResolvePrivateLinkServiceIdsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/RunCommandResultImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/RunCommandResultImpl.java new file mode 100644 index 0000000000000..d0739ec1ddb2d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/RunCommandResultImpl.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.containerservice.generated.implementation; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.generated.models.RunCommandResult; +import java.time.OffsetDateTime; + +public final class RunCommandResultImpl implements RunCommandResult { + private RunCommandResultInner innerObject; + + private final com.azure.resourcemanager.containerservice.generated.ContainerServiceManager serviceManager; + + RunCommandResultImpl( + RunCommandResultInner innerObject, + com.azure.resourcemanager.containerservice.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.containerservice.generated.ContainerServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/Utils.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/Utils.java new file mode 100644 index 0000000000000..c519865337e72 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.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 { + 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.size() > 0 && 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, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl, PagedResponse>( + 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/implementation/package-info.java new file mode 100644 index 0000000000000..8f8c9fbd74000 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.implementation; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPool.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPool.java new file mode 100644 index 0000000000000..1d06644f23b9b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPool.java @@ -0,0 +1,1192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.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 count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value + * is 1. + * + * @return the count value. + */ + Integer count(); + + /** + * Gets the vmSize property: Size of agent VMs. + * + * @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 this + * 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: OS disk type to be used for machines in a given agent pool. Allowed values are + * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a + * cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after + * creation. + * + * @return the osDiskType value. + */ + OSDiskType osDiskType(); + + /** + * Gets the kubeletDiskType property: KubeletDiskType determines the placement of emptyDir volumes, container + * runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the + * OS disk for data. + * + * @return the kubeletDiskType value. + */ + KubeletDiskType kubeletDiskType(); + + /** + * Gets the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @return the vnetSubnetId value. + */ + String vnetSubnetId(); + + /** + * Gets the podSubnetId property: Pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @return the podSubnetId value. + */ + String podSubnetId(); + + /** + * Gets the maxPods property: 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: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. + * + * @return the osSku value. + */ + Ossku osSku(); + + /** + * Gets the maxCount property: Maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + Integer maxCount(); + + /** + * Gets the minCount property: 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 typePropertiesType property: AgentPoolType represents types of an agent pool. + * + * @return the typePropertiesType value. + */ + AgentPoolType typePropertiesType(); + + /** + * Gets the mode property: AgentPoolMode represents mode of an agent pool. + * + * @return the mode value. + */ + AgentPoolMode mode(); + + /** + * Gets the orchestratorVersion property: Version of orchestrator specified when creating the managed cluster. + * + * @return the orchestratorVersion value. + */ + String orchestratorVersion(); + + /** + * Gets the nodeImageVersion property: 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, which only appears in the + * response. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the powerState property: Describes whether the Agent Pool is Running or Stopped. + * + * @return the powerState value. + */ + PowerState powerState(); + + /** + * Gets the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets + * AgentPoolType. + * + * @return the availabilityZones value. + */ + List availabilityZones(); + + /** + * Gets the enableNodePublicIp property: Enable public IP for nodes. + * + * @return the enableNodePublicIp value. + */ + Boolean enableNodePublicIp(); + + /** + * Gets the nodePublicIpPrefixId property: Public IP Prefix ID. VM nodes use IPs assigned from this Public IP + * Prefix. + * + * @return the nodePublicIpPrefixId value. + */ + String nodePublicIpPrefixId(); + + /** + * Gets the scaleSetPriority property: ScaleSetPriority to be used to specify virtual machine scale set priority. + * Default to regular. + * + * @return the scaleSetPriority value. + */ + ScaleSetPriority scaleSetPriority(); + + /** + * Gets the scaleSetEvictionPolicy property: ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to Delete. + * + * @return the scaleSetEvictionPolicy value. + */ + ScaleSetEvictionPolicy scaleSetEvictionPolicy(); + + /** + * Gets the spotMaxPrice property: SpotMaxPrice to be used to specify the maximum price you are willing to pay in US + * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to + * on-demand. + * + * @return the spotMaxPrice value. + */ + Float spotMaxPrice(); + + /** + * Gets the tags property: Agent pool tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the nodeLabels property: Agent pool node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value. + */ + Map nodeLabels(); + + /** + * Gets the nodeTaints property: 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: KubeletConfig specifies the configuration of kubelet on agent nodes. + * + * @return the kubeletConfig value. + */ + KubeletConfig kubeletConfig(); + + /** + * Gets the linuxOSConfig property: LinuxOSConfig specifies the OS configuration of linux agent nodes. + * + * @return the linuxOSConfig value. + */ + LinuxOSConfig linuxOSConfig(); + + /** + * Gets the enableEncryptionAtHost property: Whether to enable EncryptionAtHost. + * + * @return the enableEncryptionAtHost value. + */ + Boolean enableEncryptionAtHost(); + + /** + * Gets the enableFips property: Whether to use FIPS enabled OS. + * + * @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. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + * + * @return the gpuInstanceProfile value. + */ + GpuInstanceProfile gpuInstanceProfile(); + + /** + * 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 inner com.azure.resourcemanager.containerservice.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. + * @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.WithVnetSubnetId, + DefinitionStages.WithPodSubnetId, + DefinitionStages.WithMaxPods, + DefinitionStages.WithOsType, + DefinitionStages.WithOsSku, + DefinitionStages.WithMaxCount, + DefinitionStages.WithMinCount, + DefinitionStages.WithEnableAutoScaling, + DefinitionStages.WithTypePropertiesType, + DefinitionStages.WithMode, + DefinitionStages.WithOrchestratorVersion, + DefinitionStages.WithUpgradeSettings, + 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.WithEnableFips, + DefinitionStages.WithGpuInstanceProfile { + /** + * 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: Agent pool tags to be persisted on the agent pool virtual machine scale + * set.. + * + * @param tags Agent pool 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 100 (inclusive) for user pools and in the range of 1 to 100 (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 100 (inclusive) for user pools and in the range of 1 to 100 (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: Size of agent VMs.. + * + * @param vmSize Size of agent VMs. + * @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 this 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 this + * 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: OS disk type to be used for machines in a given agent pool. Allowed + * values are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + * ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to + * 'Managed'. May not be changed after creation.. + * + * @param osDiskType OS disk type to be used for machines in a given agent pool. Allowed values are + * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS + * and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May + * not be changed after creation. + * @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: KubeletDiskType determines the placement of emptyDir volumes, + * container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in + * Kubelet using the OS disk for data.. + * + * @param kubeletDiskType KubeletDiskType determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using + * the OS disk for data. + * @return the next definition stage. + */ + WithCreate withKubeletDiskType(KubeletDiskType kubeletDiskType); + } + /** The stage of the AgentPool definition allowing to specify vnetSubnetId. */ + interface WithVnetSubnetId { + /** + * Specifies the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and + * maybe pods. + * + * @param vnetSubnetId VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * @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: Pod SubnetID specifies the VNet's subnet identifier for pods.. + * + * @param podSubnetId Pod SubnetID specifies the VNet's subnet identifier for pods. + * @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: Maximum number of pods that can run on a node.. + * + * @param maxPods 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: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and + * CBLMariner for Linux OSType. Not applicable to Windows OSType.. + * + * @param osSku OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. + * @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: Maximum number of nodes for auto-scaling. + * + * @param maxCount 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: Minimum number of nodes for auto-scaling. + * + * @param minCount 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 typePropertiesType. */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: AgentPoolType represents types of an agent pool. + * + * @param typePropertiesType AgentPoolType represents types of an 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: AgentPoolMode represents mode of an agent pool. + * + * @param mode AgentPoolMode represents mode of an agent pool. + * @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: Version of orchestrator specified when creating the managed + * cluster.. + * + * @param orchestratorVersion Version of orchestrator specified when creating the managed cluster. + * @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 availabilityZones. */ + interface WithAvailabilityZones { + /** + * Specifies the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets + * AgentPoolType.. + * + * @param availabilityZones Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * @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: Enable public IP for nodes. + * + * @param enableNodePublicIp Enable public IP for nodes. + * @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: Public IP Prefix ID. VM nodes use IPs assigned from this + * Public IP Prefix.. + * + * @param nodePublicIpPrefixId Public IP Prefix ID. VM nodes use IPs assigned from this Public IP Prefix. + * @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: ScaleSetPriority to be used to specify virtual machine scale set + * priority. Default to regular.. + * + * @param scaleSetPriority ScaleSetPriority to be used to specify virtual machine scale set priority. + * Default to 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: ScaleSetEvictionPolicy to be used to specify eviction + * policy for Spot virtual machine scale set. Default to Delete.. + * + * @param scaleSetEvictionPolicy ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to 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: SpotMaxPrice to be used to specify the maximum price you are willing + * to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates + * default price to be up-to on-demand.. + * + * @param spotMaxPrice SpotMaxPrice to be used to specify the maximum price you are willing to pay in US + * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price + * to be up-to on-demand. + * @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: Agent pool node labels to be persisted across all nodes in agent + * pool.. + * + * @param nodeLabels Agent pool 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: Taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule.. + * + * @param nodeTaints 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: KubeletConfig specifies the configuration of kubelet on agent + * nodes.. + * + * @param kubeletConfig KubeletConfig specifies the configuration of kubelet on agent 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: LinuxOSConfig specifies the OS configuration of linux agent nodes.. + * + * @param linuxOSConfig LinuxOSConfig specifies 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 EncryptionAtHost. + * + * @param enableEncryptionAtHost Whether to enable EncryptionAtHost. + * @return the next definition stage. + */ + WithCreate withEnableEncryptionAtHost(Boolean enableEncryptionAtHost); + } + /** The stage of the AgentPool definition allowing to specify enableFips. */ + interface WithEnableFips { + /** + * Specifies the enableFips property: Whether to use FIPS enabled OS. + * + * @param enableFips Whether to use FIPS enabled OS. + * @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. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g.. + * + * @param gpuInstanceProfile GPUInstanceProfile to be used to specify GPU MIG instance profile for supported + * GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + * @return the next definition stage. + */ + WithCreate withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile); + } + } + /** + * 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.WithVnetSubnetId, + UpdateStages.WithPodSubnetId, + UpdateStages.WithMaxPods, + UpdateStages.WithOsType, + UpdateStages.WithOsSku, + UpdateStages.WithMaxCount, + UpdateStages.WithMinCount, + UpdateStages.WithEnableAutoScaling, + UpdateStages.WithTypePropertiesType, + UpdateStages.WithMode, + UpdateStages.WithOrchestratorVersion, + UpdateStages.WithUpgradeSettings, + 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.WithEnableFips, + UpdateStages.WithGpuInstanceProfile { + /** + * 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: Agent pool tags to be persisted on the agent pool virtual machine scale + * set.. + * + * @param tags Agent pool 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 100 (inclusive) for user pools and in the range of 1 to 100 (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 100 (inclusive) for user pools and in the range of 1 to 100 (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: Size of agent VMs.. + * + * @param vmSize Size of agent VMs. + * @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 this 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 this + * 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: OS disk type to be used for machines in a given agent pool. Allowed + * values are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + * ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to + * 'Managed'. May not be changed after creation.. + * + * @param osDiskType OS disk type to be used for machines in a given agent pool. Allowed values are + * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS + * and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May + * not be changed after creation. + * @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: KubeletDiskType determines the placement of emptyDir volumes, + * container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in + * Kubelet using the OS disk for data.. + * + * @param kubeletDiskType KubeletDiskType determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using + * the OS disk for data. + * @return the next definition stage. + */ + Update withKubeletDiskType(KubeletDiskType kubeletDiskType); + } + /** The stage of the AgentPool update allowing to specify vnetSubnetId. */ + interface WithVnetSubnetId { + /** + * Specifies the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and + * maybe pods. + * + * @param vnetSubnetId VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * @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: Pod SubnetID specifies the VNet's subnet identifier for pods.. + * + * @param podSubnetId Pod SubnetID specifies the VNet's subnet identifier for pods. + * @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: Maximum number of pods that can run on a node.. + * + * @param maxPods 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: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and + * CBLMariner for Linux OSType. Not applicable to Windows OSType.. + * + * @param osSku OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. + * @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: Maximum number of nodes for auto-scaling. + * + * @param maxCount 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: Minimum number of nodes for auto-scaling. + * + * @param minCount 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 typePropertiesType. */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: AgentPoolType represents types of an agent pool. + * + * @param typePropertiesType AgentPoolType represents types of an 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: AgentPoolMode represents mode of an agent pool. + * + * @param mode AgentPoolMode represents mode of an agent pool. + * @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: Version of orchestrator specified when creating the managed + * cluster.. + * + * @param orchestratorVersion Version of orchestrator specified when creating the managed cluster. + * @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 availabilityZones. */ + interface WithAvailabilityZones { + /** + * Specifies the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets + * AgentPoolType.. + * + * @param availabilityZones Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * @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: Enable public IP for nodes. + * + * @param enableNodePublicIp Enable public IP for nodes. + * @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: Public IP Prefix ID. VM nodes use IPs assigned from this + * Public IP Prefix.. + * + * @param nodePublicIpPrefixId Public IP Prefix ID. VM nodes use IPs assigned from this Public IP Prefix. + * @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: ScaleSetPriority to be used to specify virtual machine scale set + * priority. Default to regular.. + * + * @param scaleSetPriority ScaleSetPriority to be used to specify virtual machine scale set priority. + * Default to 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: ScaleSetEvictionPolicy to be used to specify eviction + * policy for Spot virtual machine scale set. Default to Delete.. + * + * @param scaleSetEvictionPolicy ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to 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: SpotMaxPrice to be used to specify the maximum price you are willing + * to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates + * default price to be up-to on-demand.. + * + * @param spotMaxPrice SpotMaxPrice to be used to specify the maximum price you are willing to pay in US + * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price + * to be up-to on-demand. + * @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: Agent pool node labels to be persisted across all nodes in agent + * pool.. + * + * @param nodeLabels Agent pool 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: Taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule.. + * + * @param nodeTaints 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: KubeletConfig specifies the configuration of kubelet on agent + * nodes.. + * + * @param kubeletConfig KubeletConfig specifies the configuration of kubelet on agent 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: LinuxOSConfig specifies the OS configuration of linux agent nodes.. + * + * @param linuxOSConfig LinuxOSConfig specifies 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 EncryptionAtHost. + * + * @param enableEncryptionAtHost Whether to enable EncryptionAtHost. + * @return the next definition stage. + */ + Update withEnableEncryptionAtHost(Boolean enableEncryptionAtHost); + } + /** The stage of the AgentPool update allowing to specify enableFips. */ + interface WithEnableFips { + /** + * Specifies the enableFips property: Whether to use FIPS enabled OS. + * + * @param enableFips Whether to use FIPS enabled OS. + * @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. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g.. + * + * @param gpuInstanceProfile GPUInstanceProfile to be used to specify GPU MIG instance profile for supported + * GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + * @return the next definition stage. + */ + Update withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile); + } + } + /** + * 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); + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @throws com.azure.core.management.exception.ManagementException 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(); + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolAvailableVersions.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolAvailableVersions.java new file mode 100644 index 0000000000000..2a0b98e89181e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolAvailableVersions.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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolAvailableVersionsInner; +import java.util.List; + +/** An immutable client-side representation of AgentPoolAvailableVersions. */ +public interface AgentPoolAvailableVersions { + /** + * Gets the id property: Id of the agent pool available versions. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the agent pool available versions. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Type of the agent pool available versions. + * + * @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.containerservice.generated.fluent.models.AgentPoolAvailableVersionsInner + * object. + * + * @return the inner object. + */ + AgentPoolAvailableVersionsInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java new file mode 100644 index 0000000000000..d87c16b51606a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem model. */ +@Fluent +public final class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem { + @JsonIgnore + private final ClientLogger logger = + new ClientLogger(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.class); + + /* + * Whether this version is the default agent pool version. + */ + @JsonProperty(value = "default") + private Boolean defaultProperty; + + /* + * Kubernetes version (major, minor, patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** + * 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: Kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolListResult.java new file mode 100644 index 0000000000000..ac65997da26e9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List Agent Pools operation. */ +@Fluent +public final class AgentPoolListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AgentPoolListResult.class); + + /* + * 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; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolMode.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolMode.java new file mode 100644 index 0000000000000..be15302c9af63 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolMode.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AgentPoolMode. */ +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 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); + } + + /** @return known AgentPoolMode values. */ + public static Collection values() { + return values(AgentPoolMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolType.java new file mode 100644 index 0000000000000..5f0828d31a15a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolType.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AgentPoolType. */ +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 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); + } + + /** @return known AgentPoolType values. */ + public static Collection values() { + return values(AgentPoolType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeProfile.java new file mode 100644 index 0000000000000..5a8282a8eb10e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeProfile.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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolUpgradeProfileInner; +import java.util.List; + +/** An immutable client-side representation of AgentPoolUpgradeProfile. */ +public interface AgentPoolUpgradeProfile { + /** + * Gets the id property: Id of the agent pool upgrade profile. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the agent pool upgrade profile. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Type of the agent pool upgrade profile. + * + * @return the type value. + */ + String type(); + + /** + * Gets the kubernetesVersion property: 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: LatestNodeImageVersion is the latest AKS supported node image version. + * + * @return the latestNodeImageVersion value. + */ + String latestNodeImageVersion(); + + /** + * Gets the inner com.azure.resourcemanager.containerservice.generated.fluent.models.AgentPoolUpgradeProfileInner + * object. + * + * @return the inner object. + */ + AgentPoolUpgradeProfileInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java new file mode 100644 index 0000000000000..f95a1541f8571 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AgentPoolUpgradeProfilePropertiesUpgradesItem model. */ +@Fluent +public final class AgentPoolUpgradeProfilePropertiesUpgradesItem { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(AgentPoolUpgradeProfilePropertiesUpgradesItem.class); + + /* + * Kubernetes version (major, minor, patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** + * Get the kubernetesVersion property: Kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: 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 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 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeSettings.java new file mode 100644 index 0000000000000..f4a081cce910f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPoolUpgradeSettings.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Settings for upgrading an agentpool. */ +@Fluent +public final class AgentPoolUpgradeSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AgentPoolUpgradeSettings.class); + + /* + * Count or percentage of additional nodes to be added during upgrade. If + * empty uses AKS default + */ + @JsonProperty(value = "maxSurge") + private String maxSurge; + + /** + * Get the maxSurge property: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS + * default. + * + * @return the maxSurge value. + */ + public String maxSurge() { + return this.maxSurge; + } + + /** + * Set the maxSurge property: Count or percentage of additional nodes to be added during upgrade. If empty uses AKS + * default. + * + * @param maxSurge the maxSurge value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withMaxSurge(String maxSurge) { + this.maxSurge = maxSurge; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPools.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPools.java new file mode 100644 index 0000000000000..093149bfdeb09 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/AgentPools.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 { + /** + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + AgentPool get(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Deletes the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 the agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + AgentPoolUpgradeProfile getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for an agent pool with a specified resource group and managed cluster + * name. + */ + Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + AgentPoolAvailableVersions getAvailableAgentPoolVersions(String resourceGroupName, String resourceName); + + /** + * Gets a list of supported versions for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. + * @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 supported versions for the specified agent pool. + */ + Response getAvailableAgentPoolVersionsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the agent pool by managed cluster and resource group. + * + * @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 agent pool by managed cluster and resource group. + */ + AgentPool getById(String id); + + /** + * Gets the details of the agent pool by managed cluster and resource group. + * + * @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 agent pool by managed cluster and resource group. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the 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 the 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/BaseManagedCluster.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/BaseManagedCluster.java new file mode 100644 index 0000000000000..eaed738f223a7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/BaseManagedCluster.java @@ -0,0 +1,799 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateLinkResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The BaseManagedCluster model. */ +@JsonFlatten +@Fluent +public class BaseManagedCluster { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BaseManagedCluster.class); + + /* + * The identity of the managed cluster, if configured. + */ + @JsonProperty(value = "identity") + private ManagedClusterIdentity identity; + + /* + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Represents the Power State of the cluster + */ + @JsonProperty(value = "properties.powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /* + * The max number of agent pools for the managed cluster. + */ + @JsonProperty(value = "properties.maxAgentPools", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxAgentPools; + + /* + * Version of Kubernetes specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.kubernetesVersion") + private String kubernetesVersion; + + /* + * DNS prefix specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.dnsPrefix") + private String dnsPrefix; + + /* + * FQDN subdomain specified when creating private cluster with custom + * private dns zone. + */ + @JsonProperty(value = "properties.fqdnSubdomain") + private String fqdnSubdomain; + + /* + * FQDN for the master pool. + */ + @JsonProperty(value = "properties.fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * FQDN of private cluster. + */ + @JsonProperty(value = "properties.privateFQDN", access = JsonProperty.Access.WRITE_ONLY) + private String privateFqdn; + + /* + * FQDN for the master pool which used by proxy config. + */ + @JsonProperty(value = "properties.azurePortalFQDN", access = JsonProperty.Access.WRITE_ONLY) + private String azurePortalFqdn; + + /* + * Properties of the agent pool. + */ + @JsonProperty(value = "properties.agentPoolProfiles") + private List agentPoolProfiles; + + /* + * Profile for Linux VMs in the container service cluster. + */ + @JsonProperty(value = "properties.linuxProfile") + private ContainerServiceLinuxProfile linuxProfile; + + /* + * Profile for Windows VMs in the container service cluster. + */ + @JsonProperty(value = "properties.windowsProfile") + private ManagedClusterWindowsProfile windowsProfile; + + /* + * Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + */ + @JsonProperty(value = "properties.servicePrincipalProfile") + private ManagedClusterServicePrincipalProfile servicePrincipalProfile; + + /* + * Profile of managed cluster add-on. + */ + @JsonProperty(value = "properties.addonProfiles") + private Map addonProfiles; + + /* + * Profile of managed cluster pod identity. + */ + @JsonProperty(value = "properties.podIdentityProfile") + private ManagedClusterPodIdentityProfile podIdentityProfile; + + /* + * Name of the resource group containing agent pool nodes. + */ + @JsonProperty(value = "properties.nodeResourceGroup") + private String nodeResourceGroup; + + /* + * Whether to enable Kubernetes Role-Based Access Control. + */ + @JsonProperty(value = "properties.enableRBAC") + private Boolean enableRbac; + + /* + * (DEPRECATING) Whether to enable Kubernetes pod security policy + * (preview). This feature is set for removal on October 15th, 2020. Learn + * more at aka.ms/aks/azpodpolicy. + */ + @JsonProperty(value = "properties.enablePodSecurityPolicy") + private Boolean enablePodSecurityPolicy; + + /* + * Profile of network configuration. + */ + @JsonProperty(value = "properties.networkProfile") + private ContainerServiceNetworkProfile networkProfile; + + /* + * Profile of Azure Active Directory configuration. + */ + @JsonProperty(value = "properties.aadProfile") + private ManagedClusterAadProfile aadProfile; + + /* + * Profile of auto upgrade configuration. + */ + @JsonProperty(value = "properties.autoUpgradeProfile") + private ManagedClusterAutoUpgradeProfile autoUpgradeProfile; + + /* + * Parameters to be applied to the cluster-autoscaler when enabled + */ + @JsonProperty(value = "properties.autoScalerProfile") + private ManagedClusterPropertiesAutoScalerProfile autoScalerProfile; + + /* + * Access profile for managed cluster API server. + */ + @JsonProperty(value = "properties.apiServerAccessProfile") + private ManagedClusterApiServerAccessProfile apiServerAccessProfile; + + /* + * ResourceId of the disk encryption set to use for enabling encryption at + * rest. + */ + @JsonProperty(value = "properties.diskEncryptionSetID") + private String diskEncryptionSetId; + + /* + * Identities associated with the cluster. + */ + @JsonProperty(value = "properties.identityProfile") + private Map identityProfile; + + /* + * Private link resources associated with the cluster. + */ + @JsonProperty(value = "properties.privateLinkResources") + private List privateLinkResources; + + /* + * If set to true, getting static credential will be disabled for this + * cluster. Expected to only be used for AAD clusters. + */ + @JsonProperty(value = "properties.disableLocalAccounts") + private Boolean disableLocalAccounts; + + /* + * Configurations for provisioning the cluster with HTTP proxy servers. + */ + @JsonProperty(value = "properties.httpProxyConfig") + private ManagedClusterHttpProxyConfig httpProxyConfig; + + /** + * 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 BaseManagedCluster object itself. + */ + public BaseManagedCluster withIdentity(ManagedClusterIdentity identity) { + this.identity = identity; + 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.provisioningState; + } + + /** + * Get the powerState property: Represents 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: Version of Kubernetes specified when creating the managed cluster. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: Version of Kubernetes specified when creating the managed cluster. + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the dnsPrefix property: DNS prefix specified when creating the managed cluster. + * + * @return the dnsPrefix value. + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set the dnsPrefix property: DNS prefix specified when creating the managed cluster. + * + * @param dnsPrefix the dnsPrefix value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get the fqdnSubdomain property: FQDN subdomain specified when creating private cluster with custom private dns + * zone. + * + * @return the fqdnSubdomain value. + */ + public String fqdnSubdomain() { + return this.fqdnSubdomain; + } + + /** + * Set the fqdnSubdomain property: FQDN subdomain specified when creating private cluster with custom private dns + * zone. + * + * @param fqdnSubdomain the fqdnSubdomain value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withFqdnSubdomain(String fqdnSubdomain) { + this.fqdnSubdomain = fqdnSubdomain; + return this; + } + + /** + * Get the fqdn property: FQDN for the master pool. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the privateFqdn property: FQDN of private cluster. + * + * @return the privateFqdn value. + */ + public String privateFqdn() { + return this.privateFqdn; + } + + /** + * Get the azurePortalFqdn property: FQDN for the master pool which used by proxy config. + * + * @return the azurePortalFqdn value. + */ + public String azurePortalFqdn() { + return this.azurePortalFqdn; + } + + /** + * Get the agentPoolProfiles property: Properties of the agent pool. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles property: Properties of the agent pool. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get the linuxProfile property: Profile for Linux VMs in the container service cluster. + * + * @return the linuxProfile value. + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set the linuxProfile property: Profile for Linux VMs in the container service cluster. + * + * @param linuxProfile the linuxProfile value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get the windowsProfile property: Profile for Windows VMs in the container service cluster. + * + * @return the windowsProfile value. + */ + public ManagedClusterWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile property: Profile for Windows VMs in the container service cluster. + * + * @param windowsProfile the windowsProfile value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster 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 BaseManagedCluster object itself. + */ + public BaseManagedCluster withServicePrincipalProfile( + ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + this.servicePrincipalProfile = servicePrincipalProfile; + return this; + } + + /** + * Get the addonProfiles property: Profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + public Map addonProfiles() { + return this.addonProfiles; + } + + /** + * Set the addonProfiles property: Profile of managed cluster add-on. + * + * @param addonProfiles the addonProfiles value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withAddonProfiles(Map addonProfiles) { + this.addonProfiles = addonProfiles; + return this; + } + + /** + * Get the podIdentityProfile property: Profile of managed cluster pod identity. + * + * @return the podIdentityProfile value. + */ + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.podIdentityProfile; + } + + /** + * Set the podIdentityProfile property: Profile of managed cluster pod identity. + * + * @param podIdentityProfile the podIdentityProfile value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + this.podIdentityProfile = podIdentityProfile; + return this; + } + + /** + * Get the nodeResourceGroup property: Name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value. + */ + public String nodeResourceGroup() { + return this.nodeResourceGroup; + } + + /** + * Set the nodeResourceGroup property: Name of the resource group containing agent pool nodes. + * + * @param nodeResourceGroup the nodeResourceGroup value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster 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 BaseManagedCluster object itself. + */ + public BaseManagedCluster withEnableRbac(Boolean enableRbac) { + this.enableRbac = enableRbac; + return this; + } + + /** + * Get the enablePodSecurityPolicy property: (DEPRECATING) Whether to enable Kubernetes pod security policy + * (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + * + * @return the enablePodSecurityPolicy value. + */ + public Boolean enablePodSecurityPolicy() { + return this.enablePodSecurityPolicy; + } + + /** + * Set the enablePodSecurityPolicy property: (DEPRECATING) Whether to enable Kubernetes pod security policy + * (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + * + * @param enablePodSecurityPolicy the enablePodSecurityPolicy value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + this.enablePodSecurityPolicy = enablePodSecurityPolicy; + return this; + } + + /** + * Get the networkProfile property: Profile of network configuration. + * + * @return the networkProfile value. + */ + public ContainerServiceNetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Profile of network configuration. + * + * @param networkProfile the networkProfile value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the aadProfile property: Profile of Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + public ManagedClusterAadProfile aadProfile() { + return this.aadProfile; + } + + /** + * Set the aadProfile property: Profile of Azure Active Directory configuration. + * + * @param aadProfile the aadProfile value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withAadProfile(ManagedClusterAadProfile aadProfile) { + this.aadProfile = aadProfile; + return this; + } + + /** + * Get the autoUpgradeProfile property: Profile of auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.autoUpgradeProfile; + } + + /** + * Set the autoUpgradeProfile property: Profile of auto upgrade configuration. + * + * @param autoUpgradeProfile the autoUpgradeProfile value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + this.autoUpgradeProfile = autoUpgradeProfile; + 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 BaseManagedCluster object itself. + */ + public BaseManagedCluster withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + this.autoScalerProfile = autoScalerProfile; + return this; + } + + /** + * Get the apiServerAccessProfile property: Access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { + return this.apiServerAccessProfile; + } + + /** + * Set the apiServerAccessProfile property: Access profile for managed cluster API server. + * + * @param apiServerAccessProfile the apiServerAccessProfile value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { + this.apiServerAccessProfile = apiServerAccessProfile; + return this; + } + + /** + * Get the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at + * rest. + * + * @return the diskEncryptionSetId value. + */ + public String diskEncryptionSetId() { + return this.diskEncryptionSetId; + } + + /** + * Set the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at + * rest. + * + * @param diskEncryptionSetId the diskEncryptionSetId value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster 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 BaseManagedCluster object itself. + */ + public BaseManagedCluster 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 BaseManagedCluster object itself. + */ + public BaseManagedCluster withPrivateLinkResources(List privateLinkResources) { + this.privateLinkResources = privateLinkResources; + return this; + } + + /** + * Get the disableLocalAccounts property: If set to true, getting static credential will be disabled for this + * cluster. Expected to only be used for AAD clusters. + * + * @return the disableLocalAccounts value. + */ + public Boolean disableLocalAccounts() { + return this.disableLocalAccounts; + } + + /** + * Set the disableLocalAccounts property: If set to true, getting static credential will be disabled for this + * cluster. Expected to only be used for AAD clusters. + * + * @param disableLocalAccounts the disableLocalAccounts value to set. + * @return the BaseManagedCluster object itself. + */ + public BaseManagedCluster 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 BaseManagedCluster object itself. + */ + public BaseManagedCluster withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { + this.httpProxyConfig = httpProxyConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().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 (networkProfile() != null) { + networkProfile().validate(); + } + if (aadProfile() != null) { + aadProfile().validate(); + } + if (autoUpgradeProfile() != null) { + autoUpgradeProfile().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(); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Code.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Code.java new file mode 100644 index 0000000000000..c15308f62babd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Code.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Code. */ +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 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); + } + + /** @return known Code values. */ + public static Collection values() { + return values(Code.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ConnectionStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ConnectionStatus.java new file mode 100644 index 0000000000000..5be4dd2c34afa --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ConnectionStatus.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ConnectionStatus. */ +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 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); + } + + /** @return known ConnectionStatus values. */ + public static Collection values() { + return values(ConnectionStatus.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceLinuxProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceLinuxProfile.java new file mode 100644 index 0000000000000..1552cd4661f06 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceLinuxProfile.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Profile for Linux VMs in the container service cluster. */ +@Fluent +public final class ContainerServiceLinuxProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerServiceLinuxProfile.class); + + /* + * The administrator username to use for Linux VMs. + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /* + * SSH configuration for Linux-based VMs running on Azure. + */ + @JsonProperty(value = "ssh", required = true) + private ContainerServiceSshConfiguration ssh; + + /** + * 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: SSH configuration for Linux-based VMs running on Azure. + * + * @return the ssh value. + */ + public ContainerServiceSshConfiguration ssh() { + return this.ssh; + } + + /** + * Set the ssh property: 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(); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceNetworkProfile.java new file mode 100644 index 0000000000000..ebcc5a74292f1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceNetworkProfile.java @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Profile of network configuration. */ +@Fluent +public final class ContainerServiceNetworkProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerServiceNetworkProfile.class); + + /* + * Network plugin used for building Kubernetes network. + */ + @JsonProperty(value = "networkPlugin") + private NetworkPlugin networkPlugin; + + /* + * Network policy used for building Kubernetes network. + */ + @JsonProperty(value = "networkPolicy") + private NetworkPolicy networkPolicy; + + /* + * Network mode used for building Kubernetes network. + */ + @JsonProperty(value = "networkMode") + private NetworkMode networkMode; + + /* + * 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; + + /* + * A CIDR notation IP range assigned to the Docker bridge network. It must + * not overlap with any Subnet IP ranges or the Kubernetes service address + * range. + */ + @JsonProperty(value = "dockerBridgeCidr") + private String dockerBridgeCidr; + + /* + * The outbound (egress) routing method. + */ + @JsonProperty(value = "outboundType") + private OutboundType outboundType; + + /* + * The load balancer sku for the managed cluster. + */ + @JsonProperty(value = "loadBalancerSku") + private LoadBalancerSku loadBalancerSku; + + /* + * Profile of the cluster load balancer. + */ + @JsonProperty(value = "loadBalancerProfile") + private ManagedClusterLoadBalancerProfile loadBalancerProfile; + + /** + * Get the networkPlugin property: Network plugin used for building Kubernetes network. + * + * @return the networkPlugin value. + */ + public NetworkPlugin networkPlugin() { + return this.networkPlugin; + } + + /** + * Set the networkPlugin property: Network plugin used for building 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 networkPolicy property: Network policy used for building Kubernetes network. + * + * @return the networkPolicy value. + */ + public NetworkPolicy networkPolicy() { + return this.networkPolicy; + } + + /** + * Set the networkPolicy property: Network policy used for building 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: Network mode used for building Kubernetes network. + * + * @return the networkMode value. + */ + public NetworkMode networkMode() { + return this.networkMode; + } + + /** + * Set the networkMode property: Network mode used for building Kubernetes network. + * + * @param networkMode the networkMode value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkMode(NetworkMode networkMode) { + this.networkMode = networkMode; + 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 dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not + * overlap with any Subnet IP ranges or the Kubernetes service address range. + * + * @return the dockerBridgeCidr value. + */ + public String dockerBridgeCidr() { + return this.dockerBridgeCidr; + } + + /** + * Set the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not + * overlap with any Subnet IP ranges or the Kubernetes service address range. + * + * @param dockerBridgeCidr the dockerBridgeCidr value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withDockerBridgeCidr(String dockerBridgeCidr) { + this.dockerBridgeCidr = dockerBridgeCidr; + return this; + } + + /** + * Get the outboundType property: The outbound (egress) routing method. + * + * @return the outboundType value. + */ + public OutboundType outboundType() { + return this.outboundType; + } + + /** + * Set the outboundType property: The outbound (egress) routing method. + * + * @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. + * + * @return the loadBalancerSku value. + */ + public LoadBalancerSku loadBalancerSku() { + return this.loadBalancerSku; + } + + /** + * Set the loadBalancerSku property: The load balancer sku for the managed cluster. + * + * @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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (loadBalancerProfile() != null) { + loadBalancerProfile().validate(); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceSshConfiguration.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceSshConfiguration.java new file mode 100644 index 0000000000000..9228e07862566 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceSshConfiguration.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** SSH configuration for Linux-based VMs running on Azure. */ +@Fluent +public final class ContainerServiceSshConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerServiceSshConfiguration.class); + + /* + * The list of SSH public keys used to authenticate with Linux-based VMs. + * Only expect one key specified. + */ + @JsonProperty(value = "publicKeys", required = true) + private List publicKeys; + + /** + * Get the publicKeys property: The list of SSH public keys used to authenticate with Linux-based VMs. Only expect + * one key 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. Only expect + * one key 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()); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceSshPublicKey.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceSshPublicKey.java new file mode 100644 index 0000000000000..dedfc5385b455 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceSshPublicKey.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Contains information about SSH certificate public key data. */ +@Fluent +public final class ContainerServiceSshPublicKey { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerServiceSshPublicKey.class); + + /* + * 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; + + /** + * 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")); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceStorageProfileTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceStorageProfileTypes.java new file mode 100644 index 0000000000000..0ee43842982fa --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceStorageProfileTypes.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerServiceStorageProfileTypes. */ +public final class ContainerServiceStorageProfileTypes + extends ExpandableStringEnum { + /** Static value StorageAccount for ContainerServiceStorageProfileTypes. */ + public static final ContainerServiceStorageProfileTypes STORAGE_ACCOUNT = fromString("StorageAccount"); + + /** Static value ManagedDisks for ContainerServiceStorageProfileTypes. */ + public static final ContainerServiceStorageProfileTypes MANAGED_DISKS = fromString("ManagedDisks"); + + /** + * Creates or finds a ContainerServiceStorageProfileTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerServiceStorageProfileTypes. + */ + @JsonCreator + public static ContainerServiceStorageProfileTypes fromString(String name) { + return fromString(name, ContainerServiceStorageProfileTypes.class); + } + + /** @return known ContainerServiceStorageProfileTypes values. */ + public static Collection values() { + return values(ContainerServiceStorageProfileTypes.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceVMDiagnostics.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceVMDiagnostics.java new file mode 100644 index 0000000000000..cc02227ee0e30 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceVMDiagnostics.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Profile for diagnostics on the container service VMs. */ +@Fluent +public final class ContainerServiceVMDiagnostics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerServiceVMDiagnostics.class); + + /* + * Whether the VM diagnostic agent is provisioned on the VM. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * The URI of the storage account where diagnostics are stored. + */ + @JsonProperty(value = "storageUri", access = JsonProperty.Access.WRITE_ONLY) + private String storageUri; + + /** + * Get the enabled property: Whether the VM diagnostic agent is provisioned on the VM. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether the VM diagnostic agent is provisioned on the VM. + * + * @param enabled the enabled value to set. + * @return the ContainerServiceVMDiagnostics object itself. + */ + public ContainerServiceVMDiagnostics withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the storageUri property: The URI of the storage account where diagnostics are stored. + * + * @return the storageUri value. + */ + public String storageUri() { + return this.storageUri; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceVMSizeTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceVMSizeTypes.java new file mode 100644 index 0000000000000..100e73022f1b4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ContainerServiceVMSizeTypes.java @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerServiceVMSizeTypes. */ +public final class ContainerServiceVMSizeTypes extends ExpandableStringEnum { + /** Static value Standard_A1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A1 = fromString("Standard_A1"); + + /** Static value Standard_A10 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A10 = fromString("Standard_A10"); + + /** Static value Standard_A11 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A11 = fromString("Standard_A11"); + + /** Static value Standard_A1_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A1_V2 = fromString("Standard_A1_v2"); + + /** Static value Standard_A2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A2 = fromString("Standard_A2"); + + /** Static value Standard_A2_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A2_V2 = fromString("Standard_A2_v2"); + + /** Static value Standard_A2m_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A2M_V2 = fromString("Standard_A2m_v2"); + + /** Static value Standard_A3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A3 = fromString("Standard_A3"); + + /** Static value Standard_A4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A4 = fromString("Standard_A4"); + + /** Static value Standard_A4_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A4_V2 = fromString("Standard_A4_v2"); + + /** Static value Standard_A4m_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A4M_V2 = fromString("Standard_A4m_v2"); + + /** Static value Standard_A5 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A5 = fromString("Standard_A5"); + + /** Static value Standard_A6 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A6 = fromString("Standard_A6"); + + /** Static value Standard_A7 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A7 = fromString("Standard_A7"); + + /** Static value Standard_A8 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A8 = fromString("Standard_A8"); + + /** Static value Standard_A8_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A8_V2 = fromString("Standard_A8_v2"); + + /** Static value Standard_A8m_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A8M_V2 = fromString("Standard_A8m_v2"); + + /** Static value Standard_A9 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A9 = fromString("Standard_A9"); + + /** Static value Standard_B2ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_B2MS = fromString("Standard_B2ms"); + + /** Static value Standard_B2s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_B2S = fromString("Standard_B2s"); + + /** Static value Standard_B4ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_B4MS = fromString("Standard_B4ms"); + + /** Static value Standard_B8ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_B8MS = fromString("Standard_B8ms"); + + /** Static value Standard_D1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D1 = fromString("Standard_D1"); + + /** Static value Standard_D11 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D11 = fromString("Standard_D11"); + + /** Static value Standard_D11_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D11_V2 = fromString("Standard_D11_v2"); + + /** Static value Standard_D11_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D11_V2_PROMO = fromString("Standard_D11_v2_Promo"); + + /** Static value Standard_D12 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D12 = fromString("Standard_D12"); + + /** Static value Standard_D12_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D12_V2 = fromString("Standard_D12_v2"); + + /** Static value Standard_D12_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D12_V2_PROMO = fromString("Standard_D12_v2_Promo"); + + /** Static value Standard_D13 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D13 = fromString("Standard_D13"); + + /** Static value Standard_D13_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D13_V2 = fromString("Standard_D13_v2"); + + /** Static value Standard_D13_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D13_V2_PROMO = fromString("Standard_D13_v2_Promo"); + + /** Static value Standard_D14 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D14 = fromString("Standard_D14"); + + /** Static value Standard_D14_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D14_V2 = fromString("Standard_D14_v2"); + + /** Static value Standard_D14_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D14_V2_PROMO = fromString("Standard_D14_v2_Promo"); + + /** Static value Standard_D15_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D15_V2 = fromString("Standard_D15_v2"); + + /** Static value Standard_D16_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D16_V3 = fromString("Standard_D16_v3"); + + /** Static value Standard_D16s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D16S_V3 = fromString("Standard_D16s_v3"); + + /** Static value Standard_D1_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D1_V2 = fromString("Standard_D1_v2"); + + /** Static value Standard_D2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D2 = fromString("Standard_D2"); + + /** Static value Standard_D2_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D2_V2 = fromString("Standard_D2_v2"); + + /** Static value Standard_D2_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D2_V2_PROMO = fromString("Standard_D2_v2_Promo"); + + /** Static value Standard_D2_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D2_V3 = fromString("Standard_D2_v3"); + + /** Static value Standard_D2s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D2S_V3 = fromString("Standard_D2s_v3"); + + /** Static value Standard_D3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D3 = fromString("Standard_D3"); + + /** Static value Standard_D32_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D32_V3 = fromString("Standard_D32_v3"); + + /** Static value Standard_D32s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D32S_V3 = fromString("Standard_D32s_v3"); + + /** Static value Standard_D3_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D3_V2 = fromString("Standard_D3_v2"); + + /** Static value Standard_D3_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D3_V2_PROMO = fromString("Standard_D3_v2_Promo"); + + /** Static value Standard_D4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D4 = fromString("Standard_D4"); + + /** Static value Standard_D4_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D4_V2 = fromString("Standard_D4_v2"); + + /** Static value Standard_D4_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D4_V2_PROMO = fromString("Standard_D4_v2_Promo"); + + /** Static value Standard_D4_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D4_V3 = fromString("Standard_D4_v3"); + + /** Static value Standard_D4s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D4S_V3 = fromString("Standard_D4s_v3"); + + /** Static value Standard_D5_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D5_V2 = fromString("Standard_D5_v2"); + + /** Static value Standard_D5_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D5_V2_PROMO = fromString("Standard_D5_v2_Promo"); + + /** Static value Standard_D64_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D64_V3 = fromString("Standard_D64_v3"); + + /** Static value Standard_D64s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D64S_V3 = fromString("Standard_D64s_v3"); + + /** Static value Standard_D8_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D8_V3 = fromString("Standard_D8_v3"); + + /** Static value Standard_D8s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D8S_V3 = fromString("Standard_D8s_v3"); + + /** Static value Standard_DS1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS1 = fromString("Standard_DS1"); + + /** Static value Standard_DS11 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS11 = fromString("Standard_DS11"); + + /** Static value Standard_DS11_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS11_V2 = fromString("Standard_DS11_v2"); + + /** Static value Standard_DS11_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS11_V2_PROMO = fromString("Standard_DS11_v2_Promo"); + + /** Static value Standard_DS12 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS12 = fromString("Standard_DS12"); + + /** Static value Standard_DS12_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS12_V2 = fromString("Standard_DS12_v2"); + + /** Static value Standard_DS12_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS12_V2_PROMO = fromString("Standard_DS12_v2_Promo"); + + /** Static value Standard_DS13 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS13 = fromString("Standard_DS13"); + + /** Static value Standard_DS13-2_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS13_2_V2 = fromString("Standard_DS13-2_v2"); + + /** Static value Standard_DS13-4_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS13_4_V2 = fromString("Standard_DS13-4_v2"); + + /** Static value Standard_DS13_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS13_V2 = fromString("Standard_DS13_v2"); + + /** Static value Standard_DS13_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS13_V2_PROMO = fromString("Standard_DS13_v2_Promo"); + + /** Static value Standard_DS14 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS14 = fromString("Standard_DS14"); + + /** Static value Standard_DS14-4_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS14_4_V2 = fromString("Standard_DS14-4_v2"); + + /** Static value Standard_DS14-8_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS14_8_V2 = fromString("Standard_DS14-8_v2"); + + /** Static value Standard_DS14_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS14_V2 = fromString("Standard_DS14_v2"); + + /** Static value Standard_DS14_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS14_V2_PROMO = fromString("Standard_DS14_v2_Promo"); + + /** Static value Standard_DS15_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS15_V2 = fromString("Standard_DS15_v2"); + + /** Static value Standard_DS1_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS1_V2 = fromString("Standard_DS1_v2"); + + /** Static value Standard_DS2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS2 = fromString("Standard_DS2"); + + /** Static value Standard_DS2_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS2_V2 = fromString("Standard_DS2_v2"); + + /** Static value Standard_DS2_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS2_V2_PROMO = fromString("Standard_DS2_v2_Promo"); + + /** Static value Standard_DS3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS3 = fromString("Standard_DS3"); + + /** Static value Standard_DS3_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS3_V2 = fromString("Standard_DS3_v2"); + + /** Static value Standard_DS3_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS3_V2_PROMO = fromString("Standard_DS3_v2_Promo"); + + /** Static value Standard_DS4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS4 = fromString("Standard_DS4"); + + /** Static value Standard_DS4_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS4_V2 = fromString("Standard_DS4_v2"); + + /** Static value Standard_DS4_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS4_V2_PROMO = fromString("Standard_DS4_v2_Promo"); + + /** Static value Standard_DS5_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS5_V2 = fromString("Standard_DS5_v2"); + + /** Static value Standard_DS5_v2_Promo for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS5_V2_PROMO = fromString("Standard_DS5_v2_Promo"); + + /** Static value Standard_E16_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E16_V3 = fromString("Standard_E16_v3"); + + /** Static value Standard_E16s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E16S_V3 = fromString("Standard_E16s_v3"); + + /** Static value Standard_E2_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E2_V3 = fromString("Standard_E2_v3"); + + /** Static value Standard_E2s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E2S_V3 = fromString("Standard_E2s_v3"); + + /** Static value Standard_E32-16s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E32_16S_V3 = fromString("Standard_E32-16s_v3"); + + /** Static value Standard_E32-8s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E32_8S_V3 = fromString("Standard_E32-8s_v3"); + + /** Static value Standard_E32_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E32_V3 = fromString("Standard_E32_v3"); + + /** Static value Standard_E32s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E32S_V3 = fromString("Standard_E32s_v3"); + + /** Static value Standard_E4_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E4_V3 = fromString("Standard_E4_v3"); + + /** Static value Standard_E4s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E4S_V3 = fromString("Standard_E4s_v3"); + + /** Static value Standard_E64-16s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E64_16S_V3 = fromString("Standard_E64-16s_v3"); + + /** Static value Standard_E64-32s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E64_32S_V3 = fromString("Standard_E64-32s_v3"); + + /** Static value Standard_E64_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E64_V3 = fromString("Standard_E64_v3"); + + /** Static value Standard_E64s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E64S_V3 = fromString("Standard_E64s_v3"); + + /** Static value Standard_E8_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E8_V3 = fromString("Standard_E8_v3"); + + /** Static value Standard_E8s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_E8S_V3 = fromString("Standard_E8s_v3"); + + /** Static value Standard_F1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F1 = fromString("Standard_F1"); + + /** Static value Standard_F16 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F16 = fromString("Standard_F16"); + + /** Static value Standard_F16s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F16S = fromString("Standard_F16s"); + + /** Static value Standard_F16s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F16S_V2 = fromString("Standard_F16s_v2"); + + /** Static value Standard_F1s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F1S = fromString("Standard_F1s"); + + /** Static value Standard_F2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F2 = fromString("Standard_F2"); + + /** Static value Standard_F2s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F2S = fromString("Standard_F2s"); + + /** Static value Standard_F2s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F2S_V2 = fromString("Standard_F2s_v2"); + + /** Static value Standard_F32s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F32S_V2 = fromString("Standard_F32s_v2"); + + /** Static value Standard_F4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F4 = fromString("Standard_F4"); + + /** Static value Standard_F4s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F4S = fromString("Standard_F4s"); + + /** Static value Standard_F4s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F4S_V2 = fromString("Standard_F4s_v2"); + + /** Static value Standard_F64s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F64S_V2 = fromString("Standard_F64s_v2"); + + /** Static value Standard_F72s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F72S_V2 = fromString("Standard_F72s_v2"); + + /** Static value Standard_F8 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F8 = fromString("Standard_F8"); + + /** Static value Standard_F8s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F8S = fromString("Standard_F8s"); + + /** Static value Standard_F8s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_F8S_V2 = fromString("Standard_F8s_v2"); + + /** Static value Standard_G1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G1 = fromString("Standard_G1"); + + /** Static value Standard_G2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G2 = fromString("Standard_G2"); + + /** Static value Standard_G3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G3 = fromString("Standard_G3"); + + /** Static value Standard_G4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G4 = fromString("Standard_G4"); + + /** Static value Standard_G5 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G5 = fromString("Standard_G5"); + + /** Static value Standard_GS1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS1 = fromString("Standard_GS1"); + + /** Static value Standard_GS2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS2 = fromString("Standard_GS2"); + + /** Static value Standard_GS3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS3 = fromString("Standard_GS3"); + + /** Static value Standard_GS4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS4 = fromString("Standard_GS4"); + + /** Static value Standard_GS4-4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS4_4 = fromString("Standard_GS4-4"); + + /** Static value Standard_GS4-8 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS4_8 = fromString("Standard_GS4-8"); + + /** Static value Standard_GS5 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS5 = fromString("Standard_GS5"); + + /** Static value Standard_GS5-16 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS5_16 = fromString("Standard_GS5-16"); + + /** Static value Standard_GS5-8 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS5_8 = fromString("Standard_GS5-8"); + + /** Static value Standard_H16 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_H16 = fromString("Standard_H16"); + + /** Static value Standard_H16m for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_H16M = fromString("Standard_H16m"); + + /** Static value Standard_H16mr for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_H16MR = fromString("Standard_H16mr"); + + /** Static value Standard_H16r for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_H16R = fromString("Standard_H16r"); + + /** Static value Standard_H8 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_H8 = fromString("Standard_H8"); + + /** Static value Standard_H8m for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_H8M = fromString("Standard_H8m"); + + /** Static value Standard_L16s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_L16S = fromString("Standard_L16s"); + + /** Static value Standard_L32s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_L32S = fromString("Standard_L32s"); + + /** Static value Standard_L4s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_L4S = fromString("Standard_L4s"); + + /** Static value Standard_L8s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_L8S = fromString("Standard_L8s"); + + /** Static value Standard_M128-32ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_M128_32MS = fromString("Standard_M128-32ms"); + + /** Static value Standard_M128-64ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_M128_64MS = fromString("Standard_M128-64ms"); + + /** Static value Standard_M128ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_M128MS = fromString("Standard_M128ms"); + + /** Static value Standard_M128s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_M128S = fromString("Standard_M128s"); + + /** Static value Standard_M64-16ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_M64_16MS = fromString("Standard_M64-16ms"); + + /** Static value Standard_M64-32ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_M64_32MS = fromString("Standard_M64-32ms"); + + /** Static value Standard_M64ms for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_M64MS = fromString("Standard_M64ms"); + + /** Static value Standard_M64s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_M64S = fromString("Standard_M64s"); + + /** Static value Standard_NC12 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC12 = fromString("Standard_NC12"); + + /** Static value Standard_NC12s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC12S_V2 = fromString("Standard_NC12s_v2"); + + /** Static value Standard_NC12s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC12S_V3 = fromString("Standard_NC12s_v3"); + + /** Static value Standard_NC24 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC24 = fromString("Standard_NC24"); + + /** Static value Standard_NC24r for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC24R = fromString("Standard_NC24r"); + + /** Static value Standard_NC24rs_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC24RS_V2 = fromString("Standard_NC24rs_v2"); + + /** Static value Standard_NC24rs_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC24RS_V3 = fromString("Standard_NC24rs_v3"); + + /** Static value Standard_NC24s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC24S_V2 = fromString("Standard_NC24s_v2"); + + /** Static value Standard_NC24s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC24S_V3 = fromString("Standard_NC24s_v3"); + + /** Static value Standard_NC6 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC6 = fromString("Standard_NC6"); + + /** Static value Standard_NC6s_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC6S_V2 = fromString("Standard_NC6s_v2"); + + /** Static value Standard_NC6s_v3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NC6S_V3 = fromString("Standard_NC6s_v3"); + + /** Static value Standard_ND12s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_ND12S = fromString("Standard_ND12s"); + + /** Static value Standard_ND24rs for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_ND24RS = fromString("Standard_ND24rs"); + + /** Static value Standard_ND24s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_ND24S = fromString("Standard_ND24s"); + + /** Static value Standard_ND6s for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_ND6S = fromString("Standard_ND6s"); + + /** Static value Standard_NV12 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NV12 = fromString("Standard_NV12"); + + /** Static value Standard_NV24 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NV24 = fromString("Standard_NV24"); + + /** Static value Standard_NV6 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_NV6 = fromString("Standard_NV6"); + + /** + * Creates or finds a ContainerServiceVMSizeTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerServiceVMSizeTypes. + */ + @JsonCreator + public static ContainerServiceVMSizeTypes fromString(String name) { + return fromString(name, ContainerServiceVMSizeTypes.class); + } + + /** @return known ContainerServiceVMSizeTypes values. */ + public static Collection values() { + return values(ContainerServiceVMSizeTypes.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Count.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Count.java new file mode 100644 index 0000000000000..76345175964d2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Count.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.containerservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for Count. */ +public enum Count { + /** Enum value 1. */ + ONE(1), + + /** Enum value 3. */ + THREE(3), + + /** Enum value 5. */ + FIVE(5); + + /** The actual serialized value for a Count instance. */ + private final int value; + + Count(int value) { + this.value = value; + } + + /** + * Parses a serialized value to a Count instance. + * + * @param value the serialized value to parse. + * @return the parsed Count object, or null if unable to parse. + */ + @JsonCreator + public static Count fromInt(int value) { + Count[] items = Count.values(); + for (Count item : items) { + if (item.toInt() == value) { + return item; + } + } + return null; + } + + /** + * De-serializes the instance to int value. + * + * @return the int value. + */ + @JsonValue + public int toInt() { + return this.value; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/CredentialResult.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/CredentialResult.java new file mode 100644 index 0000000000000..04a124abf3b3e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The credential result response. */ +@Immutable +public final class CredentialResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CredentialResult.class); + + /* + * 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; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/CredentialResults.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/CredentialResults.java new file mode 100644 index 0000000000000..f9999261a1ba3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/CredentialResults.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.models.CredentialResultsInner object. + * + * @return the inner object. + */ + CredentialResultsInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Expander.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Expander.java new file mode 100644 index 0000000000000..49c9bbb33f27f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Expander.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Expander. */ +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 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); + } + + /** @return known Expander values. */ + public static Collection values() { + return values(Expander.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ExtendedLocation.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ExtendedLocation.java new file mode 100644 index 0000000000000..09754a02d5be2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The complex type of the extended location. */ +@Fluent +public final class ExtendedLocation { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtendedLocation.class); + + /* + * The name of the extended location. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the extended location. + */ + @JsonProperty(value = "type") + private ExtendedLocationTypes type; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ExtendedLocationTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ExtendedLocationTypes.java new file mode 100644 index 0000000000000..1bfc34e4ce8a3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ExtendedLocationTypes.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ExtendedLocationTypes. */ +public final class ExtendedLocationTypes extends ExpandableStringEnum { + /** Static value EdgeZone for ExtendedLocationTypes. */ + public static final ExtendedLocationTypes EDGE_ZONE = fromString("EdgeZone"); + + /** + * 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); + } + + /** @return known ExtendedLocationTypes values. */ + public static Collection values() { + return values(ExtendedLocationTypes.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/GpuInstanceProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/GpuInstanceProfile.java new file mode 100644 index 0000000000000..cec34d105b8f0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/GpuInstanceProfile.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for GpuInstanceProfile. */ +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 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); + } + + /** @return known GpuInstanceProfile values. */ + public static Collection values() { + return values(GpuInstanceProfile.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/KubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/KubeletConfig.java new file mode 100644 index 0000000000000..39fb3939d5105 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/KubeletConfig.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Kubelet configurations of agent nodes. */ +@Fluent +public final class KubeletConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubeletConfig.class); + + /* + * CPU Manager policy to use. + */ + @JsonProperty(value = "cpuManagerPolicy") + private String cpuManagerPolicy; + + /* + * Enable CPU CFS quota enforcement for containers that specify CPU limits. + */ + @JsonProperty(value = "cpuCfsQuota") + private Boolean cpuCfsQuota; + + /* + * Sets CPU CFS quota period value. + */ + @JsonProperty(value = "cpuCfsQuotaPeriod") + private String cpuCfsQuotaPeriod; + + /* + * The percent of disk usage after which image garbage collection is always + * run. + */ + @JsonProperty(value = "imageGcHighThreshold") + private Integer imageGcHighThreshold; + + /* + * The percent of disk usage before which image garbage collection is never + * run. + */ + @JsonProperty(value = "imageGcLowThreshold") + private Integer imageGcLowThreshold; + + /* + * Topology Manager policy to use. + */ + @JsonProperty(value = "topologyManagerPolicy") + private String topologyManagerPolicy; + + /* + * Allowlist 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; + + /** + * Get the cpuManagerPolicy property: CPU Manager policy to use. + * + * @return the cpuManagerPolicy value. + */ + public String cpuManagerPolicy() { + return this.cpuManagerPolicy; + } + + /** + * Set the cpuManagerPolicy property: CPU Manager policy to use. + * + * @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: Enable CPU CFS quota enforcement for containers that specify CPU limits. + * + * @return the cpuCfsQuota value. + */ + public Boolean cpuCfsQuota() { + return this.cpuCfsQuota; + } + + /** + * Set the cpuCfsQuota property: Enable CPU CFS quota enforcement for containers that specify CPU limits. + * + * @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: Sets CPU CFS quota period value. + * + * @return the cpuCfsQuotaPeriod value. + */ + public String cpuCfsQuotaPeriod() { + return this.cpuCfsQuotaPeriod; + } + + /** + * Set the cpuCfsQuotaPeriod property: Sets CPU CFS quota period value. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @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: Topology Manager policy to use. + * + * @return the topologyManagerPolicy value. + */ + public String topologyManagerPolicy() { + return this.topologyManagerPolicy; + } + + /** + * Set the topologyManagerPolicy property: Topology Manager policy to use. + * + * @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: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + * + * @return the allowedUnsafeSysctls value. + */ + public List allowedUnsafeSysctls() { + return this.allowedUnsafeSysctls; + } + + /** + * Set the allowedUnsafeSysctls property: Allowlist 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/KubeletDiskType.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/KubeletDiskType.java new file mode 100644 index 0000000000000..a46ad771173b4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/KubeletDiskType.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for KubeletDiskType. */ +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 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); + } + + /** @return known KubeletDiskType values. */ + public static Collection values() { + return values(KubeletDiskType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LicenseType.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LicenseType.java new file mode 100644 index 0000000000000..71b26f8f1f3e2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LicenseType.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for LicenseType. */ +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 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); + } + + /** @return known LicenseType values. */ + public static Collection values() { + return values(LicenseType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LinuxOSConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LinuxOSConfig.java new file mode 100644 index 0000000000000..e062291b2a140 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LinuxOSConfig.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** OS configurations of Linux agent nodes. */ +@Fluent +public final class LinuxOSConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LinuxOSConfig.class); + + /* + * Sysctl settings for Linux agent nodes. + */ + @JsonProperty(value = "sysctls") + private SysctlConfig sysctls; + + /* + * Transparent Huge Page enabled configuration. + */ + @JsonProperty(value = "transparentHugePageEnabled") + private String transparentHugePageEnabled; + + /* + * Transparent Huge Page defrag configuration. + */ + @JsonProperty(value = "transparentHugePageDefrag") + private String transparentHugePageDefrag; + + /* + * SwapFileSizeMB specifies size in MB of a swap file will be created on + * each node. + */ + @JsonProperty(value = "swapFileSizeMB") + private Integer swapFileSizeMB; + + /** + * 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: Transparent Huge Page enabled configuration. + * + * @return the transparentHugePageEnabled value. + */ + public String transparentHugePageEnabled() { + return this.transparentHugePageEnabled; + } + + /** + * Set the transparentHugePageEnabled property: Transparent Huge Page enabled configuration. + * + * @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: Transparent Huge Page defrag configuration. + * + * @return the transparentHugePageDefrag value. + */ + public String transparentHugePageDefrag() { + return this.transparentHugePageDefrag; + } + + /** + * Set the transparentHugePageDefrag property: Transparent Huge Page defrag configuration. + * + * @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: SwapFileSizeMB specifies size in MB of a swap file will be created on each node. + * + * @return the swapFileSizeMB value. + */ + public Integer swapFileSizeMB() { + return this.swapFileSizeMB; + } + + /** + * Set the swapFileSizeMB property: SwapFileSizeMB specifies size in MB of a swap file 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LoadBalancerSku.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LoadBalancerSku.java new file mode 100644 index 0000000000000..f0d0f739b312f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/LoadBalancerSku.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for LoadBalancerSku. */ +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 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); + } + + /** @return known LoadBalancerSku values. */ + public static Collection values() { + return values(LoadBalancerSku.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfiguration.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfiguration.java new file mode 100644 index 0000000000000..16dd5845bf495 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfiguration.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.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 meta data relating to this resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the timeInWeek property: Weekday time slots allowed to upgrade. + * + * @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 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 inner com.azure.resourcemanager.containerservice.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. + * @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 { + /** + * 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: Weekday time slots allowed to upgrade.. + * + * @param timeInWeek Weekday time slots allowed to upgrade. + * @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); + } + } + /** + * 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 { + /** + * 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: Weekday time slots allowed to upgrade.. + * + * @param timeInWeek Weekday time slots allowed to upgrade. + * @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); + } + } + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfigurationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfigurationListResult.java new file mode 100644 index 0000000000000..90cbe17d80d10 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.models.MaintenanceConfigurationInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List maintenance configurations operation. */ +@Fluent +public final class MaintenanceConfigurationListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceConfigurationListResult.class); + + /* + * 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; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfigurations.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/MaintenanceConfigurations.java new file mode 100644 index 0000000000000..54c271563bf9b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.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. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. The operation returns properties of + * each maintenance configuration. + * + * @param resourceGroupName The name of the resource group. + * @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. + */ + PagedIterable listByManagedCluster( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + MaintenanceConfiguration get(String resourceGroupName, String resourceName, String configName); + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of maintenance configurations by managed cluster and resource group. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String configName, Context context); + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Deletes the maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 response. + */ + Response deleteWithResponse( + String resourceGroupName, String resourceName, String configName, Context context); + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @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 maintenance configurations by managed cluster and resource group. + */ + MaintenanceConfiguration getById(String id); + + /** + * Gets the details of maintenance configurations by managed cluster and resource group. + * + * @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 maintenance configurations by managed cluster and resource group. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the maintenance configuration 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 the maintenance configuration 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. + * @return the 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedCluster.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedCluster.java new file mode 100644 index 0000000000000..176cfd69eb75d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedCluster.java @@ -0,0 +1,885 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.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 provisioningState property: The current deployment or provisioning state, which only appears in the + * response. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the powerState property: Represents 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: Version of Kubernetes specified when creating the managed cluster. + * + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * Gets the dnsPrefix property: DNS prefix specified when creating the managed cluster. + * + * @return the dnsPrefix value. + */ + String dnsPrefix(); + + /** + * Gets the fqdnSubdomain property: FQDN subdomain specified when creating private cluster with custom private dns + * zone. + * + * @return the fqdnSubdomain value. + */ + String fqdnSubdomain(); + + /** + * Gets the fqdn property: FQDN for the master pool. + * + * @return the fqdn value. + */ + String fqdn(); + + /** + * Gets the privateFqdn property: FQDN of private cluster. + * + * @return the privateFqdn value. + */ + String privateFqdn(); + + /** + * Gets the azurePortalFqdn property: FQDN for the master pool which used by proxy config. + * + * @return the azurePortalFqdn value. + */ + String azurePortalFqdn(); + + /** + * Gets the agentPoolProfiles property: Properties of the agent pool. + * + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * Gets the linuxProfile property: Profile for Linux VMs in the container service cluster. + * + * @return the linuxProfile value. + */ + ContainerServiceLinuxProfile linuxProfile(); + + /** + * Gets the windowsProfile property: Profile for Windows VMs in the container service 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: Profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + Map addonProfiles(); + + /** + * Gets the podIdentityProfile property: Profile of managed cluster pod identity. + * + * @return the podIdentityProfile value. + */ + ManagedClusterPodIdentityProfile podIdentityProfile(); + + /** + * Gets the nodeResourceGroup property: 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 enablePodSecurityPolicy property: (DEPRECATING) Whether to enable Kubernetes pod security policy + * (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + * + * @return the enablePodSecurityPolicy value. + */ + Boolean enablePodSecurityPolicy(); + + /** + * Gets the networkProfile property: Profile of network configuration. + * + * @return the networkProfile value. + */ + ContainerServiceNetworkProfile networkProfile(); + + /** + * Gets the aadProfile property: Profile of Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + ManagedClusterAadProfile aadProfile(); + + /** + * Gets the autoUpgradeProfile property: Profile of auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + ManagedClusterAutoUpgradeProfile autoUpgradeProfile(); + + /** + * Gets the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @return the autoScalerProfile value. + */ + ManagedClusterPropertiesAutoScalerProfile autoScalerProfile(); + + /** + * Gets the apiServerAccessProfile property: Access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + ManagedClusterApiServerAccessProfile apiServerAccessProfile(); + + /** + * Gets the diskEncryptionSetId property: ResourceId of the disk encryption set to use for enabling encryption at + * rest. + * + * @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 set to true, getting static credential will be disabled for this + * cluster. Expected to only be used for AAD clusters. + * + * @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 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 inner com.azure.resourcemanager.containerservice.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. + * @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.WithNodeResourceGroup, + DefinitionStages.WithEnableRbac, + DefinitionStages.WithEnablePodSecurityPolicy, + DefinitionStages.WithNetworkProfile, + DefinitionStages.WithAadProfile, + DefinitionStages.WithAutoUpgradeProfile, + DefinitionStages.WithAutoScalerProfile, + DefinitionStages.WithApiServerAccessProfile, + DefinitionStages.WithDiskEncryptionSetId, + DefinitionStages.WithIdentityProfile, + DefinitionStages.WithPrivateLinkResources, + DefinitionStages.WithDisableLocalAccounts, + DefinitionStages.WithHttpProxyConfig { + /** + * 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: Version of Kubernetes specified when creating the managed + * cluster.. + * + * @param kubernetesVersion Version of Kubernetes specified when creating the managed cluster. + * @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: DNS prefix specified when creating the managed cluster.. + * + * @param dnsPrefix DNS prefix specified when creating the managed cluster. + * @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: FQDN subdomain specified when creating private cluster with custom + * private dns zone.. + * + * @param fqdnSubdomain FQDN subdomain specified when creating private cluster with custom private dns zone. + * @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: Properties of the agent pool.. + * + * @param agentPoolProfiles Properties of the agent pool. + * @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: Profile for Linux VMs in the container service cluster.. + * + * @param linuxProfile Profile for Linux VMs in the container service 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: Profile for Windows VMs in the container service cluster.. + * + * @param windowsProfile Profile for Windows VMs in the container service 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: Profile of managed cluster add-on.. + * + * @param addonProfiles 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: Profile of managed cluster pod identity.. + * + * @param podIdentityProfile Profile of managed cluster pod identity. + * @return the next definition stage. + */ + WithCreate withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile); + } + /** The stage of the ManagedCluster definition allowing to specify nodeResourceGroup. */ + interface WithNodeResourceGroup { + /** + * Specifies the nodeResourceGroup property: Name of the resource group containing agent pool nodes.. + * + * @param nodeResourceGroup 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 enablePodSecurityPolicy. */ + interface WithEnablePodSecurityPolicy { + /** + * Specifies the enablePodSecurityPolicy property: (DEPRECATING) Whether to enable Kubernetes pod security + * policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + * aka.ms/aks/azpodpolicy.. + * + * @param enablePodSecurityPolicy (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). + * This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + * @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: Profile of network configuration.. + * + * @param networkProfile Profile of network configuration. + * @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: Profile of Azure Active Directory configuration.. + * + * @param aadProfile Profile of 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: Profile of auto upgrade configuration.. + * + * @param autoUpgradeProfile Profile of auto upgrade configuration. + * @return the next definition stage. + */ + WithCreate withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile); + } + /** 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: Access profile for managed cluster API server.. + * + * @param apiServerAccessProfile 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: ResourceId of the disk encryption set to use for enabling + * encryption at rest.. + * + * @param diskEncryptionSetId ResourceId of the disk encryption set to use for enabling encryption at rest. + * @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 set to true, getting static credential will be disabled + * for this cluster. Expected to only be used for AAD clusters.. + * + * @param disableLocalAccounts If set to true, getting static credential will be disabled for this cluster. + * Expected to only be used for AAD clusters. + * @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); + } + } + /** + * 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); + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster admin credential of the managed cluster with a specified resource group and name. + */ + CredentialResults listClusterAdminCredentials(); + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster admin credential of the managed cluster with a specified resource group and name. + */ + Response listClusterAdminCredentialsWithResponse(Context context); + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster user credential of the managed cluster with a specified resource group and name. + */ + CredentialResults listClusterUserCredentials(); + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster user credential of the managed cluster with a specified resource group and name. + */ + Response listClusterUserCredentialsWithResponse(Context context); + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + CredentialResults listClusterMonitoringUserCredentials(); + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + Response listClusterMonitoringUserCredentialsWithResponse(Context context); + + /** + * Update the service principal Profile for a managed cluster. + * + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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); + + /** + * Update the service principal Profile for a managed cluster. + * + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for 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 resetServicePrincipalProfile(ManagedClusterServicePrincipalProfile parameters, Context context); + + /** + * Update the AAD Profile for a managed cluster. + * + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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); + + /** + * Update the AAD Profile for a managed cluster. + * + * @param parameters Parameters supplied to the Reset AAD Profile operation for 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 resetAadProfile(ManagedClusterAadProfile parameters, Context context); + + /** + * Rotate certificates 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 rotateClusterCertificates(); + + /** + * Rotate certificates 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 rotateClusterCertificates(Context context); + + /** + * Stops a Running 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 stop(); + + /** + * Stops a Running 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 stop(Context context); + + /** + * Starts a Stopped 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 start(); + + /** + * Starts a Stopped 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 start(Context context); + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param requestPayload Parameters supplied to the RunCommand 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); + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param requestPayload Parameters supplied to the RunCommand 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 run command result. + */ + RunCommandResult runCommand(RunCommandRequest requestPayload, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAadProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAadProfile.java new file mode 100644 index 0000000000000..515bbd38b5053 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAadProfile.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** AADProfile specifies attributes for Azure Active Directory integration. */ +@Fluent +public final class ManagedClusterAadProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterAadProfile.class); + + /* + * 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; + + /* + * AAD group object IDs that will have admin role of the cluster. + */ + @JsonProperty(value = "adminGroupObjectIDs") + private List adminGroupObjectIDs; + + /* + * The client AAD application ID. + */ + @JsonProperty(value = "clientAppID") + private String clientAppId; + + /* + * The server AAD application ID. + */ + @JsonProperty(value = "serverAppID") + private String serverAppId; + + /* + * The server AAD application secret. + */ + @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; + + /** + * 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: 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: 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: The client AAD application ID. + * + * @return the clientAppId value. + */ + public String clientAppId() { + return this.clientAppId; + } + + /** + * Set the clientAppId property: The client AAD application ID. + * + * @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: The server AAD application ID. + * + * @return the serverAppId value. + */ + public String serverAppId() { + return this.serverAppId; + } + + /** + * Set the serverAppId property: The server AAD application ID. + * + * @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: The server AAD application secret. + * + * @return the serverAppSecret value. + */ + public String serverAppSecret() { + return this.serverAppSecret; + } + + /** + * Set the serverAppSecret property: The server AAD application secret. + * + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAccessProfile.java new file mode 100644 index 0000000000000..2150d61dfcafa --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAccessProfile.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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.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 kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeConfig value. + */ + byte[] kubeConfig(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterAccessProfileInner object. + * + * @return the inner object. + */ + ManagedClusterAccessProfileInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAddonProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAddonProfile.java new file mode 100644 index 0000000000000..584639870ef2d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAddonProfile.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A Kubernetes add-on profile for a managed cluster. */ +@Fluent +public final class ManagedClusterAddonProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterAddonProfile.class); + + /* + * 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") + private Map config; + + /* + * Information of user assigned identity used by this add-on. + */ + @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterAddonProfileIdentity identity; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAddonProfileIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAddonProfileIdentity.java new file mode 100644 index 0000000000000..1ab489427d8ce --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** Information of user assigned identity used by this add-on. */ +@Immutable +public class ManagedClusterAddonProfileIdentity extends UserAssignedIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterAddonProfileIdentity.class); + + /** {@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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAgentPoolProfile.java new file mode 100644 index 0000000000000..826316295eadd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAgentPoolProfile.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Profile for the container service agent pool. */ +@Fluent +public final class ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterAgentPoolProfile.class); + + /* + * Unique name of the agent pool profile in the context of the subscription + * and resource group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the name property: Unique name of the agent 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 agent pool profile in the context of the subscription and resource + * group. + * + * @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 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 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 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 withEnableFips(Boolean enableFips) { + super.withEnableFips(enableFips); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + super.withGpuInstanceProfile(gpuInstanceProfile); + 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")); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAgentPoolProfileProperties.java new file mode 100644 index 0000000000000..6a12de5b8a842 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAgentPoolProfileProperties.java @@ -0,0 +1,971 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Properties for the container service agent pool profile. */ +@Fluent +public class ManagedClusterAgentPoolProfileProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterAgentPoolProfileProperties.class); + + /* + * Number of agents (VMs) to host docker containers. Allowed values must be + * in the range of 0 to 100 (inclusive) for user pools and in the range of + * 1 to 100 (inclusive) for system pools. The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /* + * Size of agent VMs. + */ + @JsonProperty(value = "vmSize") + private String vmSize; + + /* + * OS Disk Size in GB to be used to specify the disk size for every machine + * in this 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; + + /* + * OS disk type to be used for machines in a given agent pool. Allowed + * values are 'Ephemeral' and 'Managed'. If unspecified, defaults to + * 'Ephemeral' when the VM supports ephemeral OS and has a cache disk + * larger than the requested OSDiskSizeGB. Otherwise, defaults to + * 'Managed'. May not be changed after creation. + */ + @JsonProperty(value = "osDiskType") + private OSDiskType osDiskType; + + /* + * KubeletDiskType determines the placement of emptyDir volumes, container + * runtime data root, and Kubelet ephemeral storage. Currently allows one + * value, OS, resulting in Kubelet using the OS disk for data. + */ + @JsonProperty(value = "kubeletDiskType") + private KubeletDiskType kubeletDiskType; + + /* + * VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + * pods + */ + @JsonProperty(value = "vnetSubnetID") + private String vnetSubnetId; + + /* + * Pod SubnetID specifies the VNet's subnet identifier for pods. + */ + @JsonProperty(value = "podSubnetID") + private String podSubnetId; + + /* + * 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; + + /* + * OsSKU to be used to specify os sku. Choose from Ubuntu(default) and + * CBLMariner for Linux OSType. Not applicable to Windows OSType. + */ + @JsonProperty(value = "osSKU") + private Ossku osSku; + + /* + * Maximum number of nodes for auto-scaling + */ + @JsonProperty(value = "maxCount") + private Integer maxCount; + + /* + * Minimum number of nodes for auto-scaling + */ + @JsonProperty(value = "minCount") + private Integer minCount; + + /* + * Whether to enable auto-scaler + */ + @JsonProperty(value = "enableAutoScaling") + private Boolean enableAutoScaling; + + /* + * AgentPoolType represents types of an agent pool + */ + @JsonProperty(value = "type") + private AgentPoolType type; + + /* + * AgentPoolMode represents mode of an agent pool + */ + @JsonProperty(value = "mode") + private AgentPoolMode mode; + + /* + * Version of orchestrator specified when creating the managed cluster. + */ + @JsonProperty(value = "orchestratorVersion") + private String orchestratorVersion; + + /* + * 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, which only appears in the + * response. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Describes whether the Agent Pool is Running or Stopped + */ + @JsonProperty(value = "powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /* + * Availability zones for nodes. Must use VirtualMachineScaleSets + * AgentPoolType. + */ + @JsonProperty(value = "availabilityZones") + private List availabilityZones; + + /* + * Enable public IP for nodes + */ + @JsonProperty(value = "enableNodePublicIP") + private Boolean enableNodePublicIp; + + /* + * Public IP Prefix ID. VM nodes use IPs assigned from this Public IP + * Prefix. + */ + @JsonProperty(value = "nodePublicIPPrefixID") + private String nodePublicIpPrefixId; + + /* + * ScaleSetPriority to be used to specify virtual machine scale set + * priority. Default to regular. + */ + @JsonProperty(value = "scaleSetPriority") + private ScaleSetPriority scaleSetPriority; + + /* + * ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to Delete. + */ + @JsonProperty(value = "scaleSetEvictionPolicy") + private ScaleSetEvictionPolicy scaleSetEvictionPolicy; + + /* + * SpotMaxPrice to be used to specify the maximum price you are willing to + * pay in US Dollars. Possible values are any decimal value greater than + * zero or -1 which indicates default price to be up-to on-demand. + */ + @JsonProperty(value = "spotMaxPrice") + private Float spotMaxPrice; + + /* + * Agent pool tags to be persisted on the agent pool virtual machine scale + * set. + */ + @JsonProperty(value = "tags") + private Map tags; + + /* + * Agent pool node labels to be persisted across all nodes in agent pool. + */ + @JsonProperty(value = "nodeLabels") + private Map nodeLabels; + + /* + * 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; + + /* + * KubeletConfig specifies the configuration of kubelet on agent nodes. + */ + @JsonProperty(value = "kubeletConfig") + private KubeletConfig kubeletConfig; + + /* + * LinuxOSConfig specifies the OS configuration of linux agent nodes. + */ + @JsonProperty(value = "linuxOSConfig") + private LinuxOSConfig linuxOSConfig; + + /* + * Whether to enable EncryptionAtHost + */ + @JsonProperty(value = "enableEncryptionAtHost") + private Boolean enableEncryptionAtHost; + + /* + * Whether to use FIPS enabled OS + */ + @JsonProperty(value = "enableFIPS") + private Boolean enableFips; + + /* + * GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g + * and MIG7g. + */ + @JsonProperty(value = "gpuInstanceProfile") + private GpuInstanceProfile gpuInstanceProfile; + + /** + * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (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 100 (inclusive) for user pools and in the range of 1 to 100 (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: Size of agent VMs. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: Size of agent VMs. + * + * @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 this + * 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 this + * 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: OS disk type to be used for machines in a given agent pool. Allowed values are + * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a + * cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after + * creation. + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set the osDiskType property: OS disk type to be used for machines in a given agent pool. Allowed values are + * 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports ephemeral OS and has a + * cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after + * creation. + * + * @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: KubeletDiskType determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the OS disk + * for data. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.kubeletDiskType; + } + + /** + * Set the kubeletDiskType property: KubeletDiskType determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the OS disk + * for data. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.kubeletDiskType = kubeletDiskType; + return this; + } + + /** + * Get the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.vnetSubnetId; + } + + /** + * Set the vnetSubnetId property: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @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: Pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.podSubnetId; + } + + /** + * Set the podSubnetId property: Pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @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: Maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set the maxPods property: 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: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. + * + * @return the osSku value. + */ + public Ossku osSku() { + return this.osSku; + } + + /** + * Set the osSku property: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + * OSType. Not applicable to Windows OSType. + * + * @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: Maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + public Integer maxCount() { + return this.maxCount; + } + + /** + * Set the maxCount property: 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: Minimum number of nodes for auto-scaling. + * + * @return the minCount value. + */ + public Integer minCount() { + return this.minCount; + } + + /** + * Set the minCount property: 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 type property: AgentPoolType represents types of an agent pool. + * + * @return the type value. + */ + public AgentPoolType type() { + return this.type; + } + + /** + * Set the type property: AgentPoolType represents types of an 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: AgentPoolMode represents mode of an agent pool. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set the mode property: AgentPoolMode represents mode of an agent pool. + * + * @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: Version of orchestrator specified when creating the managed cluster. + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: Version of orchestrator specified when creating the managed cluster. + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the nodeImageVersion property: 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, which only appears in the + * response. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the powerState property: Describes whether the Agent Pool is Running or Stopped. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * Get the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * + * @return the availabilityZones value. + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set the availabilityZones property: Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * + * @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: Enable public IP for nodes. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.enableNodePublicIp; + } + + /** + * Set the enableNodePublicIp property: Enable public IP for nodes. + * + * @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: Public IP Prefix ID. VM nodes use IPs assigned from this Public IP Prefix. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.nodePublicIpPrefixId; + } + + /** + * Set the nodePublicIpPrefixId property: Public IP Prefix ID. VM nodes use IPs assigned from this Public IP Prefix. + * + * @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: ScaleSetPriority to be used to specify virtual machine scale set priority. + * Default to regular. + * + * @return the scaleSetPriority value. + */ + public ScaleSetPriority scaleSetPriority() { + return this.scaleSetPriority; + } + + /** + * Set the scaleSetPriority property: ScaleSetPriority to be used to specify virtual machine scale set priority. + * Default to 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: ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to Delete. + * + * @return the scaleSetEvictionPolicy value. + */ + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.scaleSetEvictionPolicy; + } + + /** + * Set the scaleSetEvictionPolicy property: ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to 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: SpotMaxPrice to be used to specify the maximum price you are willing to pay in US + * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to + * on-demand. + * + * @return the spotMaxPrice value. + */ + public Float spotMaxPrice() { + return this.spotMaxPrice; + } + + /** + * Set the spotMaxPrice property: SpotMaxPrice to be used to specify the maximum price you are willing to pay in US + * Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to + * on-demand. + * + * @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: Agent pool 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: Agent pool 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: Agent pool 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: Agent pool 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: 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: 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: KubeletConfig specifies the configuration of kubelet on agent nodes. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.kubeletConfig; + } + + /** + * Set the kubeletConfig property: KubeletConfig specifies the configuration of kubelet on agent 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: LinuxOSConfig specifies the OS configuration of linux agent nodes. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.linuxOSConfig; + } + + /** + * Set the linuxOSConfig property: LinuxOSConfig specifies 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 EncryptionAtHost. + * + * @return the enableEncryptionAtHost value. + */ + public Boolean enableEncryptionAtHost() { + return this.enableEncryptionAtHost; + } + + /** + * Set the enableEncryptionAtHost property: Whether to enable EncryptionAtHost. + * + * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + this.enableEncryptionAtHost = enableEncryptionAtHost; + return this; + } + + /** + * Get the enableFips property: Whether to use FIPS enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Set the enableFips property: Whether to use FIPS enabled OS. + * + * @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. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + * + * @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. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.gpuInstanceProfile = gpuInstanceProfile; + 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(); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterApiServerAccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterApiServerAccessProfile.java new file mode 100644 index 0000000000000..a3aa43df653a4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterApiServerAccessProfile.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Access profile for managed cluster API server. */ +@Fluent +public final class ManagedClusterApiServerAccessProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterApiServerAccessProfile.class); + + /* + * Authorized IP Ranges to kubernetes API server. + */ + @JsonProperty(value = "authorizedIPRanges") + private List authorizedIpRanges; + + /* + * Whether to create the cluster as a private cluster or not. + */ + @JsonProperty(value = "enablePrivateCluster") + private Boolean enablePrivateCluster; + + /* + * Private dns zone mode for private cluster. + */ + @JsonProperty(value = "privateDNSZone") + private String privateDnsZone; + + /** + * Get the authorizedIpRanges property: Authorized IP Ranges to kubernetes API server. + * + * @return the authorizedIpRanges value. + */ + public List authorizedIpRanges() { + return this.authorizedIpRanges; + } + + /** + * Set the authorizedIpRanges property: Authorized IP Ranges to kubernetes API server. + * + * @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. + * + * @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. + * + * @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: Private dns zone mode for private cluster. + * + * @return the privateDnsZone value. + */ + public String privateDnsZone() { + return this.privateDnsZone; + } + + /** + * Set the privateDnsZone property: Private dns zone mode for private cluster. + * + * @param privateDnsZone the privateDnsZone value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withPrivateDnsZone(String privateDnsZone) { + this.privateDnsZone = privateDnsZone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAutoUpgradeProfile.java new file mode 100644 index 0000000000000..7f26746fd9662 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterAutoUpgradeProfile.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Auto upgrade profile for a managed cluster. */ +@Fluent +public final class ManagedClusterAutoUpgradeProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterAutoUpgradeProfile.class); + + /* + * upgrade channel for auto upgrade. + */ + @JsonProperty(value = "upgradeChannel") + private UpgradeChannel upgradeChannel; + + /** + * Get the upgradeChannel property: upgrade channel for auto upgrade. + * + * @return the upgradeChannel value. + */ + public UpgradeChannel upgradeChannel() { + return this.upgradeChannel; + } + + /** + * Set the upgradeChannel property: upgrade channel for auto upgrade. + * + * @param upgradeChannel the upgradeChannel value to set. + * @return the ManagedClusterAutoUpgradeProfile object itself. + */ + public ManagedClusterAutoUpgradeProfile withUpgradeChannel(UpgradeChannel upgradeChannel) { + this.upgradeChannel = upgradeChannel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterHttpProxyConfig.java new file mode 100644 index 0000000000000..90b1d3c882e60 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Configurations for provisioning the cluster with HTTP proxy servers. */ +@Fluent +public final class ManagedClusterHttpProxyConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterHttpProxyConfig.class); + + /* + * HTTP proxy server endpoint to use. + */ + @JsonProperty(value = "httpProxy") + private String httpProxy; + + /* + * HTTPS proxy server endpoint to use. + */ + @JsonProperty(value = "httpsProxy") + private String httpsProxy; + + /* + * 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; + + /** + * Get the httpProxy property: HTTP proxy server endpoint to use. + * + * @return the httpProxy value. + */ + public String httpProxy() { + return this.httpProxy; + } + + /** + * Set the httpProxy property: 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: HTTPS proxy server endpoint to use. + * + * @return the httpsProxy value. + */ + public String httpsProxy() { + return this.httpsProxy; + } + + /** + * Set the httpsProxy property: 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: Endpoints that should not go through proxy. + * + * @return the noProxy value. + */ + public List noProxy() { + return this.noProxy; + } + + /** + * Set the noProxy property: 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterIdentity.java new file mode 100644 index 0000000000000..db6a9e033d398 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterIdentity.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Identity for the managed cluster. */ +@Fluent +public class ManagedClusterIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterIdentity.class); + + /* + * 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. Type 'SystemAssigned' + * will use an implicitly created identity in master components and an + * auto-created user assigned identity in MC_ resource group in agent + * nodes. Type 'None' will not use MSI for the managed cluster, service + * principal will be used instead. + */ + @JsonProperty(value = "type") + private ResourceIdentityType type; + + /* + * The user identity associated with the managed cluster. This identity + * will be used in control plane and only one user assigned identity is + * allowed. The user identity dictionary key references will be ARM + * resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; + + /** + * 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. Type 'SystemAssigned' will use an + * implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group + * in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead. + * + * @return the type value. + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of identity used for the managed cluster. Type 'SystemAssigned' will use an + * implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group + * in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead. + * + * @param type the type value to set. + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The user identity associated with the managed cluster. This identity + * will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key + * references will 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 user identity associated with the managed cluster. This identity + * will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key + * references will 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 (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterIdentityUserAssignedIdentities.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterIdentityUserAssignedIdentities.java new file mode 100644 index 0000000000000..791c87bc28e79 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterIdentityUserAssignedIdentities.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.containerservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedClusterIdentityUserAssignedIdentities model. */ +@Immutable +public final class ManagedClusterIdentityUserAssignedIdentities { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(ManagedClusterIdentityUserAssignedIdentities.class); + + /* + * 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; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterListResult.java new file mode 100644 index 0000000000000..0a85fe47ef519 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List Managed Clusters operation. */ +@Fluent +public final class ManagedClusterListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterListResult.class); + + /* + * 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; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfile.java new file mode 100644 index 0000000000000..c8e3c406c1ea1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfile.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Profile of the managed cluster load balancer. */ +@Fluent +public final class ManagedClusterLoadBalancerProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterLoadBalancerProfile.class); + + /* + * 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; + + /* + * Desired number of allocated SNAT ports per VM. Allowed values must be 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 must be in + * the range of 4 to 120 (inclusive). The default value is 30 minutes. + */ + @JsonProperty(value = "idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * 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: Desired number of allocated SNAT ports per VM. Allowed values must be 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: Desired number of allocated SNAT ports per VM. Allowed values must be 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 must be 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 must be 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; + } + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java new file mode 100644 index 0000000000000..448d00c12072e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Desired managed outbound IPs for the cluster load balancer. */ +@Fluent +public final class ManagedClusterLoadBalancerProfileManagedOutboundIPs { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(ManagedClusterLoadBalancerProfileManagedOutboundIPs.class); + + /* + * Desired number of outbound IP 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; + + /** + * Get the count property: Desired number of outbound IP 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: Desired number of outbound IP 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java new file mode 100644 index 0000000000000..6767a74e80bb2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Desired outbound IP resources for the cluster load balancer. */ +@Fluent +public final class ManagedClusterLoadBalancerProfileOutboundIPs { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(ManagedClusterLoadBalancerProfileOutboundIPs.class); + + /* + * A list of public IP resources. + */ + @JsonProperty(value = "publicIPs") + private List publicIPs; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java new file mode 100644 index 0000000000000..d5b7ef2a5bf68 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Desired outbound IP Prefix resources for the cluster load balancer. */ +@Fluent +public final class ManagedClusterLoadBalancerProfileOutboundIpPrefixes { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(ManagedClusterLoadBalancerProfileOutboundIpPrefixes.class); + + /* + * A list of public IP prefix resources. + */ + @JsonProperty(value = "publicIPPrefixes") + private List publicIpPrefixes; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentity.java new file mode 100644 index 0000000000000..88f3eef4800be --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentity.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedClusterPodIdentity model. */ +@Fluent +public class ManagedClusterPodIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterPodIdentity.class); + + /* + * Name of the pod identity. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Namespace of the pod identity. + */ + @JsonProperty(value = "namespace", required = true) + private String namespace; + + /* + * Binding selector to use for the AzureIdentityBinding resource. + */ + @JsonProperty(value = "bindingSelector") + private String bindingSelector; + + /* + * Information of the user assigned identity. + */ + @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; + + /** + * Get the name property: Name of the pod identity. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: 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: Namespace of the pod identity. + * + * @return the namespace value. + */ + public String namespace() { + return this.namespace; + } + + /** + * Set the namespace property: 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: Binding selector to use for the AzureIdentityBinding resource. + * + * @return the bindingSelector value. + */ + public String bindingSelector() { + return this.bindingSelector; + } + + /** + * Set the bindingSelector property: 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: Information of the user assigned identity. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Information of the user assigned identity. + * + * @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(); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityException.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityException.java new file mode 100644 index 0000000000000..105e6e9011b4f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityException.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The ManagedClusterPodIdentityException model. */ +@Fluent +public final class ManagedClusterPodIdentityException { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterPodIdentityException.class); + + /* + * Name of the pod identity exception. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Namespace of the pod identity exception. + */ + @JsonProperty(value = "namespace", required = true) + private String namespace; + + /* + * Pod labels to match. + */ + @JsonProperty(value = "podLabels", required = true) + private Map podLabels; + + /** + * Get the name property: Name of the pod identity exception. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: 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: Namespace of the pod identity exception. + * + * @return the namespace value. + */ + public String namespace() { + return this.namespace; + } + + /** + * Set the namespace property: 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: Pod labels to match. + * + * @return the podLabels value. + */ + public Map podLabels() { + return this.podLabels; + } + + /** + * Set the podLabels property: 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")); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProfile.java new file mode 100644 index 0000000000000..7713cdc192e8c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProfile.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ManagedClusterPodIdentityProfile model. */ +@Fluent +public final class ManagedClusterPodIdentityProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterPodIdentityProfile.class); + + /* + * Whether the pod identity addon is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Customer consent for enabling AAD pod identity addon in cluster using + * Kubenet network plugin. + */ + @JsonProperty(value = "allowNetworkPluginKubenet") + private Boolean allowNetworkPluginKubenet; + + /* + * User assigned pod identity settings. + */ + @JsonProperty(value = "userAssignedIdentities") + private List userAssignedIdentities; + + /* + * User assigned pod identity exception settings. + */ + @JsonProperty(value = "userAssignedIdentityExceptions") + private List userAssignedIdentityExceptions; + + /** + * 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: Customer consent for enabling AAD pod identity addon in cluster using + * Kubenet network plugin. + * + * @return the allowNetworkPluginKubenet value. + */ + public Boolean allowNetworkPluginKubenet() { + return this.allowNetworkPluginKubenet; + } + + /** + * Set the allowNetworkPluginKubenet property: Customer consent for enabling AAD pod identity addon in cluster using + * Kubenet network plugin. + * + * @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: User assigned pod identity settings. + * + * @return the userAssignedIdentities value. + */ + public List userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: User assigned pod identity settings. + * + * @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: User assigned pod identity exception settings. + * + * @return the userAssignedIdentityExceptions value. + */ + public List userAssignedIdentityExceptions() { + return this.userAssignedIdentityExceptions; + } + + /** + * Set the userAssignedIdentityExceptions property: User assigned pod identity exception settings. + * + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProvisioningInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProvisioningInfo.java new file mode 100644 index 0000000000000..c1a85ca2f9359 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProvisioningInfo.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedClusterPodIdentityProvisioningInfo model. */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterPodIdentityProvisioningInfo.class); + + /* + * Pod identity assignment error (if any). + */ + @JsonProperty(value = "error") + private ManagementError error; + + /** + * Get the error property: Pod identity assignment error (if any). + * + * @return the error value. + */ + public ManagementError 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(ManagementError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProvisioningState.java new file mode 100644 index 0000000000000..c4e40bfc0a5e2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPodIdentityProvisioningState.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ManagedClusterPodIdentityProvisioningState. */ +public final class ManagedClusterPodIdentityProvisioningState + extends ExpandableStringEnum { + /** Static value Assigned for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState ASSIGNED = fromString("Assigned"); + + /** Static value Updating for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState FAILED = fromString("Failed"); + + /** + * 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); + } + + /** @return known ManagedClusterPodIdentityProvisioningState values. */ + public static Collection values() { + return values(ManagedClusterPodIdentityProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPoolUpgradeProfile.java new file mode 100644 index 0000000000000..a6e1c164846af --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPoolUpgradeProfile.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of available upgrade versions. */ +@Fluent +public final class ManagedClusterPoolUpgradeProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterPoolUpgradeProfile.class); + + /* + * Kubernetes version (major, minor, patch). + */ + @JsonProperty(value = "kubernetesVersion", required = true) + private String kubernetesVersion; + + /* + * 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; + + /** + * Get the kubernetesVersion property: Kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: 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: Pool name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: 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()); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java new file mode 100644 index 0000000000000..3875c6f95c6a4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedClusterPoolUpgradeProfileUpgradesItem model. */ +@Fluent +public final class ManagedClusterPoolUpgradeProfileUpgradesItem { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(ManagedClusterPoolUpgradeProfileUpgradesItem.class); + + /* + * Kubernetes version (major, minor, patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** + * Get the kubernetesVersion property: Kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: 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 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 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPropertiesAutoScalerProfile.java new file mode 100644 index 0000000000000..92187127a55cc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPropertiesAutoScalerProfile.java @@ -0,0 +1,467 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Parameters to be applied to the cluster-autoscaler when enabled. */ +@Fluent +public final class ManagedClusterPropertiesAutoScalerProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterPropertiesAutoScalerProfile.class); + + /* + * The balance-similar-node-groups property. + */ + @JsonProperty(value = "balance-similar-node-groups") + private String balanceSimilarNodeGroups; + + /* + * The expander property. + */ + @JsonProperty(value = "expander") + private Expander expander; + + /* + * The max-empty-bulk-delete property. + */ + @JsonProperty(value = "max-empty-bulk-delete") + private String maxEmptyBulkDelete; + + /* + * The max-graceful-termination-sec property. + */ + @JsonProperty(value = "max-graceful-termination-sec") + private String maxGracefulTerminationSec; + + /* + * The max-node-provision-time property. + */ + @JsonProperty(value = "max-node-provision-time") + private String maxNodeProvisionTime; + + /* + * The max-total-unready-percentage property. + */ + @JsonProperty(value = "max-total-unready-percentage") + private String maxTotalUnreadyPercentage; + + /* + * The new-pod-scale-up-delay property. + */ + @JsonProperty(value = "new-pod-scale-up-delay") + private String newPodScaleUpDelay; + + /* + * The ok-total-unready-count property. + */ + @JsonProperty(value = "ok-total-unready-count") + private String okTotalUnreadyCount; + + /* + * The scan-interval property. + */ + @JsonProperty(value = "scan-interval") + private String scanInterval; + + /* + * The scale-down-delay-after-add property. + */ + @JsonProperty(value = "scale-down-delay-after-add") + private String scaleDownDelayAfterAdd; + + /* + * The scale-down-delay-after-delete property. + */ + @JsonProperty(value = "scale-down-delay-after-delete") + private String scaleDownDelayAfterDelete; + + /* + * The scale-down-delay-after-failure property. + */ + @JsonProperty(value = "scale-down-delay-after-failure") + private String scaleDownDelayAfterFailure; + + /* + * The scale-down-unneeded-time property. + */ + @JsonProperty(value = "scale-down-unneeded-time") + private String scaleDownUnneededTime; + + /* + * The scale-down-unready-time property. + */ + @JsonProperty(value = "scale-down-unready-time") + private String scaleDownUnreadyTime; + + /* + * The scale-down-utilization-threshold property. + */ + @JsonProperty(value = "scale-down-utilization-threshold") + private String scaleDownUtilizationThreshold; + + /* + * The skip-nodes-with-local-storage property. + */ + @JsonProperty(value = "skip-nodes-with-local-storage") + private String skipNodesWithLocalStorage; + + /* + * The skip-nodes-with-system-pods property. + */ + @JsonProperty(value = "skip-nodes-with-system-pods") + private String skipNodesWithSystemPods; + + /** + * Get the balanceSimilarNodeGroups property: The balance-similar-node-groups property. + * + * @return the balanceSimilarNodeGroups value. + */ + public String balanceSimilarNodeGroups() { + return this.balanceSimilarNodeGroups; + } + + /** + * Set the balanceSimilarNodeGroups property: The balance-similar-node-groups property. + * + * @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 property. + * + * @return the expander value. + */ + public Expander expander() { + return this.expander; + } + + /** + * Set the expander property: The expander property. + * + * @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 max-empty-bulk-delete property. + * + * @return the maxEmptyBulkDelete value. + */ + public String maxEmptyBulkDelete() { + return this.maxEmptyBulkDelete; + } + + /** + * Set the maxEmptyBulkDelete property: The max-empty-bulk-delete property. + * + * @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 max-graceful-termination-sec property. + * + * @return the maxGracefulTerminationSec value. + */ + public String maxGracefulTerminationSec() { + return this.maxGracefulTerminationSec; + } + + /** + * Set the maxGracefulTerminationSec property: The max-graceful-termination-sec property. + * + * @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 max-node-provision-time property. + * + * @return the maxNodeProvisionTime value. + */ + public String maxNodeProvisionTime() { + return this.maxNodeProvisionTime; + } + + /** + * Set the maxNodeProvisionTime property: The max-node-provision-time property. + * + * @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 max-total-unready-percentage property. + * + * @return the maxTotalUnreadyPercentage value. + */ + public String maxTotalUnreadyPercentage() { + return this.maxTotalUnreadyPercentage; + } + + /** + * Set the maxTotalUnreadyPercentage property: The max-total-unready-percentage property. + * + * @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: The new-pod-scale-up-delay property. + * + * @return the newPodScaleUpDelay value. + */ + public String newPodScaleUpDelay() { + return this.newPodScaleUpDelay; + } + + /** + * Set the newPodScaleUpDelay property: The new-pod-scale-up-delay property. + * + * @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 ok-total-unready-count property. + * + * @return the okTotalUnreadyCount value. + */ + public String okTotalUnreadyCount() { + return this.okTotalUnreadyCount; + } + + /** + * Set the okTotalUnreadyCount property: The ok-total-unready-count property. + * + * @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: The scan-interval property. + * + * @return the scanInterval value. + */ + public String scanInterval() { + return this.scanInterval; + } + + /** + * Set the scanInterval property: The scan-interval property. + * + * @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: The scale-down-delay-after-add property. + * + * @return the scaleDownDelayAfterAdd value. + */ + public String scaleDownDelayAfterAdd() { + return this.scaleDownDelayAfterAdd; + } + + /** + * Set the scaleDownDelayAfterAdd property: The scale-down-delay-after-add property. + * + * @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: The scale-down-delay-after-delete property. + * + * @return the scaleDownDelayAfterDelete value. + */ + public String scaleDownDelayAfterDelete() { + return this.scaleDownDelayAfterDelete; + } + + /** + * Set the scaleDownDelayAfterDelete property: The scale-down-delay-after-delete property. + * + * @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: The scale-down-delay-after-failure property. + * + * @return the scaleDownDelayAfterFailure value. + */ + public String scaleDownDelayAfterFailure() { + return this.scaleDownDelayAfterFailure; + } + + /** + * Set the scaleDownDelayAfterFailure property: The scale-down-delay-after-failure property. + * + * @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: The scale-down-unneeded-time property. + * + * @return the scaleDownUnneededTime value. + */ + public String scaleDownUnneededTime() { + return this.scaleDownUnneededTime; + } + + /** + * Set the scaleDownUnneededTime property: The scale-down-unneeded-time property. + * + * @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: The scale-down-unready-time property. + * + * @return the scaleDownUnreadyTime value. + */ + public String scaleDownUnreadyTime() { + return this.scaleDownUnreadyTime; + } + + /** + * Set the scaleDownUnreadyTime property: The scale-down-unready-time property. + * + * @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: The scale-down-utilization-threshold property. + * + * @return the scaleDownUtilizationThreshold value. + */ + public String scaleDownUtilizationThreshold() { + return this.scaleDownUtilizationThreshold; + } + + /** + * Set the scaleDownUtilizationThreshold property: The scale-down-utilization-threshold property. + * + * @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: The skip-nodes-with-local-storage property. + * + * @return the skipNodesWithLocalStorage value. + */ + public String skipNodesWithLocalStorage() { + return this.skipNodesWithLocalStorage; + } + + /** + * Set the skipNodesWithLocalStorage property: The skip-nodes-with-local-storage property. + * + * @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: The skip-nodes-with-system-pods property. + * + * @return the skipNodesWithSystemPods value. + */ + public String skipNodesWithSystemPods() { + return this.skipNodesWithSystemPods; + } + + /** + * Set the skipNodesWithSystemPods property: The skip-nodes-with-system-pods property. + * + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPropertiesIdentityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPropertiesIdentityProfile.java new file mode 100644 index 0000000000000..4d62e8fb6285d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterPropertiesIdentityProfile.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.containerservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** The ManagedClusterPropertiesIdentityProfile model. */ +@Immutable +public final class ManagedClusterPropertiesIdentityProfile extends UserAssignedIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterPropertiesIdentityProfile.class); + + /** {@inheritDoc} */ + @Override + public ManagedClusterPropertiesIdentityProfile withResourceId(String resourceId) { + super.withResourceId(resourceId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterPropertiesIdentityProfile withClientId(String clientId) { + super.withClientId(clientId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedClusterPropertiesIdentityProfile 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterServicePrincipalProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterServicePrincipalProfile.java new file mode 100644 index 0000000000000..aa658f3b750c4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterServicePrincipalProfile.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information about a service principal identity for the cluster to use for manipulating Azure APIs. */ +@Fluent +public final class ManagedClusterServicePrincipalProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterServicePrincipalProfile.class); + + /* + * 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; + + /** + * 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")); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSku.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSku.java new file mode 100644 index 0000000000000..f9060b724481f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSku.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ManagedClusterSku model. */ +@Fluent +public final class ManagedClusterSku { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterSku.class); + + /* + * Name of a managed cluster SKU. + */ + @JsonProperty(value = "name") + private ManagedClusterSkuName name; + + /* + * Tier of a managed cluster SKU. + */ + @JsonProperty(value = "tier") + private ManagedClusterSkuTier tier; + + /** + * Get the name property: Name of a managed cluster SKU. + * + * @return the name value. + */ + public ManagedClusterSkuName name() { + return this.name; + } + + /** + * Set the name property: 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: Tier of a managed cluster SKU. + * + * @return the tier value. + */ + public ManagedClusterSkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: Tier of a managed cluster SKU. + * + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSkuName.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSkuName.java new file mode 100644 index 0000000000000..44d13c8e0e4c2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSkuName.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ManagedClusterSkuName. */ +public final class ManagedClusterSkuName extends ExpandableStringEnum { + /** Static value Basic for ManagedClusterSkuName. */ + public static final ManagedClusterSkuName BASIC = fromString("Basic"); + + /** + * 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); + } + + /** @return known ManagedClusterSkuName values. */ + public static Collection values() { + return values(ManagedClusterSkuName.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSkuTier.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSkuTier.java new file mode 100644 index 0000000000000..d22f78d080a89 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterSkuTier.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ManagedClusterSkuTier. */ +public final class ManagedClusterSkuTier extends ExpandableStringEnum { + /** Static value Paid for ManagedClusterSkuTier. */ + public static final ManagedClusterSkuTier PAID = fromString("Paid"); + + /** Static value Free for ManagedClusterSkuTier. */ + public static final ManagedClusterSkuTier FREE = fromString("Free"); + + /** + * 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); + } + + /** @return known ManagedClusterSkuTier values. */ + public static Collection values() { + return values(ManagedClusterSkuTier.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterUpgradeProfile.java new file mode 100644 index 0000000000000..180f538330029 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterUpgradeProfile.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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import java.util.List; + +/** An immutable client-side representation of ManagedClusterUpgradeProfile. */ +public interface ManagedClusterUpgradeProfile { + /** + * Gets the id property: Id of upgrade profile. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of upgrade profile. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Type of 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.containerservice.generated.fluent.models.ManagedClusterUpgradeProfileInner object. + * + * @return the inner object. + */ + ManagedClusterUpgradeProfileInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterWindowsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterWindowsProfile.java new file mode 100644 index 0000000000000..977ced0966729 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusterWindowsProfile.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Profile for Windows VMs in the container service cluster. */ +@Fluent +public final class ManagedClusterWindowsProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedClusterWindowsProfile.class); + + /* + * 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 licenseType to use for Windows VMs. Windows_Server is used to enable + * Azure Hybrid User Benefits for Windows VMs. + */ + @JsonProperty(value = "licenseType") + private LicenseType licenseType; + + /* + * Whether to enable CSI proxy. + */ + @JsonProperty(value = "enableCSIProxy") + private Boolean enableCsiProxy; + + /** + * 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 licenseType to use for Windows VMs. Windows_Server is used to enable Azure + * Hybrid User Benefits for Windows VMs. + * + * @return the licenseType value. + */ + public LicenseType licenseType() { + return this.licenseType; + } + + /** + * Set the licenseType property: The licenseType to use for Windows VMs. Windows_Server is used to enable Azure + * Hybrid User Benefits for Windows VMs. + * + * @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. + * + * @return the enableCsiProxy value. + */ + public Boolean enableCsiProxy() { + return this.enableCsiProxy; + } + + /** + * Set the enableCsiProxy property: Whether to enable CSI proxy. + * + * @param enableCsiProxy the enableCsiProxy value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withEnableCsiProxy(Boolean enableCsiProxy) { + this.enableCsiProxy = enableCsiProxy; + 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")); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusters.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusters.java new file mode 100644 index 0000000000000..8f70f76e49290 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ManagedClusters.java @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 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 supported OS options in the specified subscription. + */ + OSOptionProfile getOSOptions(String location); + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of a supported Azure region. + * @param resourceType 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. + */ + Response getOSOptionsWithResponse(String location, String resourceType, Context context); + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + PagedIterable list(); + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 managed clusters in the specified subscription. + */ + PagedIterable list(Context context); + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each + * 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 Managed Clusters operation. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each + * 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 Managed Clusters operation. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + ManagedClusterUpgradeProfile getUpgradeProfile(String resourceGroupName, String resourceName); + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the upgrade profile for a managed cluster with a specified resource group and name. + */ + Response getUpgradeProfileWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + ManagedClusterAccessProfile getAccessProfile(String resourceGroupName, String resourceName, String roleName); + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. + * @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 the accessProfile for the specified role name of the managed cluster with a specified resource group and + * name. + */ + Response getAccessProfileWithResponse( + String resourceGroupName, String resourceName, String roleName, Context context); + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + CredentialResults listClusterAdminCredentials(String resourceGroupName, String resourceName); + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster admin credential of the managed cluster with a specified resource group and name. + */ + Response listClusterAdminCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + CredentialResults listClusterUserCredentials(String resourceGroupName, String resourceName); + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster user credential of the managed cluster with a specified resource group and name. + */ + Response listClusterUserCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + CredentialResults listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName); + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + Response listClusterMonitoringUserCredentialsWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + ManagedCluster getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the managed cluster with a specified resource group and name. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Deletes the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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 the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for a 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); + + /** + * Update the service principal Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset Service Principal Profile operation for 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 resetServicePrincipalProfile( + String resourceGroupName, + String resourceName, + ManagedClusterServicePrincipalProfile parameters, + Context context); + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for a 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); + + /** + * Update the AAD Profile for a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Reset AAD Profile operation for 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 resetAadProfile( + String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context); + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @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); + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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); + + /** + * Submit a command to run against managed kubernetes service, it will create a pod to run the command. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload Parameters supplied to the RunCommand 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 run command result. + */ + RunCommandResult runCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context); + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + RunCommandResult getCommandResult(String resourceGroupName, String resourceName, String commandId); + + /** + * Get command result from previous runCommand invoke. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the 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 command result from previous runCommand invoke. + */ + Response getCommandResultWithResponse( + String resourceGroupName, String resourceName, String commandId, Context context); + + /** + * Gets the details of the 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. + * @return the details of the managed cluster with a specified resource group and name. + */ + ManagedCluster getById(String id); + + /** + * Gets the details of the 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. + * @return the details of the managed cluster with a specified resource group and name. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the 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 the 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 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkMode.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkMode.java new file mode 100644 index 0000000000000..96a77765ee488 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkMode.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for NetworkMode. */ +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 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); + } + + /** @return known NetworkMode values. */ + public static Collection values() { + return values(NetworkMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkPlugin.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkPlugin.java new file mode 100644 index 0000000000000..e3e82a0f633bf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkPlugin.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for NetworkPlugin. */ +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"); + + /** + * 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); + } + + /** @return known NetworkPlugin values. */ + public static Collection values() { + return values(NetworkPlugin.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkPolicy.java new file mode 100644 index 0000000000000..e0dfc819ae3e2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/NetworkPolicy.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for NetworkPolicy. */ +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"); + + /** + * 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); + } + + /** @return known NetworkPolicy values. */ + public static Collection values() { + return values(NetworkPolicy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSDiskType.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSDiskType.java new file mode 100644 index 0000000000000..0d1731d31d888 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSDiskType.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OSDiskType. */ +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 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); + } + + /** @return known OSDiskType values. */ + public static Collection values() { + return values(OSDiskType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSOptionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSOptionProfile.java new file mode 100644 index 0000000000000..5b1c17fb40e6a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSOptionProfile.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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.OSOptionProfileInner; +import java.util.List; + +/** An immutable client-side representation of OSOptionProfile. */ +public interface OSOptionProfile { + /** + * Gets the id property: Id of the OS option profile. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the OS option profile. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Type of the OS option profile. + * + * @return the type value. + */ + String type(); + + /** + * Gets the osOptionPropertyList property: The list of OS option properties. + * + * @return the osOptionPropertyList value. + */ + List osOptionPropertyList(); + + /** + * Gets the inner com.azure.resourcemanager.containerservice.generated.fluent.models.OSOptionProfileInner object. + * + * @return the inner object. + */ + OSOptionProfileInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSOptionProperty.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSOptionProperty.java new file mode 100644 index 0000000000000..74617d0c5d4a9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSOptionProperty.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** OS option property. */ +@Fluent +public final class OSOptionProperty { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OSOptionProperty.class); + + /* + * OS type. + */ + @JsonProperty(value = "os-type", required = true) + private String osType; + + /* + * Whether FIPS image is enabled. + */ + @JsonProperty(value = "enable-fips-image", required = true) + private boolean enableFipsImage; + + /** + * Get the osType property: OS type. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Set the osType property: 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 FIPS image is enabled. + * + * @return the enableFipsImage value. + */ + public boolean enableFipsImage() { + return this.enableFipsImage; + } + + /** + * Set the enableFipsImage property: Whether FIPS image is 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")); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSType.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSType.java new file mode 100644 index 0000000000000..e7f60f8592d2b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OSType.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OSType. */ +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 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); + } + + /** @return known OSType values. */ + public static Collection values() { + return values(OSType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OperationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OperationListResult.java new file mode 100644 index 0000000000000..687d592de161b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.generated.fluent.models.OperationValueInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The List Compute Operation operation response. */ +@Immutable +public final class OperationListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); + + /* + * The list of compute operations + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /** + * Get the value property: The list of compute 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OperationValue.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OperationValue.java new file mode 100644 index 0000000000000..987e749745a7b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OperationValue.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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.OperationValueInner; + +/** An immutable client-side representation of OperationValue. */ +public interface OperationValue { + /** + * Gets the origin property: The origin of the compute operation. + * + * @return the origin value. + */ + String origin(); + + /** + * Gets the name property: The name of the compute operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the operation property: The display name of the compute 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.containerservice.generated.fluent.models.OperationValueInner object. + * + * @return the inner object. + */ + OperationValueInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Operations.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Operations.java new file mode 100644 index 0000000000000..201a6a24b0d7a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.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 compute 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 compute operations. + */ + PagedIterable list(); + + /** + * Gets a list of compute 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 compute operations. + */ + PagedIterable list(Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Ossku.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Ossku.java new file mode 100644 index 0000000000000..01a3f191cdddf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/Ossku.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Ossku. */ +public final class Ossku extends ExpandableStringEnum { + /** Static value Ubuntu for Ossku. */ + public static final Ossku UBUNTU = fromString("Ubuntu"); + + /** Static value CBLMariner for Ossku. */ + public static final Ossku CBLMARINER = fromString("CBLMariner"); + + /** + * 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); + } + + /** @return known Ossku values. */ + public static Collection values() { + return values(Ossku.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OutboundType.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OutboundType.java new file mode 100644 index 0000000000000..457963802c9e6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/OutboundType.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for 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"); + + /** + * 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); + } + + /** @return known OutboundType values. */ + public static Collection values() { + return values(OutboundType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PowerState.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PowerState.java new file mode 100644 index 0000000000000..ca6cd2a91498f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the Power State of the cluster. */ +@Fluent +public final class PowerState { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PowerState.class); + + /* + * Tells whether the cluster is Running or Stopped + */ + @JsonProperty(value = "code") + private Code code; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpoint.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpoint.java new file mode 100644 index 0000000000000..defa0e46b5bc7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Private endpoint which a connection belongs to. */ +@Fluent +public final class PrivateEndpoint { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class); + + /* + * The resource Id for private endpoint + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the id property: The resource Id for private endpoint. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The resource Id for 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnection.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnection.java new file mode 100644 index 0000000000000..44ca3652ad007 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnection.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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.models.PrivateEndpointConnectionInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnectionListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 0000000000000..aaf6176e1e743 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.models.PrivateEndpointConnectionListResultInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionListResultInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnectionProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 0000000000000..3bd309730afcb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnectionProvisioningState.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PrivateEndpointConnectionProvisioningState. */ +public final class PrivateEndpointConnectionProvisioningState + extends ExpandableStringEnum { + /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** 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"); + + /** + * 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); + } + + /** @return known PrivateEndpointConnectionProvisioningState values. */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnections.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnections.java new file mode 100644 index 0000000000000..87fcc3dd5e823 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateEndpointConnections.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.containerservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateEndpointConnectionInner; + +/** Resource collection API of PrivateEndpointConnections. */ +public interface PrivateEndpointConnections { + /** + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + PrivateEndpointConnectionListResult list(String resourceGroupName, String resourceName); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of + * each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + Response listWithResponse( + String resourceGroupName, String resourceName, Context context); + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + PrivateEndpointConnection get(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @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 details of the private endpoint connection by managed cluster and resource group. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection 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. + */ + PrivateEndpointConnection update( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection 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 private endpoint connection. + */ + Response updateWithResponse( + String resourceGroupName, + String resourceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, + Context context); + + /** + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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 the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResource.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResource.java new file mode 100644 index 0000000000000..c46a1c0df4d25 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResource.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.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.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: 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.containerservice.generated.fluent.models.PrivateLinkResourceInner + * object. + * + * @return the inner object. + */ + PrivateLinkResourceInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResources.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResources.java new file mode 100644 index 0000000000000..dd99000b73723 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResources.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.containerservice.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. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + PrivateLinkResourcesListResult list(String resourceGroupName, String resourceName); + + /** + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each + * private link resource. + * + * @param resourceGroupName The name of the resource group. + * @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 in the specified managed cluster. + */ + Response listWithResponse( + String resourceGroupName, String resourceName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResourcesListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResourcesListResult.java new file mode 100644 index 0000000000000..822a373d3e708 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkResourcesListResult.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.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.containerservice.generated.fluent.models.PrivateLinkResourcesListResultInner object. + * + * @return the inner object. + */ + PrivateLinkResourcesListResultInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkServiceConnectionState.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 0000000000000..82fee76c7fbb0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The state of a private link service connection. */ +@Fluent +public final class PrivateLinkServiceConnectionState { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class); + + /* + * The private link service connection status. + */ + @JsonProperty(value = "status") + private ConnectionStatus status; + + /* + * The private link service connection description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResolvePrivateLinkServiceIds.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResolvePrivateLinkServiceIds.java new file mode 100644 index 0000000000000..6013c6964dd81 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.generated.fluent.models.PrivateLinkResourceInner; + +/** Resource collection API of ResolvePrivateLinkServiceIds. */ +public interface ResolvePrivateLinkServiceIds { + /** + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + PrivateLinkResource post(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); + + /** + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied 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 the specified managed cluster. + */ + Response postWithResponse( + String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResourceIdentityType.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResourceIdentityType.java new file mode 100644 index 0000000000000..18045311ffc63 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResourceIdentityType.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.containerservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ResourceIdentityType. */ +public enum ResourceIdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** 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) { + ResourceIdentityType[] items = ResourceIdentityType.values(); + for (ResourceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResourceReference.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ResourceReference.java new file mode 100644 index 0000000000000..d009d56804ce0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A reference to an Azure resource. */ +@Fluent +public final class ResourceReference { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceReference.class); + + /* + * The fully qualified Azure resource id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/RunCommandRequest.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/RunCommandRequest.java new file mode 100644 index 0000000000000..4aa18ac8aba8d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/RunCommandRequest.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** run command request. */ +@Fluent +public final class RunCommandRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RunCommandRequest.class); + + /* + * command to run. + */ + @JsonProperty(value = "command", required = true) + private String command; + + /* + * base64 encoded zip file, contains files required by the command + */ + @JsonProperty(value = "context") + private String context; + + /* + * AuthToken issued for AKS AAD Server App. + */ + @JsonProperty(value = "clusterToken") + private String clusterToken; + + /** + * Get the command property: command to run. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: 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: base64 encoded zip file, contains files required by the command. + * + * @return the context value. + */ + public String context() { + return this.context; + } + + /** + * Set the context property: base64 encoded zip file, contains 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")); + } + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/RunCommandResult.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/RunCommandResult.java new file mode 100644 index 0000000000000..84b7197ac11b0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/RunCommandResult.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated.models; + +import com.azure.resourcemanager.containerservice.generated.fluent.models.RunCommandResultInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of RunCommandResult. */ +public interface RunCommandResult { + /** + * Gets the id property: command id. + * + * @return the id value. + */ + String id(); + + /** + * Gets the provisioningState property: provisioning State. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the exitCode property: exit code of the command. + * + * @return the exitCode value. + */ + Integer exitCode(); + + /** + * Gets the startedAt property: time when the command started. + * + * @return the startedAt value. + */ + OffsetDateTime startedAt(); + + /** + * Gets the finishedAt property: time when the command finished. + * + * @return the finishedAt value. + */ + OffsetDateTime finishedAt(); + + /** + * Gets the logs property: command output. + * + * @return the logs value. + */ + String logs(); + + /** + * Gets the reason property: explain why provisioningState is set to failed (if so). + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the inner com.azure.resourcemanager.containerservice.generated.fluent.models.RunCommandResultInner object. + * + * @return the inner object. + */ + RunCommandResultInner innerModel(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ScaleSetEvictionPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ScaleSetEvictionPolicy.java new file mode 100644 index 0000000000000..d99e0b38d2a65 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ScaleSetEvictionPolicy.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ScaleSetEvictionPolicy. */ +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 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); + } + + /** @return known ScaleSetEvictionPolicy values. */ + public static Collection values() { + return values(ScaleSetEvictionPolicy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ScaleSetPriority.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ScaleSetPriority.java new file mode 100644 index 0000000000000..9df208fa1c9be --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/ScaleSetPriority.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ScaleSetPriority. */ +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 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); + } + + /** @return known ScaleSetPriority values. */ + public static Collection values() { + return values(ScaleSetPriority.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/SysctlConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/SysctlConfig.java new file mode 100644 index 0000000000000..14c631379be29 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Sysctl settings for Linux agent nodes. */ +@Fluent +public final class SysctlConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SysctlConfig.class); + + /* + * 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; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TagsObject.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TagsObject.java new file mode 100644 index 0000000000000..10bf348b6c5d0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TagsObject.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Tags object for patch operations. */ +@Fluent +public final class TagsObject { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsObject.class); + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TimeInWeek.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TimeInWeek.java new file mode 100644 index 0000000000000..446fad58df3f9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TimeInWeek.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Time in a week. */ +@Fluent +public final class TimeInWeek { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TimeInWeek.class); + + /* + * A day in a week. + */ + @JsonProperty(value = "day") + private WeekDay day; + + /* + * hour slots in a day. + */ + @JsonProperty(value = "hourSlots") + private List hourSlots; + + /** + * Get the day property: A day in a week. + * + * @return the day value. + */ + public WeekDay day() { + return this.day; + } + + /** + * Set the day property: A day in a 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: hour slots in a day. + * + * @return the hourSlots value. + */ + public List hourSlots() { + return this.hourSlots; + } + + /** + * Set the hourSlots property: hour slots in a day. + * + * @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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TimeSpan.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TimeSpan.java new file mode 100644 index 0000000000000..6305fbd4285d2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/TimeSpan.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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The time span with start and end properties. */ +@Fluent +public final class TimeSpan { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TimeSpan.class); + + /* + * The start of a time span + */ + @JsonProperty(value = "start") + private OffsetDateTime start; + + /* + * The end of a time span + */ + @JsonProperty(value = "end") + private OffsetDateTime end; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/UpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/UpgradeChannel.java new file mode 100644 index 0000000000000..46c6d24bf46df --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/UpgradeChannel.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for UpgradeChannel. */ +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 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); + } + + /** @return known UpgradeChannel values. */ + public static Collection values() { + return values(UpgradeChannel.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/UserAssignedIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/UserAssignedIdentity.java new file mode 100644 index 0000000000000..4b851cd4b0bb4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The UserAssignedIdentity model. */ +@Fluent +public class UserAssignedIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class); + + /* + * 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; + + /** + * 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/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/WeekDay.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/WeekDay.java new file mode 100644 index 0000000000000..4dba2088c58c7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/WeekDay.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.containerservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for WeekDay. */ +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 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); + } + + /** @return known WeekDay values. */ + public static Collection values() { + return values(WeekDay.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/models/package-info.java new file mode 100644 index 0000000000000..ca38b9ced40af --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/generated/package-info.java new file mode 100644 index 0000000000000..4e3d87becffbc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/com/azure/resourcemanager/containerservice/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.containerservice.generated; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/module-info.java b/sdk/containerservice/azure-resourcemanager-containerservice-generated/src/main/java/module-info.java new file mode 100644 index 0000000000000..6bc9f621d2357 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice-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.containerservice.generated { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.containerservice.generated; + exports com.azure.resourcemanager.containerservice.generated.fluent; + exports com.azure.resourcemanager.containerservice.generated.fluent.models; + exports com.azure.resourcemanager.containerservice.generated.models; + + opens com.azure.resourcemanager.containerservice.generated.fluent.models to + com.azure.core, + com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.containerservice.generated.models to + com.azure.core, + com.fasterxml.jackson.databind; +} diff --git a/sdk/containerservice/ci.yml b/sdk/containerservice/ci.yml new file mode 100644 index 0000000000000..2ea79271fdf0f --- /dev/null +++ b/sdk/containerservice/ci.yml @@ -0,0 +1,33 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - master + - main + - hotfix/* + - release/* + paths: + include: + - sdk/containerservice/ + +pr: + branches: + include: + - master + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerservice/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: containerservice + Artifacts: + - name: azure-resourcemanager-containerservice-generated + groupId: com.azure.resourcemanager + safeName: azureresourcemanagercontainerservicegenerated diff --git a/sdk/containerservice/pom.xml b/sdk/containerservice/pom.xml new file mode 100644 index 0000000000000..7919d6de8a480 --- /dev/null +++ b/sdk/containerservice/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + com.azure + azure-containerservice-service + pom + 1.0.0 + + + + coverage + + + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + report-aggregate + verify + + report-aggregate + + + ${project.reporting.outputDirectory}/test-coverage + + + + + + + + + default + + true + + + azure-resourcemanager-containerservice-generated + + + +