From 584bde3b63f999689a47dfd7a106372fdc51d537 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 26 Oct 2020 09:29:43 +0000 Subject: [PATCH] Generated from e44bedeaf76845d9ef49965cad882c270e4019b1 --- sdk/containerservice/mgmt-v2019_10_01/pom.xml | 135 + .../v2019_10_01/AgentPool.java | 558 ++++ .../AgentPoolAvailableVersions.java | 41 + ...rsionsPropertiesAgentPoolVersionsItem.java | 95 + .../v2019_10_01/AgentPoolType.java | 41 + .../v2019_10_01/AgentPoolUpgradeProfile.java | 51 + ...lUpgradeProfilePropertiesUpgradesItem.java | 69 + .../v2019_10_01/AgentPools.java | 79 + .../v2019_10_01/ContainerService.java | 270 ++ .../ContainerServiceAgentPoolProfile.java | 327 +++ .../ContainerServiceCustomProfile.java | 43 + .../ContainerServiceDiagnosticsProfile.java | 43 + .../ContainerServiceLinuxProfile.java | 69 + .../ContainerServiceMasterProfile.java | 271 ++ .../ContainerServiceNetworkProfile.java | 233 ++ .../ContainerServiceOrchestratorProfile.java | 73 + .../ContainerServiceOrchestratorTypes.java | 50 + ...ntainerServiceServicePrincipalProfile.java | 97 + .../ContainerServiceSshConfiguration.java | 45 + .../ContainerServiceSshPublicKey.java | 44 + .../ContainerServiceStorageProfileTypes.java | 41 + .../ContainerServiceVMDiagnostics.java | 58 + .../ContainerServiceVMSizeTypes.java | 557 ++++ .../ContainerServiceWindowsProfile.java | 69 + .../v2019_10_01/ContainerServices.java | 35 + .../v2019_10_01/CredentialResult.java | 47 + .../v2019_10_01/CredentialResults.java | 26 + .../v2019_10_01/KeyVaultSecretRef.java | 95 + .../v2019_10_01/LoadBalancerSku.java | 41 + .../v2019_10_01/ManagedCluster.java | 496 ++++ .../v2019_10_01/ManagedClusterAADProfile.java | 122 + .../ManagedClusterAPIServerAccessProfile.java | 70 + .../ManagedClusterAccessProfile.java | 51 + .../ManagedClusterAddonProfile.java | 70 + .../ManagedClusterAgentPoolProfile.java | 44 + ...agedClusterAgentPoolProfileProperties.java | 511 ++++ .../v2019_10_01/ManagedClusterIdentity.java | 80 + .../ManagedClusterLoadBalancerProfile.java | 122 + ...LoadBalancerProfileManagedOutboundIPs.java | 45 + ...LoadBalancerProfileOutboundIPPrefixes.java | 44 + ...ClusterLoadBalancerProfileOutboundIPs.java | 44 + .../ManagedClusterPoolUpgradeProfile.java | 123 + ...ClusterPoolUpgradeProfileUpgradesItem.java | 69 + ...ManagedClusterServicePrincipalProfile.java | 70 + .../ManagedClusterUpgradeProfile.java | 46 + .../ManagedClusterWindowsProfile.java | 69 + .../v2019_10_01/ManagedClusters.java | 117 + .../v2019_10_01/NetworkPlugin.java | 41 + .../v2019_10_01/NetworkPolicy.java | 41 + .../v2019_10_01/NetworkProfile.java | 95 + .../containerservice/v2019_10_01/OSType.java | 41 + .../OpenShiftAgentPoolProfileRole.java | 41 + .../OpenShiftContainerServiceVMSize.java | 134 + .../v2019_10_01/OpenShiftManagedCluster.java | 280 ++ ...hiftManagedClusterAADIdentityProvider.java | 125 + ...enShiftManagedClusterAgentPoolProfile.java | 186 ++ .../OpenShiftManagedClusterAuthProfile.java | 44 + ...iftManagedClusterBaseIdentityProvider.java | 24 + ...enShiftManagedClusterIdentityProvider.java | 70 + ...nShiftManagedClusterMasterPoolProfile.java | 161 ++ .../v2019_10_01/OpenShiftManagedClusters.java | 25 + .../v2019_10_01/OpenShiftRouterProfile.java | 73 + .../v2019_10_01/OperationValue.java | 50 + .../v2019_10_01/Operations.java | 27 + .../v2019_10_01/OrchestratorProfile.java | 95 + .../OrchestratorVersionProfile.java | 148 ++ .../OrchestratorVersionProfileListResult.java | 41 + .../v2019_10_01/PurchasePlan.java | 123 + .../v2019_10_01/ResourceIdentityType.java | 53 + .../v2019_10_01/ResourceReference.java | 43 + .../v2019_10_01/ScaleSetEvictionPolicy.java | 41 + .../v2019_10_01/ScaleSetPriority.java | 41 + .../v2019_10_01/TagsObject.java | 44 + .../AgentPoolAvailableVersionsImpl.java | 48 + .../AgentPoolAvailableVersionsInner.java | 92 + .../implementation/AgentPoolImpl.java | 281 ++ .../implementation/AgentPoolInner.java | 550 ++++ .../AgentPoolUpgradeProfileImpl.java | 59 + .../AgentPoolUpgradeProfileInner.java | 146 ++ .../implementation/AgentPoolsImpl.java | 111 + .../implementation/AgentPoolsInner.java | 984 +++++++ .../implementation/ContainerServiceImpl.java | 148 ++ .../implementation/ContainerServiceInner.java | 255 ++ .../ContainerServiceManagementClientImpl.java | 239 ++ .../ContainerServiceManager.java | 147 ++ .../implementation/ContainerServicesImpl.java | 151 ++ .../ContainerServicesInner.java | 1152 ++++++++ .../implementation/CredentialResultsImpl.java | 33 + .../CredentialResultsInner.java | 34 + .../implementation/IdParsingUtils.java | 57 + .../ManagedClusterAccessProfileImpl.java | 57 + .../ManagedClusterAccessProfileInner.java | 46 + .../implementation/ManagedClusterImpl.java | 231 ++ .../implementation/ManagedClusterInner.java | 459 ++++ .../ManagedClusterUpgradeProfileImpl.java | 53 + .../ManagedClusterUpgradeProfileInner.java | 118 + .../implementation/ManagedClustersImpl.java | 221 ++ .../implementation/ManagedClustersInner.java | 2328 +++++++++++++++++ .../OpenShiftManagedClusterImpl.java | 150 ++ .../OpenShiftManagedClusterInner.java | 271 ++ .../OpenShiftManagedClustersImpl.java | 138 + .../OpenShiftManagedClustersInner.java | 1328 ++++++++++ .../implementation/OperationValueImpl.java | 56 + .../implementation/OperationValueInner.java | 109 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 132 + ...hestratorVersionProfileListResultImpl.java | 48 + ...estratorVersionProfileListResultInner.java | 92 + .../v2019_10_01/implementation/PageImpl.java | 75 + .../v2019_10_01/implementation/PageImpl1.java | 75 + .../implementation/package-info.java | 11 + .../v2019_10_01/package-info.java | 11 + 112 files changed, 18428 insertions(+) create mode 100644 sdk/containerservice/mgmt-v2019_10_01/pom.xml create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPool.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolAvailableVersions.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolType.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolUpgradeProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolUpgradeProfilePropertiesUpgradesItem.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPools.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerService.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceAgentPoolProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceCustomProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceDiagnosticsProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceLinuxProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceMasterProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceNetworkProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceOrchestratorProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceOrchestratorTypes.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceServicePrincipalProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceSshConfiguration.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceSshPublicKey.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceStorageProfileTypes.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceVMDiagnostics.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceVMSizeTypes.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceWindowsProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServices.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/CredentialResult.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/CredentialResults.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/KeyVaultSecretRef.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/LoadBalancerSku.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedCluster.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAADProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAPIServerAccessProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAccessProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAddonProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAgentPoolProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAgentPoolProfileProperties.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterIdentity.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileOutboundIPs.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterPoolUpgradeProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterPoolUpgradeProfileUpgradesItem.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterServicePrincipalProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterUpgradeProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterWindowsProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusters.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkPlugin.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkPolicy.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OSType.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftAgentPoolProfileRole.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftContainerServiceVMSize.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedCluster.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAADIdentityProvider.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAgentPoolProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAuthProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterBaseIdentityProvider.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterIdentityProvider.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterMasterPoolProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusters.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftRouterProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OperationValue.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/Operations.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorVersionProfile.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorVersionProfileListResult.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/PurchasePlan.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ResourceIdentityType.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ResourceReference.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ScaleSetEvictionPolicy.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ScaleSetPriority.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/TagsObject.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolAvailableVersionsImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolAvailableVersionsInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolUpgradeProfileImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolUpgradeProfileInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolsImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolsInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceManagementClientImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceManager.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServicesImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServicesInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/CredentialResultsImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/CredentialResultsInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/IdParsingUtils.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterAccessProfileImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterAccessProfileInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterUpgradeProfileImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterUpgradeProfileInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClustersImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClustersInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClusterImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClusterInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClustersImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClustersInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationValueImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationValueInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationsImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationsInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OrchestratorVersionProfileListResultImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OrchestratorVersionProfileListResultInner.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/PageImpl.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/PageImpl1.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/package-info.java create mode 100644 sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/package-info.java diff --git a/sdk/containerservice/mgmt-v2019_10_01/pom.xml b/sdk/containerservice/mgmt-v2019_10_01/pom.xml new file mode 100644 index 0000000000000..4828309315de6 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.containerservice.v2019_10_01 + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-containerservice + 1.0.0-beta + jar + Microsoft Azure SDK for ContainerService Management + This package contains Microsoft ContainerService Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + 1.6.5 + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPool.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPool.java new file mode 100644 index 0000000000000..213520338f91b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPool.java @@ -0,0 +1,558 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.AgentPoolInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import java.util.List; + +/** + * Type representing AgentPool. + */ +public interface AgentPool extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the agentPoolType value. + */ + AgentPoolType agentPoolType(); + + /** + * @return the availabilityZones value. + */ + List availabilityZones(); + + /** + * @return the count value. + */ + Integer count(); + + /** + * @return the enableAutoScaling value. + */ + Boolean enableAutoScaling(); + + /** + * @return the enableNodePublicIP value. + */ + Boolean enableNodePublicIP(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the maxCount value. + */ + Integer maxCount(); + + /** + * @return the maxPods value. + */ + Integer maxPods(); + + /** + * @return the minCount value. + */ + Integer minCount(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the nodeTaints value. + */ + List nodeTaints(); + + /** + * @return the orchestratorVersion value. + */ + String orchestratorVersion(); + + /** + * @return the osDiskSizeGB value. + */ + Integer osDiskSizeGB(); + + /** + * @return the osType value. + */ + OSType osType(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the scaleSetEvictionPolicy value. + */ + ScaleSetEvictionPolicy scaleSetEvictionPolicy(); + + /** + * @return the scaleSetPriority value. + */ + ScaleSetPriority scaleSetPriority(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vmSize value. + */ + ContainerServiceVMSizeTypes vmSize(); + + /** + * @return the vnetSubnetID value. + */ + String vnetSubnetID(); + + /** + * The entirety of the AgentPool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithManagedCluster, DefinitionStages.WithCreate { + } + + /** + * Grouping of AgentPool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a AgentPool definition. + */ + interface Blank extends WithManagedCluster { + } + + /** + * The stage of the agentpool definition allowing to specify ManagedCluster. + */ + interface WithManagedCluster { + /** + * 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 allowing to specify AgentPoolType. + */ + interface WithAgentPoolType { + /** + * Specifies agentPoolType. + * @param agentPoolType AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + * @return the next definition stage + */ + WithCreate withAgentPoolType(AgentPoolType agentPoolType); + } + + /** + * The stage of the agentpool definition allowing to specify AvailabilityZones. + */ + interface WithAvailabilityZones { + /** + * Specifies availabilityZones. + * @param availabilityZones (PREVIEW) 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 Count. + */ + interface WithCount { + /** + * Specifies count. + * @param count Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1 + * @return the next definition stage + */ + WithCreate withCount(Integer count); + } + + /** + * The stage of the agentpool definition allowing to specify EnableAutoScaling. + */ + interface WithEnableAutoScaling { + /** + * Specifies enableAutoScaling. + * @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 EnableNodePublicIP. + */ + interface WithEnableNodePublicIP { + /** + * Specifies enableNodePublicIP. + * @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 MaxCount. + */ + interface WithMaxCount { + /** + * Specifies maxCount. + * @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 MaxPods. + */ + interface WithMaxPods { + /** + * Specifies maxPods. + * @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 MinCount. + */ + interface WithMinCount { + /** + * Specifies minCount. + * @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 NodeTaints. + */ + interface WithNodeTaints { + /** + * Specifies nodeTaints. + * @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 OrchestratorVersion. + */ + interface WithOrchestratorVersion { + /** + * Specifies orchestratorVersion. + * @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 OsDiskSizeGB. + */ + interface WithOsDiskSizeGB { + /** + * Specifies osDiskSizeGB. + * @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 OsType. + */ + interface WithOsType { + /** + * Specifies osType. + * @param osType OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + * @return the next definition stage + */ + WithCreate withOsType(OSType osType); + } + + /** + * The stage of the agentpool definition allowing to specify ScaleSetEvictionPolicy. + */ + interface WithScaleSetEvictionPolicy { + /** + * Specifies scaleSetEvictionPolicy. + * @param scaleSetEvictionPolicy ScaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate' + * @return the next definition stage + */ + WithCreate withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy); + } + + /** + * The stage of the agentpool definition allowing to specify ScaleSetPriority. + */ + interface WithScaleSetPriority { + /** + * Specifies scaleSetPriority. + * @param scaleSetPriority ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular' + * @return the next definition stage + */ + WithCreate withScaleSetPriority(ScaleSetPriority scaleSetPriority); + } + + /** + * The stage of the agentpool definition allowing to specify VmSize. + */ + interface WithVmSize { + /** + * Specifies vmSize. + * @param vmSize Size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + * @return the next definition stage + */ + WithCreate withVmSize(ContainerServiceVMSizeTypes vmSize); + } + + /** + * The stage of the agentpool definition allowing to specify VnetSubnetID. + */ + interface WithVnetSubnetID { + /** + * Specifies vnetSubnetID. + * @param vnetSubnetID VNet SubnetID specifies the VNet's subnet identifier + * @return the next definition stage + */ + WithCreate withVnetSubnetID(String vnetSubnetID); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithAgentPoolType, DefinitionStages.WithAvailabilityZones, DefinitionStages.WithCount, DefinitionStages.WithEnableAutoScaling, DefinitionStages.WithEnableNodePublicIP, DefinitionStages.WithMaxCount, DefinitionStages.WithMaxPods, DefinitionStages.WithMinCount, DefinitionStages.WithNodeTaints, DefinitionStages.WithOrchestratorVersion, DefinitionStages.WithOsDiskSizeGB, DefinitionStages.WithOsType, DefinitionStages.WithScaleSetEvictionPolicy, DefinitionStages.WithScaleSetPriority, DefinitionStages.WithVmSize, DefinitionStages.WithVnetSubnetID { + } + } + /** + * The template for a AgentPool update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAgentPoolType, UpdateStages.WithAvailabilityZones, UpdateStages.WithCount, UpdateStages.WithEnableAutoScaling, UpdateStages.WithEnableNodePublicIP, UpdateStages.WithMaxCount, UpdateStages.WithMaxPods, UpdateStages.WithMinCount, UpdateStages.WithNodeTaints, UpdateStages.WithOrchestratorVersion, UpdateStages.WithOsDiskSizeGB, UpdateStages.WithOsType, UpdateStages.WithScaleSetEvictionPolicy, UpdateStages.WithScaleSetPriority, UpdateStages.WithVmSize, UpdateStages.WithVnetSubnetID { + } + + /** + * Grouping of AgentPool update stages. + */ + interface UpdateStages { + /** + * The stage of the agentpool update allowing to specify AgentPoolType. + */ + interface WithAgentPoolType { + /** + * Specifies agentPoolType. + * @param agentPoolType AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + * @return the next update stage + */ + Update withAgentPoolType(AgentPoolType agentPoolType); + } + + /** + * The stage of the agentpool update allowing to specify AvailabilityZones. + */ + interface WithAvailabilityZones { + /** + * Specifies availabilityZones. + * @param availabilityZones (PREVIEW) Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType + * @return the next update stage + */ + Update withAvailabilityZones(List availabilityZones); + } + + /** + * The stage of the agentpool update allowing to specify Count. + */ + interface WithCount { + /** + * Specifies count. + * @param count Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1 + * @return the next update stage + */ + Update withCount(Integer count); + } + + /** + * The stage of the agentpool update allowing to specify EnableAutoScaling. + */ + interface WithEnableAutoScaling { + /** + * Specifies enableAutoScaling. + * @param enableAutoScaling Whether to enable auto-scaler + * @return the next update stage + */ + Update withEnableAutoScaling(Boolean enableAutoScaling); + } + + /** + * The stage of the agentpool update allowing to specify EnableNodePublicIP. + */ + interface WithEnableNodePublicIP { + /** + * Specifies enableNodePublicIP. + * @param enableNodePublicIP Enable public IP for nodes + * @return the next update stage + */ + Update withEnableNodePublicIP(Boolean enableNodePublicIP); + } + + /** + * The stage of the agentpool update allowing to specify MaxCount. + */ + interface WithMaxCount { + /** + * Specifies maxCount. + * @param maxCount Maximum number of nodes for auto-scaling + * @return the next update stage + */ + Update withMaxCount(Integer maxCount); + } + + /** + * The stage of the agentpool update allowing to specify MaxPods. + */ + interface WithMaxPods { + /** + * Specifies maxPods. + * @param maxPods Maximum number of pods that can run on a node + * @return the next update stage + */ + Update withMaxPods(Integer maxPods); + } + + /** + * The stage of the agentpool update allowing to specify MinCount. + */ + interface WithMinCount { + /** + * Specifies minCount. + * @param minCount Minimum number of nodes for auto-scaling + * @return the next update stage + */ + Update withMinCount(Integer minCount); + } + + /** + * The stage of the agentpool update allowing to specify NodeTaints. + */ + interface WithNodeTaints { + /** + * Specifies nodeTaints. + * @param nodeTaints Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule + * @return the next update stage + */ + Update withNodeTaints(List nodeTaints); + } + + /** + * The stage of the agentpool update allowing to specify OrchestratorVersion. + */ + interface WithOrchestratorVersion { + /** + * Specifies orchestratorVersion. + * @param orchestratorVersion Version of orchestrator specified when creating the managed cluster + * @return the next update stage + */ + Update withOrchestratorVersion(String orchestratorVersion); + } + + /** + * The stage of the agentpool update allowing to specify OsDiskSizeGB. + */ + interface WithOsDiskSizeGB { + /** + * Specifies osDiskSizeGB. + * @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 update stage + */ + Update withOsDiskSizeGB(Integer osDiskSizeGB); + } + + /** + * The stage of the agentpool update allowing to specify OsType. + */ + interface WithOsType { + /** + * Specifies osType. + * @param osType OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + * @return the next update stage + */ + Update withOsType(OSType osType); + } + + /** + * The stage of the agentpool update allowing to specify ScaleSetEvictionPolicy. + */ + interface WithScaleSetEvictionPolicy { + /** + * Specifies scaleSetEvictionPolicy. + * @param scaleSetEvictionPolicy ScaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate' + * @return the next update stage + */ + Update withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy); + } + + /** + * The stage of the agentpool update allowing to specify ScaleSetPriority. + */ + interface WithScaleSetPriority { + /** + * Specifies scaleSetPriority. + * @param scaleSetPriority ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular' + * @return the next update stage + */ + Update withScaleSetPriority(ScaleSetPriority scaleSetPriority); + } + + /** + * The stage of the agentpool update allowing to specify VmSize. + */ + interface WithVmSize { + /** + * Specifies vmSize. + * @param vmSize Size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + * @return the next update stage + */ + Update withVmSize(ContainerServiceVMSizeTypes vmSize); + } + + /** + * The stage of the agentpool update allowing to specify VnetSubnetID. + */ + interface WithVnetSubnetID { + /** + * Specifies vnetSubnetID. + * @param vnetSubnetID VNet SubnetID specifies the VNet's subnet identifier + * @return the next update stage + */ + Update withVnetSubnetID(String vnetSubnetID); + } + + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolAvailableVersions.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolAvailableVersions.java new file mode 100644 index 0000000000000..4df65e6105c99 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolAvailableVersions.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.AgentPoolAvailableVersionsInner; +import java.util.List; + +/** + * Type representing AgentPoolAvailableVersions. + */ +public interface AgentPoolAvailableVersions extends HasInner, HasManager { + /** + * @return the agentPoolVersions value. + */ + List agentPoolVersions(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java new file mode 100644 index 0000000000000..17c17a1a56734 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem model. + */ +public class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem { + /** + * 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 whether this version is the default agent pool version. + * + * @return the defaultProperty value + */ + public Boolean defaultProperty() { + return this.defaultProperty; + } + + /** + * Set 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 kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set 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 whether Kubernetes version is currently in preview. + * + * @return the isPreview value + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolType.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolType.java new file mode 100644 index 0000000000000..293e76a48443d --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolUpgradeProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolUpgradeProfile.java new file mode 100644 index 0000000000000..09474f84562ba --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolUpgradeProfile.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.AgentPoolUpgradeProfileInner; +import java.util.List; + +/** + * Type representing AgentPoolUpgradeProfile. + */ +public interface AgentPoolUpgradeProfile extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the osType value. + */ + OSType osType(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the upgrades value. + */ + List upgrades(); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolUpgradeProfilePropertiesUpgradesItem.java new file mode 100644 index 0000000000000..83a028b85e713 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPoolUpgradeProfilePropertiesUpgradesItem.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AgentPoolUpgradeProfilePropertiesUpgradesItem model. + */ +public class AgentPoolUpgradeProfilePropertiesUpgradesItem { + /** + * 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 kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set 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 whether Kubernetes version is currently in preview. + * + * @return the isPreview value + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPools.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPools.java new file mode 100644 index 0000000000000..4a06c3b4ee760 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/AgentPools.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.AgentPoolsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AgentPools. + */ +public interface AgentPools extends SupportsCreating, HasInner { + /** + * Gets the agent pool. + * 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 + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets a list of agent pools in the specified managed cluster. + * 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 + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String resourceName); + + /** + * Deletes an agent pool. + * 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 + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets upgrade profile for an agent pool. + * 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 + * @return the observable for the request + */ + Observable getUpgradeProfileAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets a list of supported versions for the specified agent pool. + * 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 + * @return the observable for the request + */ + Observable getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerService.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerService.java new file mode 100644 index 0000000000000..c3f186fc68234 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerService.java @@ -0,0 +1,270 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceInner; + +/** + * Type representing ContainerService. + */ +public interface ContainerService extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * @return the customProfile value. + */ + ContainerServiceCustomProfile customProfile(); + + /** + * @return the diagnosticsProfile value. + */ + ContainerServiceDiagnosticsProfile diagnosticsProfile(); + + /** + * @return the linuxProfile value. + */ + ContainerServiceLinuxProfile linuxProfile(); + + /** + * @return the masterProfile value. + */ + ContainerServiceMasterProfile masterProfile(); + + /** + * @return the orchestratorProfile value. + */ + ContainerServiceOrchestratorProfile orchestratorProfile(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the servicePrincipalProfile value. + */ + ContainerServiceServicePrincipalProfile servicePrincipalProfile(); + + /** + * @return the windowsProfile value. + */ + ContainerServiceWindowsProfile windowsProfile(); + + /** + * The entirety of the ContainerService definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithLinuxProfile, DefinitionStages.WithMasterProfile, DefinitionStages.WithOrchestratorProfile, DefinitionStages.WithCreate { + } + + /** + * Grouping of ContainerService definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ContainerService definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ContainerService definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the containerservice definition allowing to specify LinuxProfile. + */ + interface WithLinuxProfile { + /** + * Specifies linuxProfile. + * @param linuxProfile Profile for Linux VMs in the container service cluster + * @return the next definition stage +*/ + WithMasterProfile withLinuxProfile(ContainerServiceLinuxProfile linuxProfile); + } + + /** + * The stage of the containerservice definition allowing to specify MasterProfile. + */ + interface WithMasterProfile { + /** + * Specifies masterProfile. + * @param masterProfile Profile for the container service master + * @return the next definition stage +*/ + WithOrchestratorProfile withMasterProfile(ContainerServiceMasterProfile masterProfile); + } + + /** + * The stage of the containerservice definition allowing to specify OrchestratorProfile. + */ + interface WithOrchestratorProfile { + /** + * Specifies orchestratorProfile. + * @param orchestratorProfile Profile for the container service orchestrator + * @return the next definition stage +*/ + WithCreate withOrchestratorProfile(ContainerServiceOrchestratorProfile orchestratorProfile); + } + + /** + * The stage of the containerservice definition allowing to specify AgentPoolProfiles. + */ + interface WithAgentPoolProfiles { + /** + * Specifies agentPoolProfiles. + * @param agentPoolProfiles Properties of the agent pool + * @return the next definition stage + */ + WithCreate withAgentPoolProfiles(List agentPoolProfiles); + } + + /** + * The stage of the containerservice definition allowing to specify CustomProfile. + */ + interface WithCustomProfile { + /** + * Specifies customProfile. + * @param customProfile Properties to configure a custom container service cluster + * @return the next definition stage + */ + WithCreate withCustomProfile(ContainerServiceCustomProfile customProfile); + } + + /** + * The stage of the containerservice definition allowing to specify DiagnosticsProfile. + */ + interface WithDiagnosticsProfile { + /** + * Specifies diagnosticsProfile. + * @param diagnosticsProfile Profile for diagnostics in the container service cluster + * @return the next definition stage + */ + WithCreate withDiagnosticsProfile(ContainerServiceDiagnosticsProfile diagnosticsProfile); + } + + /** + * The stage of the containerservice definition allowing to specify ServicePrincipalProfile. + */ + interface WithServicePrincipalProfile { + /** + * Specifies servicePrincipalProfile. + * @param servicePrincipalProfile Information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified + * @return the next definition stage + */ + WithCreate withServicePrincipalProfile(ContainerServiceServicePrincipalProfile servicePrincipalProfile); + } + + /** + * The stage of the containerservice definition allowing to specify WindowsProfile. + */ + interface WithWindowsProfile { + /** + * Specifies windowsProfile. + * @param windowsProfile Profile for Windows VMs in the container service cluster + * @return the next definition stage + */ + WithCreate withWindowsProfile(ContainerServiceWindowsProfile windowsProfile); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAgentPoolProfiles, DefinitionStages.WithCustomProfile, DefinitionStages.WithDiagnosticsProfile, DefinitionStages.WithServicePrincipalProfile, DefinitionStages.WithWindowsProfile { + } + } + /** + * The template for a ContainerService update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAgentPoolProfiles, UpdateStages.WithCustomProfile, UpdateStages.WithDiagnosticsProfile, UpdateStages.WithServicePrincipalProfile, UpdateStages.WithWindowsProfile { + } + + /** + * Grouping of ContainerService update stages. + */ + interface UpdateStages { + /** + * The stage of the containerservice update allowing to specify AgentPoolProfiles. + */ + interface WithAgentPoolProfiles { + /** + * Specifies agentPoolProfiles. + * @param agentPoolProfiles Properties of the agent pool + * @return the next update stage + */ + Update withAgentPoolProfiles(List agentPoolProfiles); + } + + /** + * The stage of the containerservice update allowing to specify CustomProfile. + */ + interface WithCustomProfile { + /** + * Specifies customProfile. + * @param customProfile Properties to configure a custom container service cluster + * @return the next update stage + */ + Update withCustomProfile(ContainerServiceCustomProfile customProfile); + } + + /** + * The stage of the containerservice update allowing to specify DiagnosticsProfile. + */ + interface WithDiagnosticsProfile { + /** + * Specifies diagnosticsProfile. + * @param diagnosticsProfile Profile for diagnostics in the container service cluster + * @return the next update stage + */ + Update withDiagnosticsProfile(ContainerServiceDiagnosticsProfile diagnosticsProfile); + } + + /** + * The stage of the containerservice update allowing to specify ServicePrincipalProfile. + */ + interface WithServicePrincipalProfile { + /** + * Specifies servicePrincipalProfile. + * @param servicePrincipalProfile Information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified + * @return the next update stage + */ + Update withServicePrincipalProfile(ContainerServiceServicePrincipalProfile servicePrincipalProfile); + } + + /** + * The stage of the containerservice update allowing to specify WindowsProfile. + */ + interface WithWindowsProfile { + /** + * Specifies windowsProfile. + * @param windowsProfile Profile for Windows VMs in the container service cluster + * @return the next update stage + */ + Update withWindowsProfile(ContainerServiceWindowsProfile windowsProfile); + } + + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceAgentPoolProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceAgentPoolProfile.java new file mode 100644 index 0000000000000..0ade444fac25a --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceAgentPoolProfile.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for the container service agent pool. + */ +public class ContainerServiceAgentPoolProfile { + /** + * Unique name of the agent pool profile in the context of the subscription + * and resource group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Number of agents (VMs) to host docker containers. Allowed values must be + * in the range of 1 to 100 (inclusive). The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Size of agent VMs. Possible values include: 'Standard_A1', + * 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', + * 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', + * 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', + * 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', + * 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', + * 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', + * 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', + * 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', + * 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', + * 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', + * 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', + * 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', + * 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', + * 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + * 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + * 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + * 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + * 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + * 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + * 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + * 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + * 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + * 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + * 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', + * 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', + * 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', + * 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', + * 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', + * 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + * 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + * 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + * 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + * 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + * 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + * 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + * 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', + * 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', + * 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', + * 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', + * 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', + * 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', + * 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', + * 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', + * 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', + * 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + * 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + * 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + * 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', + * 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', + * 'Standard_NV6'. + */ + @JsonProperty(value = "vmSize", required = true) + private ContainerServiceVMSizeTypes 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; + + /** + * DNS prefix to be used to create the FQDN for the agent pool. + */ + @JsonProperty(value = "dnsPrefix") + private String dnsPrefix; + + /** + * FQDN for the agent pool. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Ports number array used to expose on this agent pool. The default opened + * ports are different based on your choice of orchestrator. + */ + @JsonProperty(value = "ports") + private List ports; + + /** + * Storage profile specifies what kind of storage used. Choose from + * StorageAccount and ManagedDisks. Leave it empty, we will choose for you + * based on the orchestrator choice. Possible values include: + * 'StorageAccount', 'ManagedDisks'. + */ + @JsonProperty(value = "storageProfile") + private ContainerServiceStorageProfileTypes storageProfile; + + /** + * VNet SubnetID specifies the VNet's subnet identifier. + */ + @JsonProperty(value = "vnetSubnetID") + private String vnetSubnetID; + + /** + * OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux. Possible values include: 'Linux', 'Windows'. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /** + * Get 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 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 ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get number of agents (VMs) to host docker containers. 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 number of agents (VMs) to host docker containers. 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 ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'. + * + * @return the vmSize value + */ + public ContainerServiceVMSizeTypes vmSize() { + return this.vmSize; + } + + /** + * Set size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'. + * + * @param vmSize the vmSize value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withVmSize(ContainerServiceVMSizeTypes vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get 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 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 ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withOsDiskSizeGB(Integer osDiskSizeGB) { + this.osDiskSizeGB = osDiskSizeGB; + return this; + } + + /** + * Get dNS prefix to be used to create the FQDN for the agent pool. + * + * @return the dnsPrefix value + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set dNS prefix to be used to create the FQDN for the agent pool. + * + * @param dnsPrefix the dnsPrefix value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get fQDN for the agent pool. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator. + * + * @return the ports value + */ + public List ports() { + return this.ports; + } + + /** + * Set ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator. + * + * @param ports the ports value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Get storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks'. + * + * @return the storageProfile value + */ + public ContainerServiceStorageProfileTypes storageProfile() { + return this.storageProfile; + } + + /** + * Set storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks'. + * + * @param storageProfile the storageProfile value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withStorageProfile(ContainerServiceStorageProfileTypes storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get vNet SubnetID specifies the VNet's subnet identifier. + * + * @return the vnetSubnetID value + */ + public String vnetSubnetID() { + return this.vnetSubnetID; + } + + /** + * Set vNet SubnetID specifies the VNet's subnet identifier. + * + * @param vnetSubnetID the vnetSubnetID value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withVnetSubnetID(String vnetSubnetID) { + this.vnetSubnetID = vnetSubnetID; + return this; + } + + /** + * Get osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @return the osType value + */ + public OSType osType() { + return this.osType; + } + + /** + * Set osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @param osType the osType value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceCustomProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceCustomProfile.java new file mode 100644 index 0000000000000..18bca6a7d7f21 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceCustomProfile.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties to configure a custom container service cluster. + */ +public class ContainerServiceCustomProfile { + /** + * The name of the custom orchestrator to use. + */ + @JsonProperty(value = "orchestrator", required = true) + private String orchestrator; + + /** + * Get the name of the custom orchestrator to use. + * + * @return the orchestrator value + */ + public String orchestrator() { + return this.orchestrator; + } + + /** + * Set the name of the custom orchestrator to use. + * + * @param orchestrator the orchestrator value to set + * @return the ContainerServiceCustomProfile object itself. + */ + public ContainerServiceCustomProfile withOrchestrator(String orchestrator) { + this.orchestrator = orchestrator; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceDiagnosticsProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceDiagnosticsProfile.java new file mode 100644 index 0000000000000..7c69e0e55e9eb --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceDiagnosticsProfile.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for diagnostics on the container service cluster. + */ +public class ContainerServiceDiagnosticsProfile { + /** + * Profile for diagnostics on the container service VMs. + */ + @JsonProperty(value = "vmDiagnostics", required = true) + private ContainerServiceVMDiagnostics vmDiagnostics; + + /** + * Get profile for diagnostics on the container service VMs. + * + * @return the vmDiagnostics value + */ + public ContainerServiceVMDiagnostics vmDiagnostics() { + return this.vmDiagnostics; + } + + /** + * Set profile for diagnostics on the container service VMs. + * + * @param vmDiagnostics the vmDiagnostics value to set + * @return the ContainerServiceDiagnosticsProfile object itself. + */ + public ContainerServiceDiagnosticsProfile withVmDiagnostics(ContainerServiceVMDiagnostics vmDiagnostics) { + this.vmDiagnostics = vmDiagnostics; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceLinuxProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceLinuxProfile.java new file mode 100644 index 0000000000000..c76b878194182 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceLinuxProfile.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for Linux VMs in the container service cluster. + */ +public class ContainerServiceLinuxProfile { + /** + * 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 administrator username to use for Linux VMs. + * + * @return the adminUsername value + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set 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 sSH configuration for Linux-based VMs running on Azure. + * + * @return the ssh value + */ + public ContainerServiceSshConfiguration ssh() { + return this.ssh; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceMasterProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceMasterProfile.java new file mode 100644 index 0000000000000..7599d30a0a84d --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceMasterProfile.java @@ -0,0 +1,271 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for the container service master. + */ +public class ContainerServiceMasterProfile { + /** + * Number of masters (VMs) in the container service cluster. Allowed values + * are 1, 3, and 5. The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * DNS prefix to be used to create the FQDN for the master pool. + */ + @JsonProperty(value = "dnsPrefix", required = true) + private String dnsPrefix; + + /** + * Size of agent VMs. Possible values include: 'Standard_A1', + * 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', + * 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', + * 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', + * 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', + * 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', + * 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', + * 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', + * 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', + * 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', + * 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', + * 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', + * 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', + * 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', + * 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + * 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + * 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + * 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + * 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + * 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + * 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + * 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + * 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + * 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + * 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', + * 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', + * 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', + * 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', + * 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', + * 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + * 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + * 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + * 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + * 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + * 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + * 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + * 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', + * 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', + * 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', + * 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', + * 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', + * 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', + * 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', + * 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', + * 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', + * 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + * 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + * 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + * 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', + * 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', + * 'Standard_NV6'. + */ + @JsonProperty(value = "vmSize", required = true) + private ContainerServiceVMSizeTypes 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; + + /** + * VNet SubnetID specifies the VNet's subnet identifier. + */ + @JsonProperty(value = "vnetSubnetID") + private String vnetSubnetID; + + /** + * FirstConsecutiveStaticIP used to specify the first static ip of masters. + */ + @JsonProperty(value = "firstConsecutiveStaticIP") + private String firstConsecutiveStaticIP; + + /** + * Storage profile specifies what kind of storage used. Choose from + * StorageAccount and ManagedDisks. Leave it empty, we will choose for you + * based on the orchestrator choice. Possible values include: + * 'StorageAccount', 'ManagedDisks'. + */ + @JsonProperty(value = "storageProfile") + private ContainerServiceStorageProfileTypes storageProfile; + + /** + * FQDN for the master pool. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Get number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. + * + * @param count the count value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get dNS prefix to be used to create the FQDN for the master pool. + * + * @return the dnsPrefix value + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set dNS prefix to be used to create the FQDN for the master pool. + * + * @param dnsPrefix the dnsPrefix value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'. + * + * @return the vmSize value + */ + public ContainerServiceVMSizeTypes vmSize() { + return this.vmSize; + } + + /** + * Set size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'. + * + * @param vmSize the vmSize value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withVmSize(ContainerServiceVMSizeTypes vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get 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 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 ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withOsDiskSizeGB(Integer osDiskSizeGB) { + this.osDiskSizeGB = osDiskSizeGB; + return this; + } + + /** + * Get vNet SubnetID specifies the VNet's subnet identifier. + * + * @return the vnetSubnetID value + */ + public String vnetSubnetID() { + return this.vnetSubnetID; + } + + /** + * Set vNet SubnetID specifies the VNet's subnet identifier. + * + * @param vnetSubnetID the vnetSubnetID value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withVnetSubnetID(String vnetSubnetID) { + this.vnetSubnetID = vnetSubnetID; + return this; + } + + /** + * Get firstConsecutiveStaticIP used to specify the first static ip of masters. + * + * @return the firstConsecutiveStaticIP value + */ + public String firstConsecutiveStaticIP() { + return this.firstConsecutiveStaticIP; + } + + /** + * Set firstConsecutiveStaticIP used to specify the first static ip of masters. + * + * @param firstConsecutiveStaticIP the firstConsecutiveStaticIP value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withFirstConsecutiveStaticIP(String firstConsecutiveStaticIP) { + this.firstConsecutiveStaticIP = firstConsecutiveStaticIP; + return this; + } + + /** + * Get storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks'. + * + * @return the storageProfile value + */ + public ContainerServiceStorageProfileTypes storageProfile() { + return this.storageProfile; + } + + /** + * Set storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks'. + * + * @param storageProfile the storageProfile value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withStorageProfile(ContainerServiceStorageProfileTypes storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get fQDN for the master pool. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceNetworkProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceNetworkProfile.java new file mode 100644 index 0000000000000..f58b9fe4f634f --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceNetworkProfile.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile of network configuration. + */ +public class ContainerServiceNetworkProfile { + /** + * Network plugin used for building Kubernetes network. Possible values + * include: 'azure', 'kubenet'. + */ + @JsonProperty(value = "networkPlugin") + private NetworkPlugin networkPlugin; + + /** + * Network policy used for building Kubernetes network. Possible values + * include: 'calico', 'azure'. + */ + @JsonProperty(value = "networkPolicy") + private NetworkPolicy networkPolicy; + + /** + * 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 load balancer sku for the managed cluster. Possible values include: + * 'standard', 'basic'. + */ + @JsonProperty(value = "loadBalancerSku") + private LoadBalancerSku loadBalancerSku; + + /** + * Profile of the cluster load balancer. + */ + @JsonProperty(value = "loadBalancerProfile") + private ManagedClusterLoadBalancerProfile loadBalancerProfile; + + /** + * Get network plugin used for building Kubernetes network. Possible values include: 'azure', 'kubenet'. + * + * @return the networkPlugin value + */ + public NetworkPlugin networkPlugin() { + return this.networkPlugin; + } + + /** + * Set network plugin used for building Kubernetes network. Possible values include: 'azure', 'kubenet'. + * + * @param networkPlugin the networkPlugin value to set + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkPlugin(NetworkPlugin networkPlugin) { + this.networkPlugin = networkPlugin; + return this; + } + + /** + * Get network policy used for building Kubernetes network. Possible values include: 'calico', 'azure'. + * + * @return the networkPolicy value + */ + public NetworkPolicy networkPolicy() { + return this.networkPolicy; + } + + /** + * Set network policy used for building Kubernetes network. Possible values include: 'calico', 'azure'. + * + * @param networkPolicy the networkPolicy value to set + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkPolicy(NetworkPolicy networkPolicy) { + this.networkPolicy = networkPolicy; + return this; + } + + /** + * Get 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 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 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 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 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 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 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 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 load balancer sku for the managed cluster. Possible values include: 'standard', 'basic'. + * + * @return the loadBalancerSku value + */ + public LoadBalancerSku loadBalancerSku() { + return this.loadBalancerSku; + } + + /** + * Set the load balancer sku for the managed cluster. Possible values include: 'standard', 'basic'. + * + * @param loadBalancerSku the loadBalancerSku value to set + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withLoadBalancerSku(LoadBalancerSku loadBalancerSku) { + this.loadBalancerSku = loadBalancerSku; + return this; + } + + /** + * Get profile of the cluster load balancer. + * + * @return the loadBalancerProfile value + */ + public ManagedClusterLoadBalancerProfile loadBalancerProfile() { + return this.loadBalancerProfile; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceOrchestratorProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceOrchestratorProfile.java new file mode 100644 index 0000000000000..290d8a042d0f6 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceOrchestratorProfile.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for the container service orchestrator. + */ +public class ContainerServiceOrchestratorProfile { + /** + * The orchestrator to use to manage container service cluster resources. + * Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible + * values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom'. + */ + @JsonProperty(value = "orchestratorType", required = true) + private ContainerServiceOrchestratorTypes orchestratorType; + + /** + * The version of the orchestrator to use. You can specify the + * major.minor.patch part of the actual version.For example, you can + * specify version as "1.6.11". + */ + @JsonProperty(value = "orchestratorVersion") + private String orchestratorVersion; + + /** + * Get the orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom'. + * + * @return the orchestratorType value + */ + public ContainerServiceOrchestratorTypes orchestratorType() { + return this.orchestratorType; + } + + /** + * Set the orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom'. + * + * @param orchestratorType the orchestratorType value to set + * @return the ContainerServiceOrchestratorProfile object itself. + */ + public ContainerServiceOrchestratorProfile withOrchestratorType(ContainerServiceOrchestratorTypes orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get the version of the orchestrator to use. You can specify the major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". + * + * @return the orchestratorVersion value + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the version of the orchestrator to use. You can specify the major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". + * + * @param orchestratorVersion the orchestratorVersion value to set + * @return the ContainerServiceOrchestratorProfile object itself. + */ + public ContainerServiceOrchestratorProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceOrchestratorTypes.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceOrchestratorTypes.java new file mode 100644 index 0000000000000..463baaa91b5bb --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceOrchestratorTypes.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ContainerServiceOrchestratorTypes. + */ +public final class ContainerServiceOrchestratorTypes extends ExpandableStringEnum { + /** Static value Kubernetes for ContainerServiceOrchestratorTypes. */ + public static final ContainerServiceOrchestratorTypes KUBERNETES = fromString("Kubernetes"); + + /** Static value Swarm for ContainerServiceOrchestratorTypes. */ + public static final ContainerServiceOrchestratorTypes SWARM = fromString("Swarm"); + + /** Static value DCOS for ContainerServiceOrchestratorTypes. */ + public static final ContainerServiceOrchestratorTypes DCOS = fromString("DCOS"); + + /** Static value DockerCE for ContainerServiceOrchestratorTypes. */ + public static final ContainerServiceOrchestratorTypes DOCKER_CE = fromString("DockerCE"); + + /** Static value Custom for ContainerServiceOrchestratorTypes. */ + public static final ContainerServiceOrchestratorTypes CUSTOM = fromString("Custom"); + + /** + * Creates or finds a ContainerServiceOrchestratorTypes from its string representation. + * @param name a name to look for + * @return the corresponding ContainerServiceOrchestratorTypes + */ + @JsonCreator + public static ContainerServiceOrchestratorTypes fromString(String name) { + return fromString(name, ContainerServiceOrchestratorTypes.class); + } + + /** + * @return known ContainerServiceOrchestratorTypes values + */ + public static Collection values() { + return values(ContainerServiceOrchestratorTypes.class); + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceServicePrincipalProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceServicePrincipalProfile.java new file mode 100644 index 0000000000000..7f83b964c1d85 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceServicePrincipalProfile.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. Either secret or keyVaultSecretRef must be + * specified. + */ +public class ContainerServiceServicePrincipalProfile { + /** + * 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; + + /** + * Reference to a secret stored in Azure Key Vault. + */ + @JsonProperty(value = "keyVaultSecretRef") + private KeyVaultSecretRef keyVaultSecretRef; + + /** + * Get the ID for the service principal. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the ID for the service principal. + * + * @param clientId the clientId value to set + * @return the ContainerServiceServicePrincipalProfile object itself. + */ + public ContainerServiceServicePrincipalProfile withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the secret password associated with the service principal in plain text. + * + * @return the secret value + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret password associated with the service principal in plain text. + * + * @param secret the secret value to set + * @return the ContainerServiceServicePrincipalProfile object itself. + */ + public ContainerServiceServicePrincipalProfile withSecret(String secret) { + this.secret = secret; + return this; + } + + /** + * Get reference to a secret stored in Azure Key Vault. + * + * @return the keyVaultSecretRef value + */ + public KeyVaultSecretRef keyVaultSecretRef() { + return this.keyVaultSecretRef; + } + + /** + * Set reference to a secret stored in Azure Key Vault. + * + * @param keyVaultSecretRef the keyVaultSecretRef value to set + * @return the ContainerServiceServicePrincipalProfile object itself. + */ + public ContainerServiceServicePrincipalProfile withKeyVaultSecretRef(KeyVaultSecretRef keyVaultSecretRef) { + this.keyVaultSecretRef = keyVaultSecretRef; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceSshConfiguration.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceSshConfiguration.java new file mode 100644 index 0000000000000..42902618f863c --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceSshConfiguration.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SSH configuration for Linux-based VMs running on Azure. + */ +public class ContainerServiceSshConfiguration { + /** + * 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 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 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceSshPublicKey.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceSshPublicKey.java new file mode 100644 index 0000000000000..18255c711584f --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceSshPublicKey.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains information about SSH certificate public key data. + */ +public class ContainerServiceSshPublicKey { + /** + * Certificate public key used to authenticate with VMs through SSH. The + * certificate must be in PEM format with or without headers. + */ + @JsonProperty(value = "keyData", required = true) + private String keyData; + + /** + * Get 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 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceStorageProfileTypes.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceStorageProfileTypes.java new file mode 100644 index 0000000000000..dda206bfb234c --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceStorageProfileTypes.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceVMDiagnostics.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceVMDiagnostics.java new file mode 100644 index 0000000000000..33d5afed8a3fa --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceVMDiagnostics.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for diagnostics on the container service VMs. + */ +public class ContainerServiceVMDiagnostics { + /** + * 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 whether the VM diagnostic agent is provisioned on the VM. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set 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 URI of the storage account where diagnostics are stored. + * + * @return the storageUri value + */ + public String storageUri() { + return this.storageUri; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceVMSizeTypes.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceVMSizeTypes.java new file mode 100644 index 0000000000000..d5da263034e81 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceVMSizeTypes.java @@ -0,0 +1,557 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceWindowsProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceWindowsProfile.java new file mode 100644 index 0000000000000..8ee091e17e89b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServiceWindowsProfile.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for Windows VMs in the container service cluster. + */ +public class ContainerServiceWindowsProfile { + /** + * The administrator username to use for Windows VMs. + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /** + * The administrator password to use for Windows VMs. + */ + @JsonProperty(value = "adminPassword", required = true) + private String adminPassword; + + /** + * Get the administrator username to use for Windows VMs. + * + * @return the adminUsername value + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the administrator username to use for Windows VMs. + * + * @param adminUsername the adminUsername value to set + * @return the ContainerServiceWindowsProfile object itself. + */ + public ContainerServiceWindowsProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the administrator password to use for Windows VMs. + * + * @return the adminPassword value + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set the administrator password to use for Windows VMs. + * + * @param adminPassword the adminPassword value to set + * @return the ContainerServiceWindowsProfile object itself. + */ + public ContainerServiceWindowsProfile withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServices.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServices.java new file mode 100644 index 0000000000000..66f03b73fae81 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ContainerServices.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServicesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ContainerServices. + */ +public interface ContainerServices extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listOrchestratorsAsync(String location); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/CredentialResult.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/CredentialResult.java new file mode 100644 index 0000000000000..9930de3279563 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/CredentialResult.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The credential result response. + */ +public class CredentialResult { + /** + * The name of the credential. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private byte[] value; + + /** + * Get the name of the credential. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get base64-encoded Kubernetes configuration file. + * + * @return the value value + */ + public byte[] value() { + return this.value; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/CredentialResults.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/CredentialResults.java new file mode 100644 index 0000000000000..214ac3738c792 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/CredentialResults.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.CredentialResultsInner; +import java.util.List; + +/** + * Type representing CredentialResults. + */ +public interface CredentialResults extends HasInner, HasManager { + /** + * @return the kubeconfigs value. + */ + List kubeconfigs(); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/KeyVaultSecretRef.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/KeyVaultSecretRef.java new file mode 100644 index 0000000000000..41a7b98bc4c6b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/KeyVaultSecretRef.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Reference to a secret stored in Azure Key Vault. + */ +public class KeyVaultSecretRef { + /** + * Key vault identifier. + */ + @JsonProperty(value = "vaultID", required = true) + private String vaultID; + + /** + * The secret name. + */ + @JsonProperty(value = "secretName", required = true) + private String secretName; + + /** + * The secret version. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Get key vault identifier. + * + * @return the vaultID value + */ + public String vaultID() { + return this.vaultID; + } + + /** + * Set key vault identifier. + * + * @param vaultID the vaultID value to set + * @return the KeyVaultSecretRef object itself. + */ + public KeyVaultSecretRef withVaultID(String vaultID) { + this.vaultID = vaultID; + return this; + } + + /** + * Get the secret name. + * + * @return the secretName value + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secret name. + * + * @param secretName the secretName value to set + * @return the KeyVaultSecretRef object itself. + */ + public KeyVaultSecretRef withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Get the secret version. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set the secret version. + * + * @param version the version value to set + * @return the KeyVaultSecretRef object itself. + */ + public KeyVaultSecretRef withVersion(String version) { + this.version = version; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/LoadBalancerSku.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/LoadBalancerSku.java new file mode 100644 index 0000000000000..7825fc0856a07 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/LoadBalancerSku.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedCluster.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedCluster.java new file mode 100644 index 0000000000000..107c5670f83ac --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedCluster.java @@ -0,0 +1,496 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import java.util.List; +import java.util.Map; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ManagedClusterInner; + +/** + * Type representing ManagedCluster. + */ +public interface ManagedCluster extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the aadProfile value. + */ + ManagedClusterAADProfile aadProfile(); + + /** + * @return the addonProfiles value. + */ + Map addonProfiles(); + + /** + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * @return the apiServerAccessProfile value. + */ + ManagedClusterAPIServerAccessProfile apiServerAccessProfile(); + + /** + * @return the dnsPrefix value. + */ + String dnsPrefix(); + + /** + * @return the enablePodSecurityPolicy value. + */ + Boolean enablePodSecurityPolicy(); + + /** + * @return the enableRBAC value. + */ + Boolean enableRBAC(); + + /** + * @return the fqdn value. + */ + String fqdn(); + + /** + * @return the identity value. + */ + ManagedClusterIdentity identity(); + + /** + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * @return the linuxProfile value. + */ + ContainerServiceLinuxProfile linuxProfile(); + + /** + * @return the maxAgentPools value. + */ + Integer maxAgentPools(); + + /** + * @return the networkProfile value. + */ + ContainerServiceNetworkProfile networkProfile(); + + /** + * @return the nodeResourceGroup value. + */ + String nodeResourceGroup(); + + /** + * @return the privateFQDN value. + */ + String privateFQDN(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the servicePrincipalProfile value. + */ + ManagedClusterServicePrincipalProfile servicePrincipalProfile(); + + /** + * @return the windowsProfile value. + */ + ManagedClusterWindowsProfile windowsProfile(); + + /** + * The entirety of the ManagedCluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ManagedCluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ManagedCluster definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ManagedCluster definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the managedcluster definition allowing to specify AadProfile. + */ + interface WithAadProfile { + /** + * Specifies aadProfile. + * @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 AddonProfiles. + */ + interface WithAddonProfiles { + /** + * Specifies addonProfiles. + * @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 AgentPoolProfiles. + */ + interface WithAgentPoolProfiles { + /** + * Specifies agentPoolProfiles. + * @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 ApiServerAccessProfile. + */ + interface WithApiServerAccessProfile { + /** + * Specifies apiServerAccessProfile. + * @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 DnsPrefix. + */ + interface WithDnsPrefix { + /** + * Specifies dnsPrefix. + * @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 EnablePodSecurityPolicy. + */ + interface WithEnablePodSecurityPolicy { + /** + * Specifies enablePodSecurityPolicy. + * @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 EnableRBAC. + */ + interface WithEnableRBAC { + /** + * Specifies enableRBAC. + * @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 Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @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 kubernetesVersion. + * @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 LinuxProfile. + */ + interface WithLinuxProfile { + /** + * Specifies linuxProfile. + * @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 NetworkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies networkProfile. + * @param networkProfile Profile of network configuration + * @return the next definition stage + */ + WithCreate withNetworkProfile(ContainerServiceNetworkProfile networkProfile); + } + + /** + * The stage of the managedcluster definition allowing to specify NodeResourceGroup. + */ + interface WithNodeResourceGroup { + /** + * Specifies nodeResourceGroup. + * @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 ServicePrincipalProfile. + */ + interface WithServicePrincipalProfile { + /** + * Specifies servicePrincipalProfile. + * @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 WindowsProfile. + */ + interface WithWindowsProfile { + /** + * Specifies windowsProfile. + * @param windowsProfile Profile for Windows VMs in the container service cluster + * @return the next definition stage + */ + WithCreate withWindowsProfile(ManagedClusterWindowsProfile windowsProfile); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAadProfile, DefinitionStages.WithAddonProfiles, DefinitionStages.WithAgentPoolProfiles, DefinitionStages.WithApiServerAccessProfile, DefinitionStages.WithDnsPrefix, DefinitionStages.WithEnablePodSecurityPolicy, DefinitionStages.WithEnableRBAC, DefinitionStages.WithIdentity, DefinitionStages.WithKubernetesVersion, DefinitionStages.WithLinuxProfile, DefinitionStages.WithNetworkProfile, DefinitionStages.WithNodeResourceGroup, DefinitionStages.WithServicePrincipalProfile, DefinitionStages.WithWindowsProfile { + } + } + /** + * The template for a ManagedCluster update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAadProfile, UpdateStages.WithAddonProfiles, UpdateStages.WithAgentPoolProfiles, UpdateStages.WithApiServerAccessProfile, UpdateStages.WithDnsPrefix, UpdateStages.WithEnablePodSecurityPolicy, UpdateStages.WithEnableRBAC, UpdateStages.WithIdentity, UpdateStages.WithKubernetesVersion, UpdateStages.WithLinuxProfile, UpdateStages.WithNetworkProfile, UpdateStages.WithNodeResourceGroup, UpdateStages.WithServicePrincipalProfile, UpdateStages.WithWindowsProfile { + } + + /** + * Grouping of ManagedCluster update stages. + */ + interface UpdateStages { + /** + * The stage of the managedcluster update allowing to specify AadProfile. + */ + interface WithAadProfile { + /** + * Specifies aadProfile. + * @param aadProfile Profile of Azure Active Directory configuration + * @return the next update stage + */ + Update withAadProfile(ManagedClusterAADProfile aadProfile); + } + + /** + * The stage of the managedcluster update allowing to specify AddonProfiles. + */ + interface WithAddonProfiles { + /** + * Specifies addonProfiles. + * @param addonProfiles Profile of managed cluster add-on + * @return the next update stage + */ + Update withAddonProfiles(Map addonProfiles); + } + + /** + * The stage of the managedcluster update allowing to specify AgentPoolProfiles. + */ + interface WithAgentPoolProfiles { + /** + * Specifies agentPoolProfiles. + * @param agentPoolProfiles Properties of the agent pool + * @return the next update stage + */ + Update withAgentPoolProfiles(List agentPoolProfiles); + } + + /** + * The stage of the managedcluster update allowing to specify ApiServerAccessProfile. + */ + interface WithApiServerAccessProfile { + /** + * Specifies apiServerAccessProfile. + * @param apiServerAccessProfile Access profile for managed cluster API server + * @return the next update stage + */ + Update withApiServerAccessProfile(ManagedClusterAPIServerAccessProfile apiServerAccessProfile); + } + + /** + * The stage of the managedcluster update allowing to specify DnsPrefix. + */ + interface WithDnsPrefix { + /** + * Specifies dnsPrefix. + * @param dnsPrefix DNS prefix specified when creating the managed cluster + * @return the next update stage + */ + Update withDnsPrefix(String dnsPrefix); + } + + /** + * The stage of the managedcluster update allowing to specify EnablePodSecurityPolicy. + */ + interface WithEnablePodSecurityPolicy { + /** + * Specifies enablePodSecurityPolicy. + * @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 update stage + */ + Update withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy); + } + + /** + * The stage of the managedcluster update allowing to specify EnableRBAC. + */ + interface WithEnableRBAC { + /** + * Specifies enableRBAC. + * @param enableRBAC Whether to enable Kubernetes Role-Based Access Control + * @return the next update stage + */ + Update withEnableRBAC(Boolean enableRBAC); + } + + /** + * The stage of the managedcluster update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of the managed cluster, if configured + * @return the next update stage + */ + Update withIdentity(ManagedClusterIdentity identity); + } + + /** + * The stage of the managedcluster update allowing to specify KubernetesVersion. + */ + interface WithKubernetesVersion { + /** + * Specifies kubernetesVersion. + * @param kubernetesVersion Version of Kubernetes specified when creating the managed cluster + * @return the next update stage + */ + Update withKubernetesVersion(String kubernetesVersion); + } + + /** + * The stage of the managedcluster update allowing to specify LinuxProfile. + */ + interface WithLinuxProfile { + /** + * Specifies linuxProfile. + * @param linuxProfile Profile for Linux VMs in the container service cluster + * @return the next update stage + */ + Update withLinuxProfile(ContainerServiceLinuxProfile linuxProfile); + } + + /** + * The stage of the managedcluster update allowing to specify NetworkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies networkProfile. + * @param networkProfile Profile of network configuration + * @return the next update stage + */ + Update withNetworkProfile(ContainerServiceNetworkProfile networkProfile); + } + + /** + * The stage of the managedcluster update allowing to specify NodeResourceGroup. + */ + interface WithNodeResourceGroup { + /** + * Specifies nodeResourceGroup. + * @param nodeResourceGroup Name of the resource group containing agent pool nodes + * @return the next update stage + */ + Update withNodeResourceGroup(String nodeResourceGroup); + } + + /** + * The stage of the managedcluster update allowing to specify ServicePrincipalProfile. + */ + interface WithServicePrincipalProfile { + /** + * Specifies servicePrincipalProfile. + * @param servicePrincipalProfile Information about a service principal identity for the cluster to use for manipulating Azure APIs + * @return the next update stage + */ + Update withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile); + } + + /** + * The stage of the managedcluster update allowing to specify WindowsProfile. + */ + interface WithWindowsProfile { + /** + * Specifies windowsProfile. + * @param windowsProfile Profile for Windows VMs in the container service cluster + * @return the next update stage + */ + Update withWindowsProfile(ManagedClusterWindowsProfile windowsProfile); + } + + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAADProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAADProfile.java new file mode 100644 index 0000000000000..907a45f83bda0 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAADProfile.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AADProfile specifies attributes for Azure Active Directory integration. + */ +public class ManagedClusterAADProfile { + /** + * The client AAD application ID. + */ + @JsonProperty(value = "clientAppID", required = true) + private String clientAppID; + + /** + * The server AAD application ID. + */ + @JsonProperty(value = "serverAppID", required = true) + 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 client AAD application ID. + * + * @return the clientAppID value + */ + public String clientAppID() { + return this.clientAppID; + } + + /** + * Set 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 server AAD application ID. + * + * @return the serverAppID value + */ + public String serverAppID() { + return this.serverAppID; + } + + /** + * Set 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 server AAD application secret. + * + * @return the serverAppSecret value + */ + public String serverAppSecret() { + return this.serverAppSecret; + } + + /** + * Set 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 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 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAPIServerAccessProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAPIServerAccessProfile.java new file mode 100644 index 0000000000000..038fffccc18b9 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAPIServerAccessProfile.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Access profile for managed cluster API server. + */ +public class ManagedClusterAPIServerAccessProfile { + /** + * 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; + + /** + * Get authorized IP Ranges to kubernetes API server. + * + * @return the authorizedIPRanges value + */ + public List authorizedIPRanges() { + return this.authorizedIPRanges; + } + + /** + * Set 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 whether to create the cluster as a private cluster or not. + * + * @return the enablePrivateCluster value + */ + public Boolean enablePrivateCluster() { + return this.enablePrivateCluster; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAccessProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAccessProfile.java new file mode 100644 index 0000000000000..e02291d490e30 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAccessProfile.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ManagedClusterAccessProfileInner; +import java.util.Map; + +/** + * Type representing ManagedClusterAccessProfile. + */ +public interface ManagedClusterAccessProfile extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kubeConfig value. + */ + byte[] kubeConfig(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAddonProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAddonProfile.java new file mode 100644 index 0000000000000..78a6cb6f30ee4 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAddonProfile.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A Kubernetes add-on profile for a managed cluster. + */ +public class ManagedClusterAddonProfile { + /** + * Whether the add-on is enabled or not. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * Key-value pairs for configuring an add-on. + */ + @JsonProperty(value = "config") + private Map config; + + /** + * Get whether the add-on is enabled or not. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set 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 key-value pairs for configuring an add-on. + * + * @return the config value + */ + public Map config() { + return this.config; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAgentPoolProfile.java new file mode 100644 index 0000000000000..732d0556649a7 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAgentPoolProfile.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for the container service agent pool. + */ +public class ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { + /** + * 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 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 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAgentPoolProfileProperties.java new file mode 100644 index 0000000000000..7e39504c0e37a --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterAgentPoolProfileProperties.java @@ -0,0 +1,511 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties for the container service agent pool profile. + */ +public class ManagedClusterAgentPoolProfileProperties { + /** + * Number of agents (VMs) to host docker containers. Allowed values must be + * in the range of 1 to 100 (inclusive). The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Size of agent VMs. Possible values include: 'Standard_A1', + * 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', + * 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', + * 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', + * 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', + * 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', + * 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', + * 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', + * 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', + * 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', + * 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', + * 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', + * 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', + * 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', + * 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + * 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + * 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + * 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + * 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + * 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + * 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + * 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + * 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + * 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + * 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', + * 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', + * 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', + * 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', + * 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', + * 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + * 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + * 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + * 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + * 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + * 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + * 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + * 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', + * 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', + * 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', + * 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', + * 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', + * 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', + * 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', + * 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', + * 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', + * 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + * 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + * 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + * 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', + * 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', + * 'Standard_NV6'. + */ + @JsonProperty(value = "vmSize") + private ContainerServiceVMSizeTypes 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; + + /** + * VNet SubnetID specifies the VNet's subnet identifier. + */ + @JsonProperty(value = "vnetSubnetID") + private String vnetSubnetID; + + /** + * 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. Possible values include: 'Linux', 'Windows'. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /** + * 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. Possible values + * include: 'VirtualMachineScaleSets', 'AvailabilitySet'. + */ + @JsonProperty(value = "type") + private AgentPoolType type; + + /** + * Version of orchestrator specified when creating the managed cluster. + */ + @JsonProperty(value = "orchestratorVersion") + private String orchestratorVersion; + + /** + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * (PREVIEW) 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; + + /** + * ScaleSetPriority to be used to specify virtual machine scale set + * priority. Default to regular. Possible values include: 'Low', 'Regular'. + */ + @JsonProperty(value = "scaleSetPriority") + private ScaleSetPriority scaleSetPriority; + + /** + * ScaleSetEvictionPolicy to be used to specify eviction policy for low + * priority virtual machine scale set. Default to Delete. Possible values + * include: 'Delete', 'Deallocate'. + */ + @JsonProperty(value = "scaleSetEvictionPolicy") + private ScaleSetEvictionPolicy scaleSetEvictionPolicy; + + /** + * Taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule. + */ + @JsonProperty(value = "nodeTaints") + private List nodeTaints; + + /** + * Get number of agents (VMs) to host docker containers. 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 number of agents (VMs) to host docker containers. 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 ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'. + * + * @return the vmSize value + */ + public ContainerServiceVMSizeTypes vmSize() { + return this.vmSize; + } + + /** + * Set size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'. + * + * @param vmSize the vmSize value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withVmSize(ContainerServiceVMSizeTypes vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get 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 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 vNet SubnetID specifies the VNet's subnet identifier. + * + * @return the vnetSubnetID value + */ + public String vnetSubnetID() { + return this.vnetSubnetID; + } + + /** + * Set vNet SubnetID specifies the VNet's subnet identifier. + * + * @param vnetSubnetID the vnetSubnetID value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withVnetSubnetID(String vnetSubnetID) { + this.vnetSubnetID = vnetSubnetID; + return this; + } + + /** + * Get maximum number of pods that can run on a node. + * + * @return the maxPods value + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set 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 osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @return the osType value + */ + public OSType osType() { + return this.osType; + } + + /** + * Set osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @param osType the osType value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get maximum number of nodes for auto-scaling. + * + * @return the maxCount value + */ + public Integer maxCount() { + return this.maxCount; + } + + /** + * Set 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 minimum number of nodes for auto-scaling. + * + * @return the minCount value + */ + public Integer minCount() { + return this.minCount; + } + + /** + * Set 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 whether to enable auto-scaler. + * + * @return the enableAutoScaling value + */ + public Boolean enableAutoScaling() { + return this.enableAutoScaling; + } + + /** + * Set 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 agentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'. + * + * @return the type value + */ + public AgentPoolType type() { + return this.type; + } + + /** + * Set agentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'. + * + * @param type the type value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withType(AgentPoolType type) { + this.type = type; + return this; + } + + /** + * Get version of orchestrator specified when creating the managed cluster. + * + * @return the orchestratorVersion value + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set 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 current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get (PREVIEW) Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * + * @return the availabilityZones value + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set (PREVIEW) 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 enable public IP for nodes. + * + * @return the enableNodePublicIP value + */ + public Boolean enableNodePublicIP() { + return this.enableNodePublicIP; + } + + /** + * Set 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 scaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular'. + * + * @return the scaleSetPriority value + */ + public ScaleSetPriority scaleSetPriority() { + return this.scaleSetPriority; + } + + /** + * Set scaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular'. + * + * @param scaleSetPriority the scaleSetPriority value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + this.scaleSetPriority = scaleSetPriority; + return this; + } + + /** + * Get scaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. + * + * @return the scaleSetEvictionPolicy value + */ + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.scaleSetEvictionPolicy; + } + + /** + * Set scaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. + * + * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + this.scaleSetEvictionPolicy = scaleSetEvictionPolicy; + return this; + } + + /** + * Get 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 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterIdentity.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterIdentity.java new file mode 100644 index 0000000000000..f037f5ab364af --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterIdentity.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identity for the managed cluster. + */ +public class ManagedClusterIdentity { + /** + * The principal id of the system assigned identity which is used by master + * components. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The tenant id of the system assigned identity which is used by master + * components. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * The type of identity used for the managed cluster. 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. Possible values include: + * 'SystemAssigned', 'None'. + */ + @JsonProperty(value = "type") + private ResourceIdentityType type; + + /** + * Get 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 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 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. Possible values include: 'SystemAssigned', 'None'. + * + * @return the type value + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set 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. Possible values include: 'SystemAssigned', 'None'. + * + * @param type the type value to set + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfile.java new file mode 100644 index 0000000000000..bf6831dd84f84 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfile.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile of the managed cluster load balancer. + */ +public class ManagedClusterLoadBalancerProfile { + /** + * Desired managed outbound IPs for the cluster load balancer. + */ + @JsonProperty(value = "managedOutboundIPs") + private ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs; + + /** + * Desired outbound IP Prefix resources for the cluster load balancer. + */ + @JsonProperty(value = "outboundIPPrefixes") + private ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes; + + /** + * Desired outbound IP resources for the cluster load balancer. + */ + @JsonProperty(value = "outboundIPs") + private ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs; + + /** + * The effective outbound IP resources of the cluster load balancer. + */ + @JsonProperty(value = "effectiveOutboundIPs") + private List effectiveOutboundIPs; + + /** + * Get desired managed outbound IPs for the cluster load balancer. + * + * @return the managedOutboundIPs value + */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs() { + return this.managedOutboundIPs; + } + + /** + * Set 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 desired outbound IP Prefix resources for the cluster load balancer. + * + * @return the outboundIPPrefixes value + */ + public ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes() { + return this.outboundIPPrefixes; + } + + /** + * Set 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 desired outbound IP resources for the cluster load balancer. + * + * @return the outboundIPs value + */ + public ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs() { + return this.outboundIPs; + } + + /** + * Set 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 effective outbound IP resources of the cluster load balancer. + * + * @return the effectiveOutboundIPs value + */ + public List effectiveOutboundIPs() { + return this.effectiveOutboundIPs; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java new file mode 100644 index 0000000000000..f3935541050e1 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Desired managed outbound IPs for the cluster load balancer. + */ +public class ManagedClusterLoadBalancerProfileManagedOutboundIPs { + /** + * 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 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 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.java new file mode 100644 index 0000000000000..4acd7d796d0b1 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Desired outbound IP Prefix resources for the cluster load balancer. + */ +public class ManagedClusterLoadBalancerProfileOutboundIPPrefixes { + /** + * A list of public IP prefix resources. + */ + @JsonProperty(value = "publicIPPrefixes") + private List publicIPPrefixes; + + /** + * Get a list of public IP prefix resources. + * + * @return the publicIPPrefixes value + */ + public List publicIPPrefixes() { + return this.publicIPPrefixes; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileOutboundIPs.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileOutboundIPs.java new file mode 100644 index 0000000000000..43d98174785eb --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterLoadBalancerProfileOutboundIPs.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Desired outbound IP resources for the cluster load balancer. + */ +public class ManagedClusterLoadBalancerProfileOutboundIPs { + /** + * A list of public IP resources. + */ + @JsonProperty(value = "publicIPs") + private List publicIPs; + + /** + * Get a list of public IP resources. + * + * @return the publicIPs value + */ + public List publicIPs() { + return this.publicIPs; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterPoolUpgradeProfile.java new file mode 100644 index 0000000000000..a19d22ffe7200 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterPoolUpgradeProfile.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of available upgrade versions. + */ +public class ManagedClusterPoolUpgradeProfile { + /** + * 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. Possible values include: 'Linux', 'Windows'. + */ + @JsonProperty(value = "osType", required = true) + private OSType osType; + + /** + * List of orchestrator types and versions available for upgrade. + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /** + * Get kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set 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 pool name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set 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 osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @return the osType value + */ + public OSType osType() { + return this.osType; + } + + /** + * Set osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @param osType the osType value to set + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get list of orchestrator types and versions available for upgrade. + * + * @return the upgrades value + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterPoolUpgradeProfileUpgradesItem.java new file mode 100644 index 0000000000000..74b0e4c1057d6 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterPoolUpgradeProfileUpgradesItem.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterPoolUpgradeProfileUpgradesItem model. + */ +public class ManagedClusterPoolUpgradeProfileUpgradesItem { + /** + * 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 kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set 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 whether Kubernetes version is currently in preview. + * + * @return the isPreview value + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterServicePrincipalProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterServicePrincipalProfile.java new file mode 100644 index 0000000000000..55650a3c97112 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterServicePrincipalProfile.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. + */ +public class ManagedClusterServicePrincipalProfile { + /** + * The ID for the service principal. + */ + @JsonProperty(value = "clientId", required = true) + private String clientId; + + /** + * The secret password associated with the service principal in plain text. + */ + @JsonProperty(value = "secret") + private String secret; + + /** + * Get the ID for the service principal. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set 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 password associated with the service principal in plain text. + * + * @return the secret value + */ + public String secret() { + return this.secret; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterUpgradeProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterUpgradeProfile.java new file mode 100644 index 0000000000000..fdc580b7bf65e --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterUpgradeProfile.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ManagedClusterUpgradeProfileInner; +import java.util.List; + +/** + * Type representing ManagedClusterUpgradeProfile. + */ +public interface ManagedClusterUpgradeProfile extends HasInner, HasManager { + /** + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * @return the controlPlaneProfile value. + */ + ManagedClusterPoolUpgradeProfile controlPlaneProfile(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterWindowsProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterWindowsProfile.java new file mode 100644 index 0000000000000..33345b5935c71 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusterWindowsProfile.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for Windows VMs in the container service cluster. + */ +public class ManagedClusterWindowsProfile { + /** + * The administrator username to use for Windows VMs. + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /** + * The administrator password to use for Windows VMs. + */ + @JsonProperty(value = "adminPassword") + private String adminPassword; + + /** + * Get the administrator username to use for Windows VMs. + * + * @return the adminUsername value + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the administrator username to use for Windows VMs. + * + * @param adminUsername the adminUsername value to set + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the administrator password to use for Windows VMs. + * + * @return the adminPassword value + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set the administrator password to use for Windows VMs. + * + * @param adminPassword the adminPassword value to set + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusters.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusters.java new file mode 100644 index 0000000000000..74b1109ac5307 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ManagedClusters.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ManagedClustersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ManagedClusters. + */ +public interface ManagedClusters extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Gets cluster admin credential of a managed cluster. + * 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 + * @return the observable for the request + */ + Observable listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName); + + /** + * Gets cluster user credential of a managed cluster. + * 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 + * @return the observable for the request + */ + Observable listClusterUserCredentialsAsync(String resourceGroupName, String resourceName); + + /** + * Gets cluster monitoring user credential of a managed cluster. + * 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 + * @return the observable for the request + */ + Observable listClusterMonitoringUserCredentialsAsync(String resourceGroupName, String resourceName); + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 + * @return the observable for the request + */ + Completable resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset AAD Profile of a managed cluster. + * 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 + * @return the observable for the request + */ + Completable resetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters); + + /** + * Rotate certificates of a managed cluster. + * 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 + * @return the observable for the request + */ + Completable rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); + + /** + * Gets upgrade profile for a managed cluster. + * 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 + * @return the observable for the request + */ + Observable getUpgradeProfileAsync(String resourceGroupName, String resourceName); + + /** + * Gets an access profile of a managed cluster. + * Gets the accessProfile for the specified role name 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 roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAccessProfileAsync(String resourceGroupName, String resourceName, String roleName); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkPlugin.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkPlugin.java new file mode 100644 index 0000000000000..3f6902cf63a6b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkPlugin.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkPolicy.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkPolicy.java new file mode 100644 index 0000000000000..114e4e8a13a7b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkPolicy.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkProfile.java new file mode 100644 index 0000000000000..42b279a6e462d --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/NetworkProfile.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents the OpenShift networking configuration. + */ +public class NetworkProfile { + /** + * CIDR for the OpenShift Vnet. + */ + @JsonProperty(value = "vnetCidr") + private String vnetCidr; + + /** + * CIDR of the Vnet to peer. + */ + @JsonProperty(value = "peerVnetId") + private String peerVnetId; + + /** + * ID of the Vnet created for OSA cluster. + */ + @JsonProperty(value = "vnetId") + private String vnetId; + + /** + * Get cIDR for the OpenShift Vnet. + * + * @return the vnetCidr value + */ + public String vnetCidr() { + return this.vnetCidr; + } + + /** + * Set cIDR for the OpenShift Vnet. + * + * @param vnetCidr the vnetCidr value to set + * @return the NetworkProfile object itself. + */ + public NetworkProfile withVnetCidr(String vnetCidr) { + this.vnetCidr = vnetCidr; + return this; + } + + /** + * Get cIDR of the Vnet to peer. + * + * @return the peerVnetId value + */ + public String peerVnetId() { + return this.peerVnetId; + } + + /** + * Set cIDR of the Vnet to peer. + * + * @param peerVnetId the peerVnetId value to set + * @return the NetworkProfile object itself. + */ + public NetworkProfile withPeerVnetId(String peerVnetId) { + this.peerVnetId = peerVnetId; + return this; + } + + /** + * Get iD of the Vnet created for OSA cluster. + * + * @return the vnetId value + */ + public String vnetId() { + return this.vnetId; + } + + /** + * Set iD of the Vnet created for OSA cluster. + * + * @param vnetId the vnetId value to set + * @return the NetworkProfile object itself. + */ + public NetworkProfile withVnetId(String vnetId) { + this.vnetId = vnetId; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OSType.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OSType.java new file mode 100644 index 0000000000000..fc35d060643c8 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OSType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftAgentPoolProfileRole.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftAgentPoolProfileRole.java new file mode 100644 index 0000000000000..f4ce6201e351a --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftAgentPoolProfileRole.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OpenShiftAgentPoolProfileRole. + */ +public final class OpenShiftAgentPoolProfileRole extends ExpandableStringEnum { + /** Static value compute for OpenShiftAgentPoolProfileRole. */ + public static final OpenShiftAgentPoolProfileRole COMPUTE = fromString("compute"); + + /** Static value infra for OpenShiftAgentPoolProfileRole. */ + public static final OpenShiftAgentPoolProfileRole INFRA = fromString("infra"); + + /** + * Creates or finds a OpenShiftAgentPoolProfileRole from its string representation. + * @param name a name to look for + * @return the corresponding OpenShiftAgentPoolProfileRole + */ + @JsonCreator + public static OpenShiftAgentPoolProfileRole fromString(String name) { + return fromString(name, OpenShiftAgentPoolProfileRole.class); + } + + /** + * @return known OpenShiftAgentPoolProfileRole values + */ + public static Collection values() { + return values(OpenShiftAgentPoolProfileRole.class); + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftContainerServiceVMSize.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftContainerServiceVMSize.java new file mode 100644 index 0000000000000..1f0eeb9bc1a78 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftContainerServiceVMSize.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OpenShiftContainerServiceVMSize. + */ +public final class OpenShiftContainerServiceVMSize extends ExpandableStringEnum { + /** Static value Standard_D2s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D2S_V3 = fromString("Standard_D2s_v3"); + + /** Static value Standard_D4s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D4S_V3 = fromString("Standard_D4s_v3"); + + /** Static value Standard_D8s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D8S_V3 = fromString("Standard_D8s_v3"); + + /** Static value Standard_D16s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D16S_V3 = fromString("Standard_D16s_v3"); + + /** Static value Standard_D32s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D32S_V3 = fromString("Standard_D32s_v3"); + + /** Static value Standard_D64s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_D64S_V3 = fromString("Standard_D64s_v3"); + + /** Static value Standard_DS4_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS4_V2 = fromString("Standard_DS4_v2"); + + /** Static value Standard_DS5_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS5_V2 = fromString("Standard_DS5_v2"); + + /** Static value Standard_F8s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F8S_V2 = fromString("Standard_F8s_v2"); + + /** Static value Standard_F16s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F16S_V2 = fromString("Standard_F16s_v2"); + + /** Static value Standard_F32s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F32S_V2 = fromString("Standard_F32s_v2"); + + /** Static value Standard_F64s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F64S_V2 = fromString("Standard_F64s_v2"); + + /** Static value Standard_F72s_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F72S_V2 = fromString("Standard_F72s_v2"); + + /** Static value Standard_F8s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F8S = fromString("Standard_F8s"); + + /** Static value Standard_F16s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_F16S = fromString("Standard_F16s"); + + /** Static value Standard_E4s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E4S_V3 = fromString("Standard_E4s_v3"); + + /** Static value Standard_E8s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E8S_V3 = fromString("Standard_E8s_v3"); + + /** Static value Standard_E16s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E16S_V3 = fromString("Standard_E16s_v3"); + + /** Static value Standard_E20s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E20S_V3 = fromString("Standard_E20s_v3"); + + /** Static value Standard_E32s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E32S_V3 = fromString("Standard_E32s_v3"); + + /** Static value Standard_E64s_v3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_E64S_V3 = fromString("Standard_E64s_v3"); + + /** Static value Standard_GS2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS2 = fromString("Standard_GS2"); + + /** Static value Standard_GS3 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS3 = fromString("Standard_GS3"); + + /** Static value Standard_GS4 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS4 = fromString("Standard_GS4"); + + /** Static value Standard_GS5 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS5 = fromString("Standard_GS5"); + + /** Static value Standard_DS12_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS12_V2 = fromString("Standard_DS12_v2"); + + /** Static value Standard_DS13_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS13_V2 = fromString("Standard_DS13_v2"); + + /** Static value Standard_DS14_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS14_V2 = fromString("Standard_DS14_v2"); + + /** Static value Standard_DS15_v2 for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS15_V2 = fromString("Standard_DS15_v2"); + + /** Static value Standard_L4s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_L4S = fromString("Standard_L4s"); + + /** Static value Standard_L8s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_L8S = fromString("Standard_L8s"); + + /** Static value Standard_L16s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_L16S = fromString("Standard_L16s"); + + /** Static value Standard_L32s for OpenShiftContainerServiceVMSize. */ + public static final OpenShiftContainerServiceVMSize STANDARD_L32S = fromString("Standard_L32s"); + + /** + * Creates or finds a OpenShiftContainerServiceVMSize from its string representation. + * @param name a name to look for + * @return the corresponding OpenShiftContainerServiceVMSize + */ + @JsonCreator + public static OpenShiftContainerServiceVMSize fromString(String name) { + return fromString(name, OpenShiftContainerServiceVMSize.class); + } + + /** + * @return known OpenShiftContainerServiceVMSize values + */ + public static Collection values() { + return values(OpenShiftContainerServiceVMSize.class); + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedCluster.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedCluster.java new file mode 100644 index 0000000000000..d8711252d5056 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedCluster.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.OpenShiftManagedClusterInner; + +/** + * Type representing OpenShiftManagedCluster. + */ +public interface OpenShiftManagedCluster extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * @return the authProfile value. + */ + OpenShiftManagedClusterAuthProfile authProfile(); + + /** + * @return the clusterVersion value. + */ + String clusterVersion(); + + /** + * @return the fqdn value. + */ + String fqdn(); + + /** + * @return the masterPoolProfile value. + */ + OpenShiftManagedClusterMasterPoolProfile masterPoolProfile(); + + /** + * @return the networkProfile value. + */ + NetworkProfile networkProfile(); + + /** + * @return the openShiftVersion value. + */ + String openShiftVersion(); + + /** + * @return the plan value. + */ + PurchasePlan plan(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the publicHostname value. + */ + String publicHostname(); + + /** + * @return the routerProfiles value. + */ + List routerProfiles(); + + /** + * The entirety of the OpenShiftManagedCluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithOpenShiftVersion, DefinitionStages.WithCreate { + } + + /** + * Grouping of OpenShiftManagedCluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a OpenShiftManagedCluster definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the openshiftmanagedcluster definition allowing to specify OpenShiftVersion. + */ + interface WithOpenShiftVersion { + /** + * Specifies openShiftVersion. + * @param openShiftVersion Version of OpenShift specified when creating the cluster + * @return the next definition stage +*/ + WithCreate withOpenShiftVersion(String openShiftVersion); + } + + /** + * The stage of the openshiftmanagedcluster definition allowing to specify AgentPoolProfiles. + */ + interface WithAgentPoolProfiles { + /** + * Specifies agentPoolProfiles. + * @param agentPoolProfiles Configuration of OpenShift cluster VMs + * @return the next definition stage + */ + WithCreate withAgentPoolProfiles(List agentPoolProfiles); + } + + /** + * The stage of the openshiftmanagedcluster definition allowing to specify AuthProfile. + */ + interface WithAuthProfile { + /** + * Specifies authProfile. + * @param authProfile Configures OpenShift authentication + * @return the next definition stage + */ + WithCreate withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile); + } + + /** + * The stage of the openshiftmanagedcluster definition allowing to specify MasterPoolProfile. + */ + interface WithMasterPoolProfile { + /** + * Specifies masterPoolProfile. + * @param masterPoolProfile Configuration for OpenShift master VMs + * @return the next definition stage + */ + WithCreate withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile); + } + + /** + * The stage of the openshiftmanagedcluster definition allowing to specify NetworkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies networkProfile. + * @param networkProfile Configuration for OpenShift networking + * @return the next definition stage + */ + WithCreate withNetworkProfile(NetworkProfile networkProfile); + } + + /** + * The stage of the openshiftmanagedcluster definition allowing to specify Plan. + */ + interface WithPlan { + /** + * Specifies plan. + * @param plan Define the resource plan as required by ARM for billing purposes + * @return the next definition stage + */ + WithCreate withPlan(PurchasePlan plan); + } + + /** + * The stage of the openshiftmanagedcluster definition allowing to specify RouterProfiles. + */ + interface WithRouterProfiles { + /** + * Specifies routerProfiles. + * @param routerProfiles Configuration for OpenShift router(s) + * @return the next definition stage + */ + WithCreate withRouterProfiles(List routerProfiles); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAgentPoolProfiles, DefinitionStages.WithAuthProfile, DefinitionStages.WithMasterPoolProfile, DefinitionStages.WithNetworkProfile, DefinitionStages.WithPlan, DefinitionStages.WithRouterProfiles { + } + } + /** + * The template for a OpenShiftManagedCluster update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAgentPoolProfiles, UpdateStages.WithAuthProfile, UpdateStages.WithMasterPoolProfile, UpdateStages.WithNetworkProfile, UpdateStages.WithPlan, UpdateStages.WithRouterProfiles { + } + + /** + * Grouping of OpenShiftManagedCluster update stages. + */ + interface UpdateStages { + /** + * The stage of the openshiftmanagedcluster update allowing to specify AgentPoolProfiles. + */ + interface WithAgentPoolProfiles { + /** + * Specifies agentPoolProfiles. + * @param agentPoolProfiles Configuration of OpenShift cluster VMs + * @return the next update stage + */ + Update withAgentPoolProfiles(List agentPoolProfiles); + } + + /** + * The stage of the openshiftmanagedcluster update allowing to specify AuthProfile. + */ + interface WithAuthProfile { + /** + * Specifies authProfile. + * @param authProfile Configures OpenShift authentication + * @return the next update stage + */ + Update withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile); + } + + /** + * The stage of the openshiftmanagedcluster update allowing to specify MasterPoolProfile. + */ + interface WithMasterPoolProfile { + /** + * Specifies masterPoolProfile. + * @param masterPoolProfile Configuration for OpenShift master VMs + * @return the next update stage + */ + Update withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile); + } + + /** + * The stage of the openshiftmanagedcluster update allowing to specify NetworkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies networkProfile. + * @param networkProfile Configuration for OpenShift networking + * @return the next update stage + */ + Update withNetworkProfile(NetworkProfile networkProfile); + } + + /** + * The stage of the openshiftmanagedcluster update allowing to specify Plan. + */ + interface WithPlan { + /** + * Specifies plan. + * @param plan Define the resource plan as required by ARM for billing purposes + * @return the next update stage + */ + Update withPlan(PurchasePlan plan); + } + + /** + * The stage of the openshiftmanagedcluster update allowing to specify RouterProfiles. + */ + interface WithRouterProfiles { + /** + * Specifies routerProfiles. + * @param routerProfiles Configuration for OpenShift router(s) + * @return the next update stage + */ + Update withRouterProfiles(List routerProfiles); + } + + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAADIdentityProvider.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAADIdentityProvider.java new file mode 100644 index 0000000000000..7ed93f2cb6a1f --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAADIdentityProvider.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Defines the Identity provider for MS AAD. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = OpenShiftManagedClusterAADIdentityProvider.class) +@JsonTypeName("AADIdentityProvider") +public class OpenShiftManagedClusterAADIdentityProvider extends OpenShiftManagedClusterBaseIdentityProvider { + /** + * The clientId password associated with the provider. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /** + * The secret password associated with the provider. + */ + @JsonProperty(value = "secret") + private String secret; + + /** + * The tenantId associated with the provider. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The groupId to be granted cluster admin role. + */ + @JsonProperty(value = "customerAdminGroupId") + private String customerAdminGroupId; + + /** + * Get the clientId password associated with the provider. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId password associated with the provider. + * + * @param clientId the clientId value to set + * @return the OpenShiftManagedClusterAADIdentityProvider object itself. + */ + public OpenShiftManagedClusterAADIdentityProvider withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the secret password associated with the provider. + * + * @return the secret value + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret password associated with the provider. + * + * @param secret the secret value to set + * @return the OpenShiftManagedClusterAADIdentityProvider object itself. + */ + public OpenShiftManagedClusterAADIdentityProvider withSecret(String secret) { + this.secret = secret; + return this; + } + + /** + * Get the tenantId associated with the provider. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId associated with the provider. + * + * @param tenantId the tenantId value to set + * @return the OpenShiftManagedClusterAADIdentityProvider object itself. + */ + public OpenShiftManagedClusterAADIdentityProvider withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the groupId to be granted cluster admin role. + * + * @return the customerAdminGroupId value + */ + public String customerAdminGroupId() { + return this.customerAdminGroupId; + } + + /** + * Set the groupId to be granted cluster admin role. + * + * @param customerAdminGroupId the customerAdminGroupId value to set + * @return the OpenShiftManagedClusterAADIdentityProvider object itself. + */ + public OpenShiftManagedClusterAADIdentityProvider withCustomerAdminGroupId(String customerAdminGroupId) { + this.customerAdminGroupId = customerAdminGroupId; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAgentPoolProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAgentPoolProfile.java new file mode 100644 index 0000000000000..30ff0c47798de --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAgentPoolProfile.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the configuration of the OpenShift cluster VMs. + */ +public class OpenShiftManagedClusterAgentPoolProfile { + /** + * Unique name of the pool profile in the context of the subscription and + * resource group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Number of agents (VMs) to host docker containers. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /** + * Size of agent VMs. Possible values include: 'Standard_D2s_v3', + * 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', + * 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_DS4_v2', + * 'Standard_DS5_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', + * 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', 'Standard_E8s_v3', + * 'Standard_E16s_v3', 'Standard_E20s_v3', 'Standard_E32s_v3', + * 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + * 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', + * 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', + * 'Standard_L16s', 'Standard_L32s'. + */ + @JsonProperty(value = "vmSize", required = true) + private OpenShiftContainerServiceVMSize vmSize; + + /** + * Subnet CIDR for the peering. + */ + @JsonProperty(value = "subnetCidr") + private String subnetCidr; + + /** + * OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux. Possible values include: 'Linux', 'Windows'. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /** + * Define the role of the AgentPoolProfile. Possible values include: + * 'compute', 'infra'. + */ + @JsonProperty(value = "role") + private OpenShiftAgentPoolProfileRole role; + + /** + * Get unique name of the pool profile in the context of the subscription and resource group. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set unique name of the pool profile in the context of the subscription and resource group. + * + * @param name the name value to set + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get number of agents (VMs) to host docker containers. + * + * @return the count value + */ + public int count() { + return this.count; + } + + /** + * Set number of agents (VMs) to host docker containers. + * + * @param count the count value to set + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withCount(int count) { + this.count = count; + return this; + } + + /** + * Get size of agent VMs. Possible values include: 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s'. + * + * @return the vmSize value + */ + public OpenShiftContainerServiceVMSize vmSize() { + return this.vmSize; + } + + /** + * Set size of agent VMs. Possible values include: 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s'. + * + * @param vmSize the vmSize value to set + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withVmSize(OpenShiftContainerServiceVMSize vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get subnet CIDR for the peering. + * + * @return the subnetCidr value + */ + public String subnetCidr() { + return this.subnetCidr; + } + + /** + * Set subnet CIDR for the peering. + * + * @param subnetCidr the subnetCidr value to set + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withSubnetCidr(String subnetCidr) { + this.subnetCidr = subnetCidr; + return this; + } + + /** + * Get osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @return the osType value + */ + public OSType osType() { + return this.osType; + } + + /** + * Set osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @param osType the osType value to set + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get define the role of the AgentPoolProfile. Possible values include: 'compute', 'infra'. + * + * @return the role value + */ + public OpenShiftAgentPoolProfileRole role() { + return this.role; + } + + /** + * Set define the role of the AgentPoolProfile. Possible values include: 'compute', 'infra'. + * + * @param role the role value to set + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withRole(OpenShiftAgentPoolProfileRole role) { + this.role = role; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAuthProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAuthProfile.java new file mode 100644 index 0000000000000..26c85fc01f1d5 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterAuthProfile.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines all possible authentication profiles for the OpenShift cluster. + */ +public class OpenShiftManagedClusterAuthProfile { + /** + * Type of authentication profile to use. + */ + @JsonProperty(value = "identityProviders") + private List identityProviders; + + /** + * Get type of authentication profile to use. + * + * @return the identityProviders value + */ + public List identityProviders() { + return this.identityProviders; + } + + /** + * Set type of authentication profile to use. + * + * @param identityProviders the identityProviders value to set + * @return the OpenShiftManagedClusterAuthProfile object itself. + */ + public OpenShiftManagedClusterAuthProfile withIdentityProviders(List identityProviders) { + this.identityProviders = identityProviders; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterBaseIdentityProvider.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterBaseIdentityProvider.java new file mode 100644 index 0000000000000..0f8532fdabaed --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterBaseIdentityProvider.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Structure for any Identity provider. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = OpenShiftManagedClusterBaseIdentityProvider.class) +@JsonTypeName("OpenShiftManagedClusterBaseIdentityProvider") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AADIdentityProvider", value = OpenShiftManagedClusterAADIdentityProvider.class) +}) +public class OpenShiftManagedClusterBaseIdentityProvider { +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterIdentityProvider.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterIdentityProvider.java new file mode 100644 index 0000000000000..0567b3bba68fc --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterIdentityProvider.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the configuration of the identity providers to be used in the + * OpenShift cluster. + */ +public class OpenShiftManagedClusterIdentityProvider { + /** + * Name of the provider. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Configuration of the provider. + */ + @JsonProperty(value = "provider") + private OpenShiftManagedClusterBaseIdentityProvider provider; + + /** + * Get name of the provider. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the provider. + * + * @param name the name value to set + * @return the OpenShiftManagedClusterIdentityProvider object itself. + */ + public OpenShiftManagedClusterIdentityProvider withName(String name) { + this.name = name; + return this; + } + + /** + * Get configuration of the provider. + * + * @return the provider value + */ + public OpenShiftManagedClusterBaseIdentityProvider provider() { + return this.provider; + } + + /** + * Set configuration of the provider. + * + * @param provider the provider value to set + * @return the OpenShiftManagedClusterIdentityProvider object itself. + */ + public OpenShiftManagedClusterIdentityProvider withProvider(OpenShiftManagedClusterBaseIdentityProvider provider) { + this.provider = provider; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterMasterPoolProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterMasterPoolProfile.java new file mode 100644 index 0000000000000..9bc5dbf9f8b62 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusterMasterPoolProfile.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * OpenShiftManagedClusterMaterPoolProfile contains configuration for OpenShift + * master VMs. + */ +public class OpenShiftManagedClusterMasterPoolProfile { + /** + * Unique name of the master pool profile in the context of the + * subscription and resource group. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Number of masters (VMs) to host docker containers. The default value is + * 3. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /** + * Size of agent VMs. Possible values include: 'Standard_D2s_v3', + * 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', + * 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_DS4_v2', + * 'Standard_DS5_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', + * 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', 'Standard_E8s_v3', + * 'Standard_E16s_v3', 'Standard_E20s_v3', 'Standard_E32s_v3', + * 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + * 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', + * 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', + * 'Standard_L16s', 'Standard_L32s'. + */ + @JsonProperty(value = "vmSize", required = true) + private OpenShiftContainerServiceVMSize vmSize; + + /** + * Subnet CIDR for the peering. + */ + @JsonProperty(value = "subnetCidr") + private String subnetCidr; + + /** + * OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux. Possible values include: 'Linux', 'Windows'. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /** + * Get unique name of the master pool profile in the context of the subscription and resource group. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set unique name of the master pool profile in the context of the subscription and resource group. + * + * @param name the name value to set + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get number of masters (VMs) to host docker containers. The default value is 3. + * + * @return the count value + */ + public int count() { + return this.count; + } + + /** + * Set number of masters (VMs) to host docker containers. The default value is 3. + * + * @param count the count value to set + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withCount(int count) { + this.count = count; + return this; + } + + /** + * Get size of agent VMs. Possible values include: 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s'. + * + * @return the vmSize value + */ + public OpenShiftContainerServiceVMSize vmSize() { + return this.vmSize; + } + + /** + * Set size of agent VMs. Possible values include: 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s'. + * + * @param vmSize the vmSize value to set + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withVmSize(OpenShiftContainerServiceVMSize vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get subnet CIDR for the peering. + * + * @return the subnetCidr value + */ + public String subnetCidr() { + return this.subnetCidr; + } + + /** + * Set subnet CIDR for the peering. + * + * @param subnetCidr the subnetCidr value to set + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withSubnetCidr(String subnetCidr) { + this.subnetCidr = subnetCidr; + return this; + } + + /** + * Get osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @return the osType value + */ + public OSType osType() { + return this.osType; + } + + /** + * Set osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @param osType the osType value to set + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusters.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusters.java new file mode 100644 index 0000000000000..df6227f56dbb9 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftManagedClusters.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.OpenShiftManagedClustersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing OpenShiftManagedClusters. + */ +public interface OpenShiftManagedClusters extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftRouterProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftRouterProfile.java new file mode 100644 index 0000000000000..9ec0b30aa17d5 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OpenShiftRouterProfile.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents an OpenShift router. + */ +public class OpenShiftRouterProfile { + /** + * Name of the router profile. + */ + @JsonProperty(value = "name") + private String name; + + /** + * DNS subdomain for OpenShift router. + */ + @JsonProperty(value = "publicSubdomain", access = JsonProperty.Access.WRITE_ONLY) + private String publicSubdomain; + + /** + * Auto-allocated FQDN for the OpenShift router. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Get name of the router profile. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the router profile. + * + * @param name the name value to set + * @return the OpenShiftRouterProfile object itself. + */ + public OpenShiftRouterProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get dNS subdomain for OpenShift router. + * + * @return the publicSubdomain value + */ + public String publicSubdomain() { + return this.publicSubdomain; + } + + /** + * Get auto-allocated FQDN for the OpenShift router. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OperationValue.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OperationValue.java new file mode 100644 index 0000000000000..614623c596074 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OperationValue.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.OperationValueInner; + +/** + * Type representing OperationValue. + */ +public interface OperationValue extends HasInner, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the operation value. + */ + String operation(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the provider value. + */ + String provider(); + + /** + * @return the resource value. + */ + String resource(); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/Operations.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/Operations.java new file mode 100644 index 0000000000000..b5dba0ebe649a --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/Operations.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Gets a list of compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorProfile.java new file mode 100644 index 0000000000000..a7d1fc64aa82f --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorProfile.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains information about orchestrator. + */ +public class OrchestratorProfile { + /** + * Orchestrator type. + */ + @JsonProperty(value = "orchestratorType") + private String orchestratorType; + + /** + * Orchestrator version (major, minor, patch). + */ + @JsonProperty(value = "orchestratorVersion", required = true) + private String orchestratorVersion; + + /** + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** + * Get orchestrator type. + * + * @return the orchestratorType value + */ + public String orchestratorType() { + return this.orchestratorType; + } + + /** + * Set orchestrator type. + * + * @param orchestratorType the orchestratorType value to set + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withOrchestratorType(String orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get orchestrator version (major, minor, patch). + * + * @return the orchestratorVersion value + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set orchestrator version (major, minor, patch). + * + * @param orchestratorVersion the orchestratorVersion value to set + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get whether Kubernetes version is currently in preview. + * + * @return the isPreview value + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set whether Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorVersionProfile.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorVersionProfile.java new file mode 100644 index 0000000000000..458ae2191589b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorVersionProfile.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The profile of an orchestrator and its available versions. + */ +public class OrchestratorVersionProfile { + /** + * Orchestrator type. + */ + @JsonProperty(value = "orchestratorType", required = true) + private String orchestratorType; + + /** + * Orchestrator version (major, minor, patch). + */ + @JsonProperty(value = "orchestratorVersion", required = true) + private String orchestratorVersion; + + /** + * Installed by default if version is not specified. + */ + @JsonProperty(value = "default") + private Boolean defaultProperty; + + /** + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** + * The list of available upgrade versions. + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /** + * Get orchestrator type. + * + * @return the orchestratorType value + */ + public String orchestratorType() { + return this.orchestratorType; + } + + /** + * Set orchestrator type. + * + * @param orchestratorType the orchestratorType value to set + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withOrchestratorType(String orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get orchestrator version (major, minor, patch). + * + * @return the orchestratorVersion value + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set orchestrator version (major, minor, patch). + * + * @param orchestratorVersion the orchestratorVersion value to set + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get installed by default if version is not specified. + * + * @return the defaultProperty value + */ + public Boolean defaultProperty() { + return this.defaultProperty; + } + + /** + * Set installed by default if version is not specified. + * + * @param defaultProperty the defaultProperty value to set + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withDefaultProperty(Boolean defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get whether Kubernetes version is currently in preview. + * + * @return the isPreview value + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set whether Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get the list of available upgrade versions. + * + * @return the upgrades value + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the list of available upgrade versions. + * + * @param upgrades the upgrades value to set + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorVersionProfileListResult.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorVersionProfileListResult.java new file mode 100644 index 0000000000000..445bf5841357b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/OrchestratorVersionProfileListResult.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2019_10_01.implementation.OrchestratorVersionProfileListResultInner; +import java.util.List; + +/** + * Type representing OrchestratorVersionProfileListResult. + */ +public interface OrchestratorVersionProfileListResult extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the orchestrators value. + */ + List orchestrators(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/PurchasePlan.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/PurchasePlan.java new file mode 100644 index 0000000000000..fd079d12361dc --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/PurchasePlan.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Used for establishing the purchase context of any 3rd Party artifact through + * MarketPlace. + */ +public class PurchasePlan { + /** + * The plan ID. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Specifies the product of the image from the marketplace. This is the + * same value as Offer under the imageReference element. + */ + @JsonProperty(value = "product") + private String product; + + /** + * The promotion code. + */ + @JsonProperty(value = "promotionCode") + private String promotionCode; + + /** + * The plan ID. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * Get the plan ID. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the plan ID. + * + * @param name the name value to set + * @return the PurchasePlan object itself. + */ + public PurchasePlan withName(String name) { + this.name = name; + return this; + } + + /** + * Get specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. + * + * @param product the product value to set + * @return the PurchasePlan object itself. + */ + public PurchasePlan withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the promotion code. + * + * @return the promotionCode value + */ + public String promotionCode() { + return this.promotionCode; + } + + /** + * Set the promotion code. + * + * @param promotionCode the promotionCode value to set + * @return the PurchasePlan object itself. + */ + public PurchasePlan withPromotionCode(String promotionCode) { + this.promotionCode = promotionCode; + return this; + } + + /** + * Get the plan ID. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the plan ID. + * + * @param publisher the publisher value to set + * @return the PurchasePlan object itself. + */ + public PurchasePlan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ResourceIdentityType.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ResourceIdentityType.java new file mode 100644 index 0000000000000..e6097ec5cbab4 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ResourceIdentityType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +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 None. */ + NONE("None"); + + /** The actual serialized value for a ResourceIdentityType instance. */ + private 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ResourceReference.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ResourceReference.java new file mode 100644 index 0000000000000..1e7f5aaa9f98c --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ResourceReference.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A reference to an Azure resource. + */ +public class ResourceReference { + /** + * The fully qualified Azure resource id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the fully qualified Azure resource id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ScaleSetEvictionPolicy.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ScaleSetEvictionPolicy.java new file mode 100644 index 0000000000000..e12fcc2681b03 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ScaleSetEvictionPolicy.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ScaleSetPriority.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ScaleSetPriority.java new file mode 100644 index 0000000000000..c68795a6a53a3 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/ScaleSetPriority.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ScaleSetPriority. + */ +public final class ScaleSetPriority extends ExpandableStringEnum { + /** Static value Low for ScaleSetPriority. */ + public static final ScaleSetPriority LOW = fromString("Low"); + + /** 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/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/TagsObject.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/TagsObject.java new file mode 100644 index 0000000000000..3c6ee4e089bb8 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/TagsObject.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Tags object for patch operations. + */ +public class TagsObject { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the TagsObject object itself. + */ + public TagsObject withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolAvailableVersionsImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolAvailableVersionsImpl.java new file mode 100644 index 0000000000000..8d0aa87a1b2ea --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolAvailableVersionsImpl.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolAvailableVersions; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; + +class AgentPoolAvailableVersionsImpl extends WrapperImpl implements AgentPoolAvailableVersions { + private final ContainerServiceManager manager; + AgentPoolAvailableVersionsImpl(AgentPoolAvailableVersionsInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public List agentPoolVersions() { + return this.inner().agentPoolVersions(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolAvailableVersionsInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolAvailableVersionsInner.java new file mode 100644 index 0000000000000..429d6baeb69a7 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolAvailableVersionsInner.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The list of available versions for an agent pool. + */ +@JsonFlatten +public class AgentPoolAvailableVersionsInner { + /** + * 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 id of the agent pool available versions. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get name of the agent pool available versions. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get type of the agent pool available versions. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get list of versions available for agent pool. + * + * @return the agentPoolVersions value + */ + public List agentPoolVersions() { + return this.agentPoolVersions; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolImpl.java new file mode 100644 index 0000000000000..5342d868ebfe7 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolImpl.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPool; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceVMSizeTypes; +import com.microsoft.azure.management.containerservice.v2019_10_01.OSType; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolType; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.ScaleSetPriority; +import com.microsoft.azure.management.containerservice.v2019_10_01.ScaleSetEvictionPolicy; + +class AgentPoolImpl extends CreatableUpdatableImpl implements AgentPool, AgentPool.Definition, AgentPool.Update { + private final ContainerServiceManager manager; + private String resourceGroupName; + private String resourceName; + private String agentPoolName; + + AgentPoolImpl(String name, ContainerServiceManager manager) { + super(name, new AgentPoolInner()); + this.manager = manager; + // Set resource name + this.agentPoolName = name; + // + } + + AgentPoolImpl(AgentPoolInner inner, ContainerServiceManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.agentPoolName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.resourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "managedClusters"); + this.agentPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "agentPools"); + // + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + AgentPoolsInner client = this.manager().inner().agentPools(); + return client.createOrUpdateAsync(this.resourceGroupName, this.resourceName, this.agentPoolName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AgentPoolsInner client = this.manager().inner().agentPools(); + return client.createOrUpdateAsync(this.resourceGroupName, this.resourceName, this.agentPoolName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AgentPoolsInner client = this.manager().inner().agentPools(); + return client.getAsync(this.resourceGroupName, this.resourceName, this.agentPoolName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public AgentPoolType agentPoolType() { + return this.inner().agentPoolType(); + } + + @Override + public List availabilityZones() { + return this.inner().availabilityZones(); + } + + @Override + public Integer count() { + return this.inner().count(); + } + + @Override + public Boolean enableAutoScaling() { + return this.inner().enableAutoScaling(); + } + + @Override + public Boolean enableNodePublicIP() { + return this.inner().enableNodePublicIP(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Integer maxCount() { + return this.inner().maxCount(); + } + + @Override + public Integer maxPods() { + return this.inner().maxPods(); + } + + @Override + public Integer minCount() { + return this.inner().minCount(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List nodeTaints() { + return this.inner().nodeTaints(); + } + + @Override + public String orchestratorVersion() { + return this.inner().orchestratorVersion(); + } + + @Override + public Integer osDiskSizeGB() { + return this.inner().osDiskSizeGB(); + } + + @Override + public OSType osType() { + return this.inner().osType(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.inner().scaleSetEvictionPolicy(); + } + + @Override + public ScaleSetPriority scaleSetPriority() { + return this.inner().scaleSetPriority(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ContainerServiceVMSizeTypes vmSize() { + return this.inner().vmSize(); + } + + @Override + public String vnetSubnetID() { + return this.inner().vnetSubnetID(); + } + + @Override + public AgentPoolImpl withExistingManagedCluster(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + @Override + public AgentPoolImpl withAgentPoolType(AgentPoolType agentPoolType) { + this.inner().withAgentPoolType(agentPoolType); + return this; + } + + @Override + public AgentPoolImpl withAvailabilityZones(List availabilityZones) { + this.inner().withAvailabilityZones(availabilityZones); + return this; + } + + @Override + public AgentPoolImpl withCount(Integer count) { + this.inner().withCount(count); + return this; + } + + @Override + public AgentPoolImpl withEnableAutoScaling(Boolean enableAutoScaling) { + this.inner().withEnableAutoScaling(enableAutoScaling); + return this; + } + + @Override + public AgentPoolImpl withEnableNodePublicIP(Boolean enableNodePublicIP) { + this.inner().withEnableNodePublicIP(enableNodePublicIP); + return this; + } + + @Override + public AgentPoolImpl withMaxCount(Integer maxCount) { + this.inner().withMaxCount(maxCount); + return this; + } + + @Override + public AgentPoolImpl withMaxPods(Integer maxPods) { + this.inner().withMaxPods(maxPods); + return this; + } + + @Override + public AgentPoolImpl withMinCount(Integer minCount) { + this.inner().withMinCount(minCount); + return this; + } + + @Override + public AgentPoolImpl withNodeTaints(List nodeTaints) { + this.inner().withNodeTaints(nodeTaints); + return this; + } + + @Override + public AgentPoolImpl withOrchestratorVersion(String orchestratorVersion) { + this.inner().withOrchestratorVersion(orchestratorVersion); + return this; + } + + @Override + public AgentPoolImpl withOsDiskSizeGB(Integer osDiskSizeGB) { + this.inner().withOsDiskSizeGB(osDiskSizeGB); + return this; + } + + @Override + public AgentPoolImpl withOsType(OSType osType) { + this.inner().withOsType(osType); + return this; + } + + @Override + public AgentPoolImpl withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + this.inner().withScaleSetEvictionPolicy(scaleSetEvictionPolicy); + return this; + } + + @Override + public AgentPoolImpl withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + this.inner().withScaleSetPriority(scaleSetPriority); + return this; + } + + @Override + public AgentPoolImpl withVmSize(ContainerServiceVMSizeTypes vmSize) { + this.inner().withVmSize(vmSize); + return this; + } + + @Override + public AgentPoolImpl withVnetSubnetID(String vnetSubnetID) { + this.inner().withVnetSubnetID(vnetSubnetID); + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolInner.java new file mode 100644 index 0000000000000..cf77090bcbb7b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolInner.java @@ -0,0 +1,550 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceVMSizeTypes; +import com.microsoft.azure.management.containerservice.v2019_10_01.OSType; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolType; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.ScaleSetPriority; +import com.microsoft.azure.management.containerservice.v2019_10_01.ScaleSetEvictionPolicy; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Agent Pool. + */ +@JsonFlatten +public class AgentPoolInner extends SubResource { + /** + * Number of agents (VMs) to host docker containers. Allowed values must be + * in the range of 1 to 100 (inclusive). The default value is 1. + */ + @JsonProperty(value = "properties.count") + private Integer count; + + /** + * Size of agent VMs. Possible values include: 'Standard_A1', + * 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', + * 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', + * 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', + * 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', + * 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', + * 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', + * 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', + * 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', + * 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', + * 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', + * 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', + * 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', + * 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', + * 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + * 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + * 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + * 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + * 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + * 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + * 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + * 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + * 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + * 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + * 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', + * 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', + * 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', + * 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', + * 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', + * 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', + * 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', + * 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', + * 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', + * 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', + * 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', + * 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', + * 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', + * 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', + * 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', + * 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', + * 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', + * 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', + * 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', + * 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', + * 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', + * 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + * 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + * 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + * 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', + * 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', + * 'Standard_NV6'. + */ + @JsonProperty(value = "properties.vmSize") + private ContainerServiceVMSizeTypes 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; + + /** + * VNet SubnetID specifies the VNet's subnet identifier. + */ + @JsonProperty(value = "properties.vnetSubnetID") + private String vnetSubnetID; + + /** + * 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. Possible values include: 'Linux', 'Windows'. + */ + @JsonProperty(value = "properties.osType") + private OSType osType; + + /** + * 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. Possible values + * include: 'VirtualMachineScaleSets', 'AvailabilitySet'. + */ + @JsonProperty(value = "properties.type") + private AgentPoolType agentPoolType; + + /** + * Version of orchestrator specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.orchestratorVersion") + private String orchestratorVersion; + + /** + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * (PREVIEW) 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; + + /** + * ScaleSetPriority to be used to specify virtual machine scale set + * priority. Default to regular. Possible values include: 'Low', 'Regular'. + */ + @JsonProperty(value = "properties.scaleSetPriority") + private ScaleSetPriority scaleSetPriority; + + /** + * ScaleSetEvictionPolicy to be used to specify eviction policy for low + * priority virtual machine scale set. Default to Delete. Possible values + * include: 'Delete', 'Deallocate'. + */ + @JsonProperty(value = "properties.scaleSetEvictionPolicy") + private ScaleSetEvictionPolicy scaleSetEvictionPolicy; + + /** + * Taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule. + */ + @JsonProperty(value = "properties.nodeTaints") + private List nodeTaints; + + /** + * 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 number of agents (VMs) to host docker containers. 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 number of agents (VMs) to host docker containers. 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 AgentPoolInner object itself. + */ + public AgentPoolInner withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'. + * + * @return the vmSize value + */ + public ContainerServiceVMSizeTypes vmSize() { + return this.vmSize; + } + + /** + * Set size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6'. + * + * @param vmSize the vmSize value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVmSize(ContainerServiceVMSizeTypes vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get 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 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 vNet SubnetID specifies the VNet's subnet identifier. + * + * @return the vnetSubnetID value + */ + public String vnetSubnetID() { + return this.vnetSubnetID; + } + + /** + * Set vNet SubnetID specifies the VNet's subnet identifier. + * + * @param vnetSubnetID the vnetSubnetID value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVnetSubnetID(String vnetSubnetID) { + this.vnetSubnetID = vnetSubnetID; + return this; + } + + /** + * Get maximum number of pods that can run on a node. + * + * @return the maxPods value + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set 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 osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @return the osType value + */ + public OSType osType() { + return this.osType; + } + + /** + * Set osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @param osType the osType value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get maximum number of nodes for auto-scaling. + * + * @return the maxCount value + */ + public Integer maxCount() { + return this.maxCount; + } + + /** + * Set 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 minimum number of nodes for auto-scaling. + * + * @return the minCount value + */ + public Integer minCount() { + return this.minCount; + } + + /** + * Set 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 whether to enable auto-scaler. + * + * @return the enableAutoScaling value + */ + public Boolean enableAutoScaling() { + return this.enableAutoScaling; + } + + /** + * Set 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 agentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'. + * + * @return the agentPoolType value + */ + public AgentPoolType agentPoolType() { + return this.agentPoolType; + } + + /** + * Set agentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'. + * + * @param agentPoolType the agentPoolType value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withAgentPoolType(AgentPoolType agentPoolType) { + this.agentPoolType = agentPoolType; + return this; + } + + /** + * Get version of orchestrator specified when creating the managed cluster. + * + * @return the orchestratorVersion value + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set 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 current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get (PREVIEW) Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * + * @return the availabilityZones value + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set (PREVIEW) 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 enable public IP for nodes. + * + * @return the enableNodePublicIP value + */ + public Boolean enableNodePublicIP() { + return this.enableNodePublicIP; + } + + /** + * Set 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 scaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular'. + * + * @return the scaleSetPriority value + */ + public ScaleSetPriority scaleSetPriority() { + return this.scaleSetPriority; + } + + /** + * Set scaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular'. + * + * @param scaleSetPriority the scaleSetPriority value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + this.scaleSetPriority = scaleSetPriority; + return this; + } + + /** + * Get scaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. + * + * @return the scaleSetEvictionPolicy value + */ + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.scaleSetEvictionPolicy; + } + + /** + * Set scaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. + * + * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + this.scaleSetEvictionPolicy = scaleSetEvictionPolicy; + return this; + } + + /** + * Get 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 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 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 resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolUpgradeProfileImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolUpgradeProfileImpl.java new file mode 100644 index 0000000000000..5cfc0274b0c4e --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolUpgradeProfileImpl.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolUpgradeProfile; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.OSType; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolUpgradeProfilePropertiesUpgradesItem; + +class AgentPoolUpgradeProfileImpl extends WrapperImpl implements AgentPoolUpgradeProfile { + private final ContainerServiceManager manager; + AgentPoolUpgradeProfileImpl(AgentPoolUpgradeProfileInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kubernetesVersion() { + return this.inner().kubernetesVersion(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public OSType osType() { + return this.inner().osType(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public List upgrades() { + return this.inner().upgrades(); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolUpgradeProfileInner.java new file mode 100644 index 0000000000000..7b4ba99b73f4b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolUpgradeProfileInner.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.OSType; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The list of available upgrades for an agent pool. + */ +@JsonFlatten +public class AgentPoolUpgradeProfileInner { + /** + * 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. Possible values include: 'Linux', 'Windows'. + */ + @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; + + /** + * Get id of the agent pool upgrade profile. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get name of the agent pool upgrade profile. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get type of the agent pool upgrade profile. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get kubernetes version (major, minor, patch). + * + * @return the kubernetesVersion value + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set 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 osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @return the osType value + */ + public OSType osType() { + return this.osType; + } + + /** + * Set osType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'. + * + * @param osType the osType value to set + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get list of orchestrator types and versions available for upgrade. + * + * @return the upgrades value + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolsImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolsImpl.java new file mode 100644 index 0000000000000..e617f7772eb1e --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolsImpl.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPool; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolUpgradeProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPoolAvailableVersions; + +class AgentPoolsImpl extends WrapperImpl implements AgentPools { + private final ContainerServiceManager manager; + + AgentPoolsImpl(ContainerServiceManager manager) { + super(manager.inner().agentPools()); + this.manager = manager; + } + + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public AgentPoolImpl define(String name) { + return wrapModel(name); + } + + private AgentPoolImpl wrapModel(AgentPoolInner inner) { + return new AgentPoolImpl(inner, manager()); + } + + private AgentPoolImpl wrapModel(String name) { + return new AgentPoolImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String resourceName) { + AgentPoolsInner client = this.inner(); + return client.listAsync(resourceGroupName, resourceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AgentPool call(AgentPoolInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolsInner client = this.inner(); + return client.getAsync(resourceGroupName, resourceName, agentPoolName) + .flatMap(new Func1>() { + @Override + public Observable call(AgentPoolInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AgentPool)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, resourceName, agentPoolName).toCompletable(); + } + + @Override + public Observable getUpgradeProfileAsync(String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolsInner client = this.inner(); + return client.getUpgradeProfileAsync(resourceGroupName, resourceName, agentPoolName) + .map(new Func1() { + @Override + public AgentPoolUpgradeProfile call(AgentPoolUpgradeProfileInner inner) { + return new AgentPoolUpgradeProfileImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName) { + AgentPoolsInner client = this.inner(); + return client.getAvailableAgentPoolVersionsAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public AgentPoolAvailableVersions call(AgentPoolAvailableVersionsInner inner) { + return new AgentPoolAvailableVersionsImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolsInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolsInner.java new file mode 100644 index 0000000000000..6db2659d400ac --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/AgentPoolsInner.java @@ -0,0 +1,984 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AgentPools. + */ +public class AgentPoolsInner { + /** The Retrofit service to perform REST calls. */ + private AgentPoolsService service; + /** The service client containing this operation class. */ + private ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of AgentPoolsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AgentPoolsInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { + this.service = retrofit.create(AgentPoolsService.class); + this.client = client; + } + + /** + * The interface defining all the services for AgentPools to be + * used by Retrofit to perform actually REST calls. + */ + interface AgentPoolsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Body AgentPoolInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Body AgentPoolInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools getUpgradeProfile" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default") + Observable> getUpgradeProfile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("agentPoolName") String agentPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools getAvailableAgentPoolVersions" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions") + Observable> getAvailableAgentPoolVersions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AgentPoolInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String resourceName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, resourceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String resourceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, resourceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * 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 + * @return the observable to the PagedList<AgentPoolInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String resourceName) { + return listWithServiceResponseAsync(resourceGroupName, resourceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * 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 + * @return the observable to the PagedList<AgentPoolInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String resourceName) { + return listSinglePageAsync(resourceGroupName, resourceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AgentPoolInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.list(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the agent pool. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AgentPoolInner object if successful. + */ + public AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName) { + return getWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().single().body(); + } + + /** + * Gets the agent pool. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback); + } + + /** + * Gets the agent pool. + * 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 + * @return the observable to the AgentPoolInner object + */ + public Observable getAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return getWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1, AgentPoolInner>() { + @Override + public AgentPoolInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the agent pool. + * 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 + * @return the observable to the AgentPoolInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (agentPoolName == null) { + throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates an agent pool. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AgentPoolInner object if successful. + */ + public AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an agent pool. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters), serviceCallback); + } + + /** + * Creates or updates an agent pool. + * 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 + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters).map(new Func1, AgentPoolInner>() { + @Override + public AgentPoolInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an agent pool. + * 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 + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (agentPoolName == null) { + throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-10-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an agent pool. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AgentPoolInner object if successful. + */ + public AgentPoolInner beginCreateOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an agent pool. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters), serviceCallback); + } + + /** + * Creates or updates an agent pool. + * 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 + * @return the observable to the AgentPoolInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters).map(new Func1, AgentPoolInner>() { + @Override + public AgentPoolInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an agent pool. + * 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 + * @return the observable to the AgentPoolInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName, AgentPoolInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (agentPoolName == null) { + throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-10-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes an agent pool. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String resourceName, String agentPoolName) { + deleteWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().last().body(); + } + + /** + * Deletes an agent pool. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback); + } + + /** + * Deletes an agent pool. + * 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 + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return deleteWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an agent pool. + * 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 + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (agentPoolName == null) { + throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes an agent pool. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String resourceName, String agentPoolName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().single().body(); + } + + /** + * Deletes an agent pool. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback); + } + + /** + * Deletes an agent pool. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an agent pool. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (agentPoolName == null) { + throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets upgrade profile for an agent pool. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AgentPoolUpgradeProfileInner object if successful. + */ + public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName) { + return getUpgradeProfileWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().single().body(); + } + + /** + * Gets upgrade profile for an agent pool. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getUpgradeProfileAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getUpgradeProfileWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback); + } + + /** + * Gets upgrade profile for an agent pool. + * 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 + * @return the observable to the AgentPoolUpgradeProfileInner object + */ + public Observable getUpgradeProfileAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return getUpgradeProfileWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1, AgentPoolUpgradeProfileInner>() { + @Override + public AgentPoolUpgradeProfileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets upgrade profile for an agent pool. + * 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 + * @return the observable to the AgentPoolUpgradeProfileInner object + */ + public Observable> getUpgradeProfileWithServiceResponseAsync(String resourceGroupName, String resourceName, String agentPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (agentPoolName == null) { + throw new IllegalArgumentException("Parameter agentPoolName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.getUpgradeProfile(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getUpgradeProfileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getUpgradeProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AgentPoolAvailableVersionsInner object if successful. + */ + public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName) { + return getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * 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 + * @return the observable to the AgentPoolAvailableVersionsInner object + */ + public Observable getAvailableAgentPoolVersionsAsync(String resourceGroupName, String resourceName) { + return getAvailableAgentPoolVersionsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, AgentPoolAvailableVersionsInner>() { + @Override + public AgentPoolAvailableVersionsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of supported versions for the specified agent pool. + * 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 + * @return the observable to the AgentPoolAvailableVersionsInner object + */ + public Observable> getAvailableAgentPoolVersionsWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.getAvailableAgentPoolVersions(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAvailableAgentPoolVersionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAvailableAgentPoolVersionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AgentPoolInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AgentPoolInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AgentPoolInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AgentPoolInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceImpl.java new file mode 100644 index 0000000000000..fc76720acbafd --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceImpl.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerService; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceOrchestratorProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceCustomProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceServicePrincipalProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceMasterProfile; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceAgentPoolProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceWindowsProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceLinuxProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceDiagnosticsProfile; + +class ContainerServiceImpl extends GroupableResourceCoreImpl implements ContainerService, ContainerService.Definition, ContainerService.Update { + ContainerServiceImpl(String name, ContainerServiceInner inner, ContainerServiceManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ContainerServicesInner client = this.manager().inner().containerServices(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ContainerServicesInner client = this.manager().inner().containerServices(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ContainerServicesInner client = this.manager().inner().containerServices(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List agentPoolProfiles() { + return this.inner().agentPoolProfiles(); + } + + @Override + public ContainerServiceCustomProfile customProfile() { + return this.inner().customProfile(); + } + + @Override + public ContainerServiceDiagnosticsProfile diagnosticsProfile() { + return this.inner().diagnosticsProfile(); + } + + @Override + public ContainerServiceLinuxProfile linuxProfile() { + return this.inner().linuxProfile(); + } + + @Override + public ContainerServiceMasterProfile masterProfile() { + return this.inner().masterProfile(); + } + + @Override + public ContainerServiceOrchestratorProfile orchestratorProfile() { + return this.inner().orchestratorProfile(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ContainerServiceServicePrincipalProfile servicePrincipalProfile() { + return this.inner().servicePrincipalProfile(); + } + + @Override + public ContainerServiceWindowsProfile windowsProfile() { + return this.inner().windowsProfile(); + } + + @Override + public ContainerServiceImpl withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.inner().withLinuxProfile(linuxProfile); + return this; + } + + @Override + public ContainerServiceImpl withMasterProfile(ContainerServiceMasterProfile masterProfile) { + this.inner().withMasterProfile(masterProfile); + return this; + } + + @Override + public ContainerServiceImpl withOrchestratorProfile(ContainerServiceOrchestratorProfile orchestratorProfile) { + this.inner().withOrchestratorProfile(orchestratorProfile); + return this; + } + + @Override + public ContainerServiceImpl withAgentPoolProfiles(List agentPoolProfiles) { + this.inner().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + @Override + public ContainerServiceImpl withCustomProfile(ContainerServiceCustomProfile customProfile) { + this.inner().withCustomProfile(customProfile); + return this; + } + + @Override + public ContainerServiceImpl withDiagnosticsProfile(ContainerServiceDiagnosticsProfile diagnosticsProfile) { + this.inner().withDiagnosticsProfile(diagnosticsProfile); + return this; + } + + @Override + public ContainerServiceImpl withServicePrincipalProfile(ContainerServiceServicePrincipalProfile servicePrincipalProfile) { + this.inner().withServicePrincipalProfile(servicePrincipalProfile); + return this; + } + + @Override + public ContainerServiceImpl withWindowsProfile(ContainerServiceWindowsProfile windowsProfile) { + this.inner().withWindowsProfile(windowsProfile); + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceInner.java new file mode 100644 index 0000000000000..d1099af14f06b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceInner.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceOrchestratorProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceCustomProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceServicePrincipalProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceMasterProfile; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceAgentPoolProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceWindowsProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceLinuxProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceDiagnosticsProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Container service. + */ +@JsonFlatten +public class ContainerServiceInner extends Resource { + /** + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Profile for the container service orchestrator. + */ + @JsonProperty(value = "properties.orchestratorProfile", required = true) + private ContainerServiceOrchestratorProfile orchestratorProfile; + + /** + * Properties to configure a custom container service cluster. + */ + @JsonProperty(value = "properties.customProfile") + private ContainerServiceCustomProfile customProfile; + + /** + * Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef + * need to be specified. + */ + @JsonProperty(value = "properties.servicePrincipalProfile") + private ContainerServiceServicePrincipalProfile servicePrincipalProfile; + + /** + * Profile for the container service master. + */ + @JsonProperty(value = "properties.masterProfile", required = true) + private ContainerServiceMasterProfile masterProfile; + + /** + * Properties of the agent pool. + */ + @JsonProperty(value = "properties.agentPoolProfiles") + private List agentPoolProfiles; + + /** + * Profile for Windows VMs in the container service cluster. + */ + @JsonProperty(value = "properties.windowsProfile") + private ContainerServiceWindowsProfile windowsProfile; + + /** + * Profile for Linux VMs in the container service cluster. + */ + @JsonProperty(value = "properties.linuxProfile", required = true) + private ContainerServiceLinuxProfile linuxProfile; + + /** + * Profile for diagnostics in the container service cluster. + */ + @JsonProperty(value = "properties.diagnosticsProfile") + private ContainerServiceDiagnosticsProfile diagnosticsProfile; + + /** + * Get the current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get profile for the container service orchestrator. + * + * @return the orchestratorProfile value + */ + public ContainerServiceOrchestratorProfile orchestratorProfile() { + return this.orchestratorProfile; + } + + /** + * Set profile for the container service orchestrator. + * + * @param orchestratorProfile the orchestratorProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withOrchestratorProfile(ContainerServiceOrchestratorProfile orchestratorProfile) { + this.orchestratorProfile = orchestratorProfile; + return this; + } + + /** + * Get properties to configure a custom container service cluster. + * + * @return the customProfile value + */ + public ContainerServiceCustomProfile customProfile() { + return this.customProfile; + } + + /** + * Set properties to configure a custom container service cluster. + * + * @param customProfile the customProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withCustomProfile(ContainerServiceCustomProfile customProfile) { + this.customProfile = customProfile; + return this; + } + + /** + * Get information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified. + * + * @return the servicePrincipalProfile value + */ + public ContainerServiceServicePrincipalProfile servicePrincipalProfile() { + return this.servicePrincipalProfile; + } + + /** + * Set information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified. + * + * @param servicePrincipalProfile the servicePrincipalProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withServicePrincipalProfile(ContainerServiceServicePrincipalProfile servicePrincipalProfile) { + this.servicePrincipalProfile = servicePrincipalProfile; + return this; + } + + /** + * Get profile for the container service master. + * + * @return the masterProfile value + */ + public ContainerServiceMasterProfile masterProfile() { + return this.masterProfile; + } + + /** + * Set profile for the container service master. + * + * @param masterProfile the masterProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withMasterProfile(ContainerServiceMasterProfile masterProfile) { + this.masterProfile = masterProfile; + return this; + } + + /** + * Get properties of the agent pool. + * + * @return the agentPoolProfiles value + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set properties of the agent pool. + * + * @param agentPoolProfiles the agentPoolProfiles value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get profile for Windows VMs in the container service cluster. + * + * @return the windowsProfile value + */ + public ContainerServiceWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set profile for Windows VMs in the container service cluster. + * + * @param windowsProfile the windowsProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withWindowsProfile(ContainerServiceWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Get profile for Linux VMs in the container service cluster. + * + * @return the linuxProfile value + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set profile for Linux VMs in the container service cluster. + * + * @param linuxProfile the linuxProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get profile for diagnostics in the container service cluster. + * + * @return the diagnosticsProfile value + */ + public ContainerServiceDiagnosticsProfile diagnosticsProfile() { + return this.diagnosticsProfile; + } + + /** + * Set profile for diagnostics in the container service cluster. + * + * @param diagnosticsProfile the diagnosticsProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withDiagnosticsProfile(ContainerServiceDiagnosticsProfile diagnosticsProfile) { + this.diagnosticsProfile = diagnosticsProfile; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceManagementClientImpl.java new file mode 100644 index 0000000000000..964e1a8cbe9bd --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceManagementClientImpl.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the ContainerServiceManagementClientImpl class. + */ +public class ContainerServiceManagementClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private 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 subscriptionId() { + return this.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 service client itself + */ + public ContainerServiceManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public ContainerServiceManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public ContainerServiceManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public ContainerServiceManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The OpenShiftManagedClustersInner object to access its operations. + */ + private OpenShiftManagedClustersInner openShiftManagedClusters; + + /** + * Gets the OpenShiftManagedClustersInner object to access its operations. + * @return the OpenShiftManagedClustersInner object. + */ + public OpenShiftManagedClustersInner openShiftManagedClusters() { + return this.openShiftManagedClusters; + } + + /** + * The ContainerServicesInner object to access its operations. + */ + private ContainerServicesInner containerServices; + + /** + * Gets the ContainerServicesInner object to access its operations. + * @return the ContainerServicesInner object. + */ + public ContainerServicesInner containerServices() { + return this.containerServices; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The ManagedClustersInner object to access its operations. + */ + private ManagedClustersInner managedClusters; + + /** + * Gets the ManagedClustersInner object to access its operations. + * @return the ManagedClustersInner object. + */ + public ManagedClustersInner managedClusters() { + return this.managedClusters; + } + + /** + * The AgentPoolsInner object to access its operations. + */ + private AgentPoolsInner agentPools; + + /** + * Gets the AgentPoolsInner object to access its operations. + * @return the AgentPoolsInner object. + */ + public AgentPoolsInner agentPools() { + return this.agentPools; + } + + /** + * Initializes an instance of ContainerServiceManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public ContainerServiceManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of ContainerServiceManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public ContainerServiceManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of ContainerServiceManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public ContainerServiceManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.openShiftManagedClusters = new OpenShiftManagedClustersInner(restClient().retrofit(), this); + this.containerServices = new ContainerServicesInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.managedClusters = new ManagedClustersInner(restClient().retrofit(), this); + this.agentPools = new AgentPoolsInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "ContainerServiceManagementClient", "2019-10-01"); + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceManager.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceManager.java new file mode 100644 index 0000000000000..be1b85f95ec0d --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServiceManager.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices; +import com.microsoft.azure.management.containerservice.v2019_10_01.Operations; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters; +import com.microsoft.azure.management.containerservice.v2019_10_01.AgentPools; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure ContainerService resource management. + */ +public final class ContainerServiceManager extends ManagerCore { + private OpenShiftManagedClusters openShiftManagedClusters; + private ContainerServices containerServices; + private Operations operations; + private ManagedClusters managedClusters; + private AgentPools agentPools; + /** + * Get a Configurable instance that can be used to create ContainerServiceManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new ContainerServiceManager.ConfigurableImpl(); + } + /** + * Creates an instance of ContainerServiceManager that exposes ContainerService resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the ContainerServiceManager + */ + public static ContainerServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new ContainerServiceManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of ContainerServiceManager that exposes ContainerService resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the ContainerServiceManager + */ + public static ContainerServiceManager authenticate(RestClient restClient, String subscriptionId) { + return new ContainerServiceManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of ContainerServiceManager that exposes ContainerService management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing ContainerService management API entry points that work across subscriptions + */ + ContainerServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage OpenShiftManagedClusters. + */ + public OpenShiftManagedClusters openShiftManagedClusters() { + if (this.openShiftManagedClusters == null) { + this.openShiftManagedClusters = new OpenShiftManagedClustersImpl(this); + } + return this.openShiftManagedClusters; + } + + /** + * @return Entry point to manage ContainerServices. + */ + public ContainerServices containerServices() { + if (this.containerServices == null) { + this.containerServices = new ContainerServicesImpl(this); + } + return this.containerServices; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage ManagedClusters. + */ + public ManagedClusters managedClusters() { + if (this.managedClusters == null) { + this.managedClusters = new ManagedClustersImpl(this); + } + return this.managedClusters; + } + + /** + * @return Entry point to manage AgentPools. + */ + public AgentPools agentPools() { + if (this.agentPools == null) { + this.agentPools = new AgentPoolsImpl(this); + } + return this.agentPools; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public ContainerServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return ContainerServiceManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private ContainerServiceManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new ContainerServiceManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServicesImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServicesImpl.java new file mode 100644 index 0000000000000..1683454f28717 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServicesImpl.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerService; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.containerservice.v2019_10_01.OrchestratorVersionProfileListResult; + +class ContainerServicesImpl extends GroupableResourcesCoreImpl implements ContainerServices { + protected ContainerServicesImpl(ContainerServiceManager manager) { + super(manager.inner().containerServices(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ContainerServicesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ContainerServicesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + ContainerServicesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ContainerServicesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ContainerService call(ContainerServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ContainerServicesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ContainerServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ContainerService call(ContainerServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ContainerServiceImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ContainerServiceImpl wrapModel(ContainerServiceInner inner) { + return new ContainerServiceImpl(inner.name(), inner, manager()); + } + + @Override + protected ContainerServiceImpl wrapModel(String name) { + return new ContainerServiceImpl(name, new ContainerServiceInner(), this.manager()); + } + + @Override + public Observable listOrchestratorsAsync(String location) { + ContainerServicesInner client = this.inner(); + return client.listOrchestratorsAsync(location) + .map(new Func1() { + @Override + public OrchestratorVersionProfileListResult call(OrchestratorVersionProfileListResultInner inner) { + return new OrchestratorVersionProfileListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServicesInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServicesInner.java new file mode 100644 index 0000000000000..334918dd6454b --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ContainerServicesInner.java @@ -0,0 +1,1152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ContainerServices. + */ +public class ContainerServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ContainerServicesService service; + /** The service client containing this operation class. */ + private ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ContainerServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ContainerServicesInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { + this.service = retrofit.create(ContainerServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServices to be + * used by Retrofit to perform actually REST calls. + */ + interface ContainerServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Body ContainerServiceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Body ContainerServiceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices listOrchestrators" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators") + Observable> listOrchestrators(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Query("resource-type") String resourceType, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServices listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContainerServiceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContainerServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-07-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContainerServiceInner object if successful. + */ + public ContainerServiceInner createOrUpdate(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters), serviceCallback); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).map(new Func1, ContainerServiceInner>() { + @Override + public ContainerServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-07-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, containerServiceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContainerServiceInner object if successful. + */ + public ContainerServiceInner beginCreateOrUpdate(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters), serviceCallback); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerServiceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).map(new Func1, ContainerServiceInner>() { + @Override + public ContainerServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerServiceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-07-01"; + return service.beginCreateOrUpdate(resourceGroupName, containerServiceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the properties of the specified container service. + * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContainerServiceInner object if successful. + */ + public ContainerServiceInner getByResourceGroup(String resourceGroupName, String containerServiceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().single().body(); + } + + /** + * Gets the properties of the specified container service. + * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String containerServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); + } + + /** + * Gets the properties of the specified container service. + * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerServiceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String containerServiceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1, ContainerServiceInner>() { + @Override + public ContainerServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the properties of the specified container service. + * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerServiceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-07-01"; + return service.getByResourceGroup(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String containerServiceName) { + deleteWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().last().body(); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String containerServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String containerServiceName) { + return deleteWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-07-01"; + Observable> observable = service.delete(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String containerServiceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().single().body(); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String containerServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String containerServiceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-07-01"; + return service.beginDelete(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContainerServiceInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContainerServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-07-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OrchestratorVersionProfileListResultInner object if successful. + */ + public OrchestratorVersionProfileListResultInner listOrchestrators(String location) { + return listOrchestratorsWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listOrchestratorsAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listOrchestratorsWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OrchestratorVersionProfileListResultInner object + */ + public Observable listOrchestratorsAsync(String location) { + return listOrchestratorsWithServiceResponseAsync(location).map(new Func1, OrchestratorVersionProfileListResultInner>() { + @Override + public OrchestratorVersionProfileListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OrchestratorVersionProfileListResultInner object + */ + public Observable> listOrchestratorsWithServiceResponseAsync(String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + final String apiVersion = "2019-08-01"; + final String resourceType = null; + return service.listOrchestrators(this.client.subscriptionId(), location, apiVersion, resourceType, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listOrchestratorsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OrchestratorVersionProfileListResultInner object if successful. + */ + public OrchestratorVersionProfileListResultInner listOrchestrators(String location, String resourceType) { + return listOrchestratorsWithServiceResponseAsync(location, resourceType).toBlocking().single().body(); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listOrchestratorsAsync(String location, String resourceType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listOrchestratorsWithServiceResponseAsync(location, resourceType), serviceCallback); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OrchestratorVersionProfileListResultInner object + */ + public Observable listOrchestratorsAsync(String location, String resourceType) { + return listOrchestratorsWithServiceResponseAsync(location, resourceType).map(new Func1, OrchestratorVersionProfileListResultInner>() { + @Override + public OrchestratorVersionProfileListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OrchestratorVersionProfileListResultInner object + */ + public Observable> listOrchestratorsWithServiceResponseAsync(String location, String resourceType) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + final String apiVersion = "2019-08-01"; + return service.listOrchestrators(this.client.subscriptionId(), location, apiVersion, resourceType, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listOrchestratorsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listOrchestratorsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContainerServiceInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContainerServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContainerServiceInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContainerServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/CredentialResultsImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/CredentialResultsImpl.java new file mode 100644 index 0000000000000..8cfcddd23fd8a --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/CredentialResultsImpl.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.CredentialResults; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.CredentialResult; + +class CredentialResultsImpl extends WrapperImpl implements CredentialResults { + private final ContainerServiceManager manager; + CredentialResultsImpl(CredentialResultsInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public List kubeconfigs() { + return this.inner().kubeconfigs(); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/CredentialResultsInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/CredentialResultsInner.java new file mode 100644 index 0000000000000..4d614ce361bf8 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/CredentialResultsInner.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.CredentialResult; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of credential result response. + */ +public class CredentialResultsInner { + /** + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "kubeconfigs", access = JsonProperty.Access.WRITE_ONLY) + private List kubeconfigs; + + /** + * Get base64-encoded Kubernetes configuration file. + * + * @return the kubeconfigs value + */ + public List kubeconfigs() { + return this.kubeconfigs; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/IdParsingUtils.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..45533ba184903 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterAccessProfileImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterAccessProfileImpl.java new file mode 100644 index 0000000000000..e3a920b4b0bd3 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterAccessProfileImpl.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAccessProfile; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.Map; + +class ManagedClusterAccessProfileImpl extends WrapperImpl implements ManagedClusterAccessProfile { + private final ContainerServiceManager manager; + ManagedClusterAccessProfileImpl(ManagedClusterAccessProfileInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public byte[] kubeConfig() { + return this.inner().kubeConfig(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterAccessProfileInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterAccessProfileInner.java new file mode 100644 index 0000000000000..62d4fa955cb63 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterAccessProfileInner.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Managed cluster Access Profile. + */ +@JsonFlatten +public class ManagedClusterAccessProfileInner extends Resource { + /** + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "properties.kubeConfig") + private byte[] kubeConfig; + + /** + * Get base64-encoded Kubernetes configuration file. + * + * @return the kubeConfig value + */ + public byte[] kubeConfig() { + return this.kubeConfig; + } + + /** + * Set base64-encoded Kubernetes configuration file. + * + * @param kubeConfig the kubeConfig value to set + * @return the ManagedClusterAccessProfileInner object itself. + */ + public ManagedClusterAccessProfileInner withKubeConfig(byte[] kubeConfig) { + this.kubeConfig = kubeConfig; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterImpl.java new file mode 100644 index 0000000000000..9b934ad497ff2 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterImpl.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedCluster; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAgentPoolProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceLinuxProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterWindowsProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterServicePrincipalProfile; +import java.util.Map; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAddonProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceNetworkProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAADProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAPIServerAccessProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterIdentity; + +class ManagedClusterImpl extends GroupableResourceCoreImpl implements ManagedCluster, ManagedCluster.Definition, ManagedCluster.Update { + ManagedClusterImpl(String name, ManagedClusterInner inner, ContainerServiceManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ManagedClustersInner client = this.manager().inner().managedClusters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ManagedClustersInner client = this.manager().inner().managedClusters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ManagedClustersInner client = this.manager().inner().managedClusters(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public ManagedClusterAADProfile aadProfile() { + return this.inner().aadProfile(); + } + + @Override + public Map addonProfiles() { + return this.inner().addonProfiles(); + } + + @Override + public List agentPoolProfiles() { + return this.inner().agentPoolProfiles(); + } + + @Override + public ManagedClusterAPIServerAccessProfile apiServerAccessProfile() { + return this.inner().apiServerAccessProfile(); + } + + @Override + public String dnsPrefix() { + return this.inner().dnsPrefix(); + } + + @Override + public Boolean enablePodSecurityPolicy() { + return this.inner().enablePodSecurityPolicy(); + } + + @Override + public Boolean enableRBAC() { + return this.inner().enableRBAC(); + } + + @Override + public String fqdn() { + return this.inner().fqdn(); + } + + @Override + public ManagedClusterIdentity identity() { + return this.inner().identity(); + } + + @Override + public String kubernetesVersion() { + return this.inner().kubernetesVersion(); + } + + @Override + public ContainerServiceLinuxProfile linuxProfile() { + return this.inner().linuxProfile(); + } + + @Override + public Integer maxAgentPools() { + return this.inner().maxAgentPools(); + } + + @Override + public ContainerServiceNetworkProfile networkProfile() { + return this.inner().networkProfile(); + } + + @Override + public String nodeResourceGroup() { + return this.inner().nodeResourceGroup(); + } + + @Override + public String privateFQDN() { + return this.inner().privateFQDN(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { + return this.inner().servicePrincipalProfile(); + } + + @Override + public ManagedClusterWindowsProfile windowsProfile() { + return this.inner().windowsProfile(); + } + + @Override + public ManagedClusterImpl withAadProfile(ManagedClusterAADProfile aadProfile) { + this.inner().withAadProfile(aadProfile); + return this; + } + + @Override + public ManagedClusterImpl withAddonProfiles(Map addonProfiles) { + this.inner().withAddonProfiles(addonProfiles); + return this; + } + + @Override + public ManagedClusterImpl withAgentPoolProfiles(List agentPoolProfiles) { + this.inner().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + @Override + public ManagedClusterImpl withApiServerAccessProfile(ManagedClusterAPIServerAccessProfile apiServerAccessProfile) { + this.inner().withApiServerAccessProfile(apiServerAccessProfile); + return this; + } + + @Override + public ManagedClusterImpl withDnsPrefix(String dnsPrefix) { + this.inner().withDnsPrefix(dnsPrefix); + return this; + } + + @Override + public ManagedClusterImpl withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + this.inner().withEnablePodSecurityPolicy(enablePodSecurityPolicy); + return this; + } + + @Override + public ManagedClusterImpl withEnableRBAC(Boolean enableRBAC) { + this.inner().withEnableRBAC(enableRBAC); + return this; + } + + @Override + public ManagedClusterImpl withIdentity(ManagedClusterIdentity identity) { + this.inner().withIdentity(identity); + return this; + } + + @Override + public ManagedClusterImpl withKubernetesVersion(String kubernetesVersion) { + this.inner().withKubernetesVersion(kubernetesVersion); + return this; + } + + @Override + public ManagedClusterImpl withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.inner().withLinuxProfile(linuxProfile); + return this; + } + + @Override + public ManagedClusterImpl withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + this.inner().withNetworkProfile(networkProfile); + return this; + } + + @Override + public ManagedClusterImpl withNodeResourceGroup(String nodeResourceGroup) { + this.inner().withNodeResourceGroup(nodeResourceGroup); + return this; + } + + @Override + public ManagedClusterImpl withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + this.inner().withServicePrincipalProfile(servicePrincipalProfile); + return this; + } + + @Override + public ManagedClusterImpl withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { + this.inner().withWindowsProfile(windowsProfile); + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterInner.java new file mode 100644 index 0000000000000..1e3499451e884 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterInner.java @@ -0,0 +1,459 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAgentPoolProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceLinuxProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterWindowsProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterServicePrincipalProfile; +import java.util.Map; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAddonProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ContainerServiceNetworkProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAADProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAPIServerAccessProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Managed cluster. + */ +@JsonFlatten +public class ManagedClusterInner extends Resource { + /** + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * 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 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; + + /** + * 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; + + /** + * 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; + + /** + * Access profile for managed cluster API server. + */ + @JsonProperty(value = "properties.apiServerAccessProfile") + private ManagedClusterAPIServerAccessProfile apiServerAccessProfile; + + /** + * The identity of the managed cluster, if configured. + */ + @JsonProperty(value = "identity") + private ManagedClusterIdentity identity; + + /** + * Get the current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the max number of agent pools for the managed cluster. + * + * @return the maxAgentPools value + */ + public Integer maxAgentPools() { + return this.maxAgentPools; + } + + /** + * Get version of Kubernetes specified when creating the managed cluster. + * + * @return the kubernetesVersion value + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set 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 dNS prefix specified when creating the managed cluster. + * + * @return the dnsPrefix value + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set 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 fQDN for the master pool. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get fQDN of private cluster. + * + * @return the privateFQDN value + */ + public String privateFQDN() { + return this.privateFQDN; + } + + /** + * Get properties of the agent pool. + * + * @return the agentPoolProfiles value + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set 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 profile for Linux VMs in the container service cluster. + * + * @return the linuxProfile value + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set 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 profile for Windows VMs in the container service cluster. + * + * @return the windowsProfile value + */ + public ManagedClusterWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set 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 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 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 profile of managed cluster add-on. + * + * @return the addonProfiles value + */ + public Map addonProfiles() { + return this.addonProfiles; + } + + /** + * Set 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 name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value + */ + public String nodeResourceGroup() { + return this.nodeResourceGroup; + } + + /** + * Set 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 whether to enable Kubernetes Role-Based Access Control. + * + * @return the enableRBAC value + */ + public Boolean enableRBAC() { + return this.enableRBAC; + } + + /** + * Set 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 (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 (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 profile of network configuration. + * + * @return the networkProfile value + */ + public ContainerServiceNetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set 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 profile of Azure Active Directory configuration. + * + * @return the aadProfile value + */ + public ManagedClusterAADProfile aadProfile() { + return this.aadProfile; + } + + /** + * Set 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 access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value + */ + public ManagedClusterAPIServerAccessProfile apiServerAccessProfile() { + return this.apiServerAccessProfile; + } + + /** + * Set 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 identity of the managed cluster, if configured. + * + * @return the identity value + */ + public ManagedClusterIdentity identity() { + return this.identity; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterUpgradeProfileImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterUpgradeProfileImpl.java new file mode 100644 index 0000000000000..46e477be5a18d --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterUpgradeProfileImpl.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterUpgradeProfile; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterPoolUpgradeProfile; + +class ManagedClusterUpgradeProfileImpl extends WrapperImpl implements ManagedClusterUpgradeProfile { + private final ContainerServiceManager manager; + ManagedClusterUpgradeProfileImpl(ManagedClusterUpgradeProfileInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public List agentPoolProfiles() { + return this.inner().agentPoolProfiles(); + } + + @Override + public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { + return this.inner().controlPlaneProfile(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterUpgradeProfileInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterUpgradeProfileInner.java new file mode 100644 index 0000000000000..38596f639ce91 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClusterUpgradeProfileInner.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterPoolUpgradeProfile; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The list of available upgrades for compute pools. + */ +@JsonFlatten +public class ManagedClusterUpgradeProfileInner { + /** + * 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 id of upgrade profile. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get name of upgrade profile. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get type of upgrade profile. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the list of available upgrade versions for the control plane. + * + * @return the controlPlaneProfile value + */ + public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { + return this.controlPlaneProfile; + } + + /** + * Set 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 list of available upgrade versions for agent pools. + * + * @return the agentPoolProfiles value + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set 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; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClustersImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClustersImpl.java new file mode 100644 index 0000000000000..4dfe2817f93e3 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClustersImpl.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedCluster; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.containerservice.v2019_10_01.CredentialResults; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterServicePrincipalProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAADProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterUpgradeProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAccessProfile; + +class ManagedClustersImpl extends GroupableResourcesCoreImpl implements ManagedClusters { + protected ManagedClustersImpl(ContainerServiceManager manager) { + super(manager.inner().managedClusters(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ManagedClustersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ManagedClustersInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + ManagedClustersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ManagedClustersInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ManagedCluster call(ManagedClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ManagedClustersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ManagedClustersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ManagedCluster call(ManagedClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ManagedClusterImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName) { + ManagedClustersInner client = this.inner(); + return client.listClusterAdminCredentialsAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public CredentialResults call(CredentialResultsInner inner) { + return new CredentialResultsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listClusterUserCredentialsAsync(String resourceGroupName, String resourceName) { + ManagedClustersInner client = this.inner(); + return client.listClusterUserCredentialsAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public CredentialResults call(CredentialResultsInner inner) { + return new CredentialResultsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listClusterMonitoringUserCredentialsAsync(String resourceGroupName, String resourceName) { + ManagedClustersInner client = this.inner(); + return client.listClusterMonitoringUserCredentialsAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public CredentialResults call(CredentialResultsInner inner) { + return new CredentialResultsImpl(inner, manager()); + } + }); + } + + @Override + public Completable resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + ManagedClustersInner client = this.inner(); + return client.resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).toCompletable(); + } + + @Override + public Completable resetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { + ManagedClustersInner client = this.inner(); + return client.resetAADProfileAsync(resourceGroupName, resourceName, parameters).toCompletable(); + } + + @Override + public Completable rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + ManagedClustersInner client = this.inner(); + return client.rotateClusterCertificatesAsync(resourceGroupName, resourceName).toCompletable(); + } + + @Override + protected ManagedClusterImpl wrapModel(ManagedClusterInner inner) { + return new ManagedClusterImpl(inner.name(), inner, manager()); + } + + @Override + protected ManagedClusterImpl wrapModel(String name) { + return new ManagedClusterImpl(name, new ManagedClusterInner(), this.manager()); + } + + @Override + public Observable getUpgradeProfileAsync(String resourceGroupName, String resourceName) { + ManagedClustersInner client = this.inner(); + return client.getUpgradeProfileAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public ManagedClusterUpgradeProfile call(ManagedClusterUpgradeProfileInner inner) { + return new ManagedClusterUpgradeProfileImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAccessProfileAsync(String resourceGroupName, String resourceName, String roleName) { + ManagedClustersInner client = this.inner(); + return client.getAccessProfileAsync(resourceGroupName, resourceName, roleName) + .map(new Func1() { + @Override + public ManagedClusterAccessProfile call(ManagedClusterAccessProfileInner inner) { + return new ManagedClusterAccessProfileImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClustersInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClustersInner.java new file mode 100644 index 0000000000000..31583dbe3ea1d --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/ManagedClustersInner.java @@ -0,0 +1,2328 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterAADProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusterServicePrincipalProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ManagedClusters. + */ +public class ManagedClustersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ManagedClustersService service; + /** The service client containing this operation class. */ + private ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ManagedClustersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ManagedClustersInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { + this.service = retrofit.create(ManagedClustersService.class); + this.client = client; + } + + /** + * The interface defining all the services for ManagedClusters to be + * used by Retrofit to perform actually REST calls. + */ + interface ManagedClustersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters getUpgradeProfile" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default") + Observable> getUpgradeProfile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters getAccessProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential") + Observable> getAccessProfile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("roleName") String roleName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters listClusterAdminCredentials" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential") + Observable> listClusterAdminCredentials(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters listClusterUserCredentials" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential") + Observable> listClusterUserCredentials(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters listClusterMonitoringUserCredentials" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential") + Observable> listClusterMonitoringUserCredentials(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body ManagedClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body ManagedClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + Observable> beginUpdateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters resetServicePrincipalProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") + Observable> resetServicePrincipalProfile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body ManagedClusterServicePrincipalProfile parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters beginResetServicePrincipalProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") + Observable> beginResetServicePrincipalProfile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body ManagedClusterServicePrincipalProfile parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters resetAADProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile") + Observable> resetAADProfile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body ManagedClusterAADProfile parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters beginResetAADProfile" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile") + Observable> beginResetAADProfile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body ManagedClusterAADProfile parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters rotateClusterCertificates" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") + Observable> rotateClusterCertificates(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters beginRotateClusterCertificates" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") + Observable> beginRotateClusterCertificates(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.ManagedClusters listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ManagedClusterInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ManagedClusterInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ManagedClusterInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ManagedClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ManagedClusterInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * 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 + * @return the observable to the PagedList<ManagedClusterInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * 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 + * @return the observable to the PagedList<ManagedClusterInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed cluster. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ManagedClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets upgrade profile for a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterUpgradeProfileInner object if successful. + */ + public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { + return getUpgradeProfileWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets upgrade profile for a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getUpgradeProfileAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getUpgradeProfileWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets upgrade profile for a managed cluster. + * 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 + * @return the observable to the ManagedClusterUpgradeProfileInner object + */ + public Observable getUpgradeProfileAsync(String resourceGroupName, String resourceName) { + return getUpgradeProfileWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, ManagedClusterUpgradeProfileInner>() { + @Override + public ManagedClusterUpgradeProfileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets upgrade profile for a managed cluster. + * 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 + * @return the observable to the ManagedClusterUpgradeProfileInner object + */ + public Observable> getUpgradeProfileWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.getUpgradeProfile(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getUpgradeProfileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getUpgradeProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets an access profile of a managed cluster. + * Gets the accessProfile for the specified role name 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 roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterAccessProfileInner object if successful. + */ + public ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, String roleName) { + return getAccessProfileWithServiceResponseAsync(resourceGroupName, resourceName, roleName).toBlocking().single().body(); + } + + /** + * Gets an access profile of a managed cluster. + * Gets the accessProfile for the specified role name 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 roleName The name of the role for managed cluster accessProfile resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAccessProfileAsync(String resourceGroupName, String resourceName, String roleName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAccessProfileWithServiceResponseAsync(resourceGroupName, resourceName, roleName), serviceCallback); + } + + /** + * Gets an access profile of a managed cluster. + * Gets the accessProfile for the specified role name 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 roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagedClusterAccessProfileInner object + */ + public Observable getAccessProfileAsync(String resourceGroupName, String resourceName, String roleName) { + return getAccessProfileWithServiceResponseAsync(resourceGroupName, resourceName, roleName).map(new Func1, ManagedClusterAccessProfileInner>() { + @Override + public ManagedClusterAccessProfileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an access profile of a managed cluster. + * Gets the accessProfile for the specified role name 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 roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagedClusterAccessProfileInner object + */ + public Observable> getAccessProfileWithServiceResponseAsync(String resourceGroupName, String resourceName, String roleName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (roleName == null) { + throw new IllegalArgumentException("Parameter roleName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.getAccessProfile(this.client.subscriptionId(), resourceGroupName, resourceName, roleName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAccessProfileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAccessProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets cluster admin credential of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CredentialResultsInner object if successful. + */ + public CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName) { + return listClusterAdminCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets cluster admin credential of a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listClusterAdminCredentialsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets cluster admin credential of a managed cluster. + * 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 + * @return the observable to the CredentialResultsInner object + */ + public Observable listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName) { + return listClusterAdminCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, CredentialResultsInner>() { + @Override + public CredentialResultsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets cluster admin credential of a managed cluster. + * 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 + * @return the observable to the CredentialResultsInner object + */ + public Observable> listClusterAdminCredentialsWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.listClusterAdminCredentials(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listClusterAdminCredentialsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listClusterAdminCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets cluster user credential of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CredentialResultsInner object if successful. + */ + public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) { + return listClusterUserCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets cluster user credential of a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listClusterUserCredentialsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listClusterUserCredentialsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets cluster user credential of a managed cluster. + * 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 + * @return the observable to the CredentialResultsInner object + */ + public Observable listClusterUserCredentialsAsync(String resourceGroupName, String resourceName) { + return listClusterUserCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, CredentialResultsInner>() { + @Override + public CredentialResultsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets cluster user credential of a managed cluster. + * 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 + * @return the observable to the CredentialResultsInner object + */ + public Observable> listClusterUserCredentialsWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.listClusterUserCredentials(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listClusterUserCredentialsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listClusterUserCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets cluster monitoring user credential of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CredentialResultsInner object if successful. + */ + public CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { + return listClusterMonitoringUserCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets cluster monitoring user credential of a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listClusterMonitoringUserCredentialsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listClusterMonitoringUserCredentialsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets cluster monitoring user credential of a managed cluster. + * 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 + * @return the observable to the CredentialResultsInner object + */ + public Observable listClusterMonitoringUserCredentialsAsync(String resourceGroupName, String resourceName) { + return listClusterMonitoringUserCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, CredentialResultsInner>() { + @Override + public CredentialResultsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets cluster monitoring user credential of a managed cluster. + * 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 + * @return the observable to the CredentialResultsInner object + */ + public Observable> listClusterMonitoringUserCredentialsWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.listClusterMonitoringUserCredentials(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listClusterMonitoringUserCredentialsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listClusterMonitoringUserCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterInner object if successful. + */ + public ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets a managed cluster. + * 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 + * @return the observable to the ManagedClusterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, ManagedClusterInner>() { + @Override + public ManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a managed cluster. + * 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 + * @return the observable to the ManagedClusterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterInner object if successful. + */ + public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Creates or updates a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, ManagedClusterInner>() { + @Override + public ManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-10-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterInner object if successful. + */ + public ManagedClusterInner beginCreateOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Creates or updates a managed cluster. + * 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 + * @return the observable to the ManagedClusterInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, ManagedClusterInner>() { + @Override + public ManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a managed cluster. + * 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 + * @return the observable to the ManagedClusterInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-10-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates tags on a managed cluster. + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterInner object if successful. + */ + public ManagedClusterInner updateTags(String resourceGroupName, String resourceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Updates tags on a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Updates tags on a managed cluster. + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String resourceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, ManagedClusterInner>() { + @Override + public ManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags on a managed cluster. + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates tags on a managed cluster. + * 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 tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterInner object if successful. + */ + public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).toBlocking().last().body(); + } + + /** + * Updates tags on a managed cluster. + * 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 tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String resourceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags), serviceCallback); + } + + /** + * Updates tags on a managed cluster. + * 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 tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String resourceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).map(new Func1, ManagedClusterInner>() { + @Override + public ManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags on a managed cluster. + * 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 tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName, Map tags) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-10-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates tags on a managed cluster. + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterInner object if successful. + */ + public ManagedClusterInner beginUpdateTags(String resourceGroupName, String resourceName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Updates tags on a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Updates tags on a managed cluster. + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagedClusterInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String resourceName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, ManagedClusterInner>() { + @Override + public ManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags on a managed cluster. + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagedClusterInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates tags on a managed cluster. + * 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 tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ManagedClusterInner object if successful. + */ + public ManagedClusterInner beginUpdateTags(String resourceGroupName, String resourceName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).toBlocking().single().body(); + } + + /** + * Updates tags on a managed cluster. + * 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 tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String resourceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags), serviceCallback); + } + + /** + * Updates tags on a managed cluster. + * 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 tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagedClusterInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String resourceName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).map(new Func1, ManagedClusterInner>() { + @Override + public ManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags on a managed cluster. + * 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 tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ManagedClusterInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName, Map tags) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-10-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String resourceName) { + deleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Deletes a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Deletes a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String resourceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Deletes a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Deletes a managed cluster. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String resourceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a managed cluster. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + resetServicePrincipalProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().last().body(); + } + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetServicePrincipalProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + return resetServicePrincipalProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable> resetServicePrincipalProfileWithServiceResponseAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-10-01"; + Observable> observable = service.resetServicePrincipalProfile(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + beginResetServicePrincipalProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); + } + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginResetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetServicePrincipalProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginResetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + return beginResetServicePrincipalProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reset Service Principal Profile of a managed cluster. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginResetServicePrincipalProfileWithServiceResponseAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-10-01"; + return service.beginResetServicePrincipalProfile(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResetServicePrincipalProfileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginResetServicePrincipalProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reset AAD Profile of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetAADProfile(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { + resetAADProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().last().body(); + } + + /** + * Reset AAD Profile of a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetAADProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Reset AAD Profile of a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable resetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { + return resetAADProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reset AAD Profile of a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable> resetAADProfileWithServiceResponseAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-10-01"; + Observable> observable = service.resetAADProfile(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Reset AAD Profile of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginResetAADProfile(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { + beginResetAADProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); + } + + /** + * Reset AAD Profile of a managed cluster. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginResetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetAADProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Reset AAD Profile of a managed cluster. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginResetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { + return beginResetAADProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reset AAD Profile of a managed cluster. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginResetAADProfileWithServiceResponseAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-10-01"; + return service.beginResetAADProfile(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResetAADProfileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginResetAADProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Rotate certificates of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void rotateClusterCertificates(String resourceGroupName, String resourceName) { + rotateClusterCertificatesWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Rotate certificates of a managed cluster. + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(rotateClusterCertificatesWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Rotate certificates of a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + return rotateClusterCertificatesWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Rotate certificates of a managed cluster. + * 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 + * @return the observable for the request + */ + public Observable> rotateClusterCertificatesWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + Observable> observable = service.rotateClusterCertificates(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Rotate certificates of a managed cluster. + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRotateClusterCertificates(String resourceGroupName, String resourceName) { + beginRotateClusterCertificatesWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Rotate certificates of a managed cluster. + * Rotate certificates of a managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRotateClusterCertificatesAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRotateClusterCertificatesWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Rotate certificates of a managed cluster. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + return beginRotateClusterCertificatesWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Rotate certificates of a managed cluster. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRotateClusterCertificatesWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-10-01"; + return service.beginRotateClusterCertificates(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRotateClusterCertificatesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRotateClusterCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ManagedClusterInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ManagedClusterInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ManagedClusterInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ManagedClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ManagedClusterInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ManagedClusterInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ManagedClusterInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed cluster. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ManagedClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClusterImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClusterImpl.java new file mode 100644 index 0000000000000..6a81d42576e10 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClusterImpl.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedCluster; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2019_10_01.PurchasePlan; +import com.microsoft.azure.management.containerservice.v2019_10_01.NetworkProfile; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftRouterProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusterMasterPoolProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusterAgentPoolProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusterAuthProfile; + +class OpenShiftManagedClusterImpl extends GroupableResourceCoreImpl implements OpenShiftManagedCluster, OpenShiftManagedCluster.Definition, OpenShiftManagedCluster.Update { + OpenShiftManagedClusterImpl(String name, OpenShiftManagedClusterInner inner, ContainerServiceManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + OpenShiftManagedClustersInner client = this.manager().inner().openShiftManagedClusters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + OpenShiftManagedClustersInner client = this.manager().inner().openShiftManagedClusters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + OpenShiftManagedClustersInner client = this.manager().inner().openShiftManagedClusters(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List agentPoolProfiles() { + return this.inner().agentPoolProfiles(); + } + + @Override + public OpenShiftManagedClusterAuthProfile authProfile() { + return this.inner().authProfile(); + } + + @Override + public String clusterVersion() { + return this.inner().clusterVersion(); + } + + @Override + public String fqdn() { + return this.inner().fqdn(); + } + + @Override + public OpenShiftManagedClusterMasterPoolProfile masterPoolProfile() { + return this.inner().masterPoolProfile(); + } + + @Override + public NetworkProfile networkProfile() { + return this.inner().networkProfile(); + } + + @Override + public String openShiftVersion() { + return this.inner().openShiftVersion(); + } + + @Override + public PurchasePlan plan() { + return this.inner().plan(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String publicHostname() { + return this.inner().publicHostname(); + } + + @Override + public List routerProfiles() { + return this.inner().routerProfiles(); + } + + @Override + public OpenShiftManagedClusterImpl withOpenShiftVersion(String openShiftVersion) { + this.inner().withOpenShiftVersion(openShiftVersion); + return this; + } + + @Override + public OpenShiftManagedClusterImpl withAgentPoolProfiles(List agentPoolProfiles) { + this.inner().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + @Override + public OpenShiftManagedClusterImpl withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile) { + this.inner().withAuthProfile(authProfile); + return this; + } + + @Override + public OpenShiftManagedClusterImpl withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile) { + this.inner().withMasterPoolProfile(masterPoolProfile); + return this; + } + + @Override + public OpenShiftManagedClusterImpl withNetworkProfile(NetworkProfile networkProfile) { + this.inner().withNetworkProfile(networkProfile); + return this; + } + + @Override + public OpenShiftManagedClusterImpl withPlan(PurchasePlan plan) { + this.inner().withPlan(plan); + return this; + } + + @Override + public OpenShiftManagedClusterImpl withRouterProfiles(List routerProfiles) { + this.inner().withRouterProfiles(routerProfiles); + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClusterInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClusterInner.java new file mode 100644 index 0000000000000..7cdc473be73cf --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClusterInner.java @@ -0,0 +1,271 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.PurchasePlan; +import com.microsoft.azure.management.containerservice.v2019_10_01.NetworkProfile; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftRouterProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusterMasterPoolProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusterAgentPoolProfile; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusterAuthProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * OpenShift Managed cluster. + */ +@JsonFlatten +public class OpenShiftManagedClusterInner extends Resource { + /** + * Define the resource plan as required by ARM for billing purposes. + */ + @JsonProperty(value = "plan") + private PurchasePlan plan; + + /** + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Version of OpenShift specified when creating the cluster. + */ + @JsonProperty(value = "properties.openShiftVersion", required = true) + private String openShiftVersion; + + /** + * Version of OpenShift specified when creating the cluster. + */ + @JsonProperty(value = "properties.clusterVersion", access = JsonProperty.Access.WRITE_ONLY) + private String clusterVersion; + + /** + * Service generated FQDN for OpenShift API server. + */ + @JsonProperty(value = "properties.publicHostname", access = JsonProperty.Access.WRITE_ONLY) + private String publicHostname; + + /** + * Service generated FQDN for OpenShift API server loadbalancer internal + * hostname. + */ + @JsonProperty(value = "properties.fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Configuration for OpenShift networking. + */ + @JsonProperty(value = "properties.networkProfile") + private NetworkProfile networkProfile; + + /** + * Configuration for OpenShift router(s). + */ + @JsonProperty(value = "properties.routerProfiles") + private List routerProfiles; + + /** + * Configuration for OpenShift master VMs. + */ + @JsonProperty(value = "properties.masterPoolProfile") + private OpenShiftManagedClusterMasterPoolProfile masterPoolProfile; + + /** + * Configuration of OpenShift cluster VMs. + */ + @JsonProperty(value = "properties.agentPoolProfiles") + private List agentPoolProfiles; + + /** + * Configures OpenShift authentication. + */ + @JsonProperty(value = "properties.authProfile") + private OpenShiftManagedClusterAuthProfile authProfile; + + /** + * Get define the resource plan as required by ARM for billing purposes. + * + * @return the plan value + */ + public PurchasePlan plan() { + return this.plan; + } + + /** + * Set define the resource plan as required by ARM for billing purposes. + * + * @param plan the plan value to set + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withPlan(PurchasePlan plan) { + this.plan = plan; + return this; + } + + /** + * Get the current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get version of OpenShift specified when creating the cluster. + * + * @return the openShiftVersion value + */ + public String openShiftVersion() { + return this.openShiftVersion; + } + + /** + * Set version of OpenShift specified when creating the cluster. + * + * @param openShiftVersion the openShiftVersion value to set + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withOpenShiftVersion(String openShiftVersion) { + this.openShiftVersion = openShiftVersion; + return this; + } + + /** + * Get version of OpenShift specified when creating the cluster. + * + * @return the clusterVersion value + */ + public String clusterVersion() { + return this.clusterVersion; + } + + /** + * Get service generated FQDN for OpenShift API server. + * + * @return the publicHostname value + */ + public String publicHostname() { + return this.publicHostname; + } + + /** + * Get service generated FQDN for OpenShift API server loadbalancer internal hostname. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get configuration for OpenShift networking. + * + * @return the networkProfile value + */ + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set configuration for OpenShift networking. + * + * @param networkProfile the networkProfile value to set + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get configuration for OpenShift router(s). + * + * @return the routerProfiles value + */ + public List routerProfiles() { + return this.routerProfiles; + } + + /** + * Set configuration for OpenShift router(s). + * + * @param routerProfiles the routerProfiles value to set + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withRouterProfiles(List routerProfiles) { + this.routerProfiles = routerProfiles; + return this; + } + + /** + * Get configuration for OpenShift master VMs. + * + * @return the masterPoolProfile value + */ + public OpenShiftManagedClusterMasterPoolProfile masterPoolProfile() { + return this.masterPoolProfile; + } + + /** + * Set configuration for OpenShift master VMs. + * + * @param masterPoolProfile the masterPoolProfile value to set + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile) { + this.masterPoolProfile = masterPoolProfile; + return this; + } + + /** + * Get configuration of OpenShift cluster VMs. + * + * @return the agentPoolProfiles value + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set configuration of OpenShift cluster VMs. + * + * @param agentPoolProfiles the agentPoolProfiles value to set + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get configures OpenShift authentication. + * + * @return the authProfile value + */ + public OpenShiftManagedClusterAuthProfile authProfile() { + return this.authProfile; + } + + /** + * Set configures OpenShift authentication. + * + * @param authProfile the authProfile value to set + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile) { + this.authProfile = authProfile; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClustersImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClustersImpl.java new file mode 100644 index 0000000000000..6ebb06eb29087 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClustersImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters; +import com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedCluster; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class OpenShiftManagedClustersImpl extends GroupableResourcesCoreImpl implements OpenShiftManagedClusters { + protected OpenShiftManagedClustersImpl(ContainerServiceManager manager) { + super(manager.inner().openShiftManagedClusters(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + OpenShiftManagedClustersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + OpenShiftManagedClustersInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + OpenShiftManagedClustersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + OpenShiftManagedClustersInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public OpenShiftManagedCluster call(OpenShiftManagedClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + OpenShiftManagedClustersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + OpenShiftManagedClustersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public OpenShiftManagedCluster call(OpenShiftManagedClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public OpenShiftManagedClusterImpl define(String name) { + return wrapModel(name); + } + + @Override + protected OpenShiftManagedClusterImpl wrapModel(OpenShiftManagedClusterInner inner) { + return new OpenShiftManagedClusterImpl(inner.name(), inner, manager()); + } + + @Override + protected OpenShiftManagedClusterImpl wrapModel(String name) { + return new OpenShiftManagedClusterImpl(name, new OpenShiftManagedClusterInner(), this.manager()); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClustersInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClustersInner.java new file mode 100644 index 0000000000000..08c3203aec271 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OpenShiftManagedClustersInner.java @@ -0,0 +1,1328 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.containerservice.v2019_10_01.TagsObject; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in OpenShiftManagedClusters. + */ +public class OpenShiftManagedClustersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private OpenShiftManagedClustersService service; + /** The service client containing this operation class. */ + private ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OpenShiftManagedClustersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OpenShiftManagedClustersInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { + this.service = retrofit.create(OpenShiftManagedClustersService.class); + this.client = client; + } + + /** + * The interface defining all the services for OpenShiftManagedClusters to be + * used by Retrofit to perform actually REST calls. + */ + interface OpenShiftManagedClustersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body OpenShiftManagedClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body OpenShiftManagedClusterInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters updateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}") + Observable> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}") + Observable> beginUpdateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.OpenShiftManagedClusters listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OpenShiftManagedClusterInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OpenShiftManagedClusterInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OpenShiftManagedClusterInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OpenShiftManagedClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-04-30"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OpenShiftManagedClusterInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OpenShiftManagedClusterInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OpenShiftManagedClusterInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OpenShiftManagedClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + final String apiVersion = "2019-04-30"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a OpenShift managed cluster. + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OpenShiftManagedClusterInner object if successful. + */ + public OpenShiftManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets a OpenShift managed cluster. + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets a OpenShift managed cluster. + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OpenShiftManagedClusterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, OpenShiftManagedClusterInner>() { + @Override + public OpenShiftManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a OpenShift managed cluster. + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OpenShiftManagedClusterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-04-30"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates an OpenShift managed cluster. + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OpenShiftManagedClusterInner object if successful. + */ + public OpenShiftManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Creates or updates an OpenShift managed cluster. + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, OpenShiftManagedClusterInner>() { + @Override + public OpenShiftManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an OpenShift managed cluster. + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-04-30"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an OpenShift managed cluster. + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OpenShiftManagedClusterInner object if successful. + */ + public OpenShiftManagedClusterInner beginCreateOrUpdate(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Creates or updates an OpenShift managed cluster. + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OpenShiftManagedClusterInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, OpenShiftManagedClusterInner>() { + @Override + public OpenShiftManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an OpenShift managed cluster. + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OpenShiftManagedClusterInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-04-30"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OpenShiftManagedClusterInner object if successful. + */ + public OpenShiftManagedClusterInner updateTags(String resourceGroupName, String resourceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String resourceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, OpenShiftManagedClusterInner>() { + @Override + public OpenShiftManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-04-30"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OpenShiftManagedClusterInner object if successful. + */ + public OpenShiftManagedClusterInner updateTags(String resourceGroupName, String resourceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).toBlocking().last().body(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String resourceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags), serviceCallback); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String resourceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).map(new Func1, OpenShiftManagedClusterInner>() { + @Override + public OpenShiftManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName, Map tags) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-04-30"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OpenShiftManagedClusterInner object if successful. + */ + public OpenShiftManagedClusterInner beginUpdateTags(String resourceGroupName, String resourceName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OpenShiftManagedClusterInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String resourceName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, OpenShiftManagedClusterInner>() { + @Override + public OpenShiftManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OpenShiftManagedClusterInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-04-30"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OpenShiftManagedClusterInner object if successful. + */ + public OpenShiftManagedClusterInner beginUpdateTags(String resourceGroupName, String resourceName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).toBlocking().single().body(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String resourceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags), serviceCallback); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OpenShiftManagedClusterInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String resourceName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).map(new Func1, OpenShiftManagedClusterInner>() { + @Override + public OpenShiftManagedClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags on an OpenShift managed cluster. + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OpenShiftManagedClusterInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName, Map tags) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-04-30"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes an OpenShift managed cluster. + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String resourceName) { + deleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Deletes an OpenShift managed cluster. + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Deletes an OpenShift managed cluster. + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an OpenShift managed cluster. + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-04-30"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes an OpenShift managed cluster. + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String resourceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Deletes an OpenShift managed cluster. + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Deletes an OpenShift managed cluster. + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String resourceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an OpenShift managed cluster. + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + final String apiVersion = "2019-04-30"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OpenShiftManagedClusterInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OpenShiftManagedClusterInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OpenShiftManagedClusterInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each OpenShift managed cluster. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OpenShiftManagedClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OpenShiftManagedClusterInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OpenShiftManagedClusterInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OpenShiftManagedClusterInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns properties of each OpenShift managed cluster. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OpenShiftManagedClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationValueImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationValueImpl.java new file mode 100644 index 0000000000000..ba97fb27b909e --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationValueImpl.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.OperationValue; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class OperationValueImpl extends WrapperImpl implements OperationValue { + private final ContainerServiceManager manager; + OperationValueImpl(OperationValueInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String operation() { + return this.inner().operation(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public String provider() { + return this.inner().provider(); + } + + @Override + public String resource() { + return this.inner().resource(); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationValueInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationValueInner.java new file mode 100644 index 0000000000000..7d85a39198fef --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationValueInner.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes the properties of a Compute Operation value. + */ +@JsonFlatten +public class OperationValueInner { + /** + * 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 of the compute operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Get the name of the compute operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the display name of the compute operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get the display name of the resource the operation applies to. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get the description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get the resource provider for the operation. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationsImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..bbd213d40cc3a --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2019_10_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.OperationValue; + +class OperationsImpl extends WrapperImpl implements Operations { + private final ContainerServiceManager manager; + + OperationsImpl(ContainerServiceManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public OperationValue call(OperationValueInner inner) { + return new OperationValueImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationsInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationsInner.java new file mode 100644 index 0000000000000..c1482a60d0b28 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OperationsInner.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2019_10_01.Operations list" }) + @GET("providers/Microsoft.ContainerService/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<OperationValueInner> object if successful. + */ + public List list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Gets a list of compute operations. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets a list of compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationValueInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<OperationValueInner> object + */ + public Observable>> listWithServiceResponseAsync() { + final String apiVersion = "2019-10-01"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OrchestratorVersionProfileListResultImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OrchestratorVersionProfileListResultImpl.java new file mode 100644 index 0000000000000..a7bd475ad3deb --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OrchestratorVersionProfileListResultImpl.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.microsoft.azure.management.containerservice.v2019_10_01.OrchestratorVersionProfileListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.OrchestratorVersionProfile; + +class OrchestratorVersionProfileListResultImpl extends WrapperImpl implements OrchestratorVersionProfileListResult { + private final ContainerServiceManager manager; + OrchestratorVersionProfileListResultImpl(OrchestratorVersionProfileListResultInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List orchestrators() { + return this.inner().orchestrators(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OrchestratorVersionProfileListResultInner.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OrchestratorVersionProfileListResultInner.java new file mode 100644 index 0000000000000..6b8754d392117 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/OrchestratorVersionProfileListResultInner.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.containerservice.v2019_10_01.OrchestratorVersionProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The list of versions for supported orchestrators. + */ +@JsonFlatten +public class OrchestratorVersionProfileListResultInner { + /** + * Id of the orchestrator version profile list result. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Name of the orchestrator version profile list result. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Type of the orchestrator version profile list result. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * List of orchestrator version profiles. + */ + @JsonProperty(value = "properties.orchestrators", required = true) + private List orchestrators; + + /** + * Get id of the orchestrator version profile list result. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get name of the orchestrator version profile list result. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get type of the orchestrator version profile list result. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get list of orchestrator version profiles. + * + * @return the orchestrators value + */ + public List orchestrators() { + return this.orchestrators; + } + + /** + * Set list of orchestrator version profiles. + * + * @param orchestrators the orchestrators value to set + * @return the OrchestratorVersionProfileListResultInner object itself. + */ + public OrchestratorVersionProfileListResultInner withOrchestrators(List orchestrators) { + this.orchestrators = orchestrators; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/PageImpl.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/PageImpl.java new file mode 100644 index 0000000000000..d5bbb8fbb0201 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/PageImpl1.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/PageImpl1.java new file mode 100644 index 0000000000000..ae5a396bbb9dc --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/PageImpl1.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl1 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/package-info.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/package-info.java new file mode 100644 index 0000000000000..7dff202c2b266 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for ContainerServiceManagementClient. + * Container Service Client. + */ +package com.microsoft.azure.management.containerservice.v2019_10_01.implementation; diff --git a/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/package-info.java b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/package-info.java new file mode 100644 index 0000000000000..a216c6e271665 --- /dev/null +++ b/sdk/containerservice/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_10_01/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for ContainerServiceManagementClient. + * Container Service Client. + */ +package com.microsoft.azure.management.containerservice.v2019_10_01;