diff --git a/sdk/containerservice/mgmt-v2020_11_01/pom.xml b/sdk/containerservice/mgmt-v2020_11_01/pom.xml new file mode 100644 index 0000000000000..8e3b088a1c9df --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPool.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPool.java new file mode 100644 index 0000000000000..70ad7a141a1e5 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPool.java @@ -0,0 +1,801 @@ +/** + * 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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.containerservice.v2020_11_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.v2020_11_01.implementation.ContainerServiceManager; +import java.util.List; +import java.util.Map; + +/** + * 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 mode value. + */ + AgentPoolMode mode(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the nodeImageVersion value. + */ + String nodeImageVersion(); + + /** + * @return the nodeLabels value. + */ + Map nodeLabels(); + + /** + * @return the nodeTaints value. + */ + List nodeTaints(); + + /** + * @return the orchestratorVersion value. + */ + String orchestratorVersion(); + + /** + * @return the osDiskSizeGB value. + */ + Integer osDiskSizeGB(); + + /** + * @return the osDiskType value. + */ + OSDiskType osDiskType(); + + /** + * @return the osType value. + */ + OSType osType(); + + /** + * @return the podSubnetID value. + */ + String podSubnetID(); + + /** + * @return the powerState value. + */ + PowerState powerState(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the proximityPlacementGroupID value. + */ + String proximityPlacementGroupID(); + + /** + * @return the scaleSetEvictionPolicy value. + */ + ScaleSetEvictionPolicy scaleSetEvictionPolicy(); + + /** + * @return the scaleSetPriority value. + */ + ScaleSetPriority scaleSetPriority(); + + /** + * @return the spotMaxPrice value. + */ + Double spotMaxPrice(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the upgradeSettings value. + */ + AgentPoolUpgradeSettings upgradeSettings(); + + /** + * @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 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 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1 + * @return the next definition stage + */ + WithCreate withCount(Integer count); + } + + /** + * The stage of the agentpool definition allowing to specify 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 Mode. + */ + interface WithMode { + /** + * Specifies mode. + * @param mode AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User' + * @return the next definition stage + */ + WithCreate withMode(AgentPoolMode mode); + } + + /** + * The stage of the agentpool definition allowing to specify NodeLabels. + */ + interface WithNodeLabels { + /** + * Specifies nodeLabels. + * @param nodeLabels Agent pool node labels to be persisted across all nodes in agent pool + * @return the next definition stage + */ + WithCreate withNodeLabels(Map nodeLabels); + } + + /** + * The stage of the agentpool definition allowing to specify NodeTaints. + */ + interface WithNodeTaints { + /** + * Specifies 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 OsDiskType. + */ + interface WithOsDiskType { + /** + * Specifies osDiskType. + * @param osDiskType OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be changed after creation. Possible values include: 'Managed', 'Ephemeral' + * @return the next definition stage + */ + WithCreate withOsDiskType(OSDiskType osDiskType); + } + + /** + * 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 PodSubnetID. + */ + interface WithPodSubnetID { + /** + * Specifies podSubnetID. + * @param podSubnetID Pod SubnetID specifies the VNet's subnet identifier for pods + * @return the next definition stage + */ + WithCreate withPodSubnetID(String podSubnetID); + } + + /** + * The stage of the agentpool definition allowing to specify ProximityPlacementGroupID. + */ + interface WithProximityPlacementGroupID { + /** + * Specifies proximityPlacementGroupID. + * @param proximityPlacementGroupID The ID for Proximity Placement Group + * @return the next definition stage + */ + WithCreate withProximityPlacementGroupID(String proximityPlacementGroupID); + } + + /** + * The stage of the agentpool definition allowing to specify ScaleSetEvictionPolicy. + */ + interface WithScaleSetEvictionPolicy { + /** + * Specifies scaleSetEvictionPolicy. + * @param scaleSetEvictionPolicy ScaleSetEvictionPolicy to be used to specify eviction policy for Spot 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: 'Spot', 'Regular' + * @return the next definition stage + */ + WithCreate withScaleSetPriority(ScaleSetPriority scaleSetPriority); + } + + /** + * The stage of the agentpool definition allowing to specify SpotMaxPrice. + */ + interface WithSpotMaxPrice { + /** + * Specifies spotMaxPrice. + * @param spotMaxPrice SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand + * @return the next definition stage + */ + WithCreate withSpotMaxPrice(Double spotMaxPrice); + } + + /** + * The stage of the agentpool definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Agent pool tags to be persisted on the agent pool virtual machine scale set + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the agentpool definition allowing to specify UpgradeSettings. + */ + interface WithUpgradeSettings { + /** + * Specifies upgradeSettings. + * @param upgradeSettings Settings for upgrading the agentpool + * @return the next definition stage + */ + WithCreate withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings); + } + + /** + * The stage of the agentpool definition allowing to specify 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 for nodes and maybe pods + * @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.WithMode, DefinitionStages.WithNodeLabels, DefinitionStages.WithNodeTaints, DefinitionStages.WithOrchestratorVersion, DefinitionStages.WithOsDiskSizeGB, DefinitionStages.WithOsDiskType, DefinitionStages.WithOsType, DefinitionStages.WithPodSubnetID, DefinitionStages.WithProximityPlacementGroupID, DefinitionStages.WithScaleSetEvictionPolicy, DefinitionStages.WithScaleSetPriority, DefinitionStages.WithSpotMaxPrice, DefinitionStages.WithTags, DefinitionStages.WithUpgradeSettings, 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.WithMode, UpdateStages.WithNodeLabels, UpdateStages.WithNodeTaints, UpdateStages.WithOrchestratorVersion, UpdateStages.WithOsDiskSizeGB, UpdateStages.WithOsDiskType, UpdateStages.WithOsType, UpdateStages.WithPodSubnetID, UpdateStages.WithProximityPlacementGroupID, UpdateStages.WithScaleSetEvictionPolicy, UpdateStages.WithScaleSetPriority, UpdateStages.WithSpotMaxPrice, UpdateStages.WithTags, UpdateStages.WithUpgradeSettings, 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 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 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1 + * @return the next 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 Mode. + */ + interface WithMode { + /** + * Specifies mode. + * @param mode AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User' + * @return the next update stage + */ + Update withMode(AgentPoolMode mode); + } + + /** + * The stage of the agentpool update allowing to specify NodeLabels. + */ + interface WithNodeLabels { + /** + * Specifies nodeLabels. + * @param nodeLabels Agent pool node labels to be persisted across all nodes in agent pool + * @return the next update stage + */ + Update withNodeLabels(Map nodeLabels); + } + + /** + * 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 OsDiskType. + */ + interface WithOsDiskType { + /** + * Specifies osDiskType. + * @param osDiskType OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be changed after creation. Possible values include: 'Managed', 'Ephemeral' + * @return the next update stage + */ + Update withOsDiskType(OSDiskType osDiskType); + } + + /** + * 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 PodSubnetID. + */ + interface WithPodSubnetID { + /** + * Specifies podSubnetID. + * @param podSubnetID Pod SubnetID specifies the VNet's subnet identifier for pods + * @return the next update stage + */ + Update withPodSubnetID(String podSubnetID); + } + + /** + * The stage of the agentpool update allowing to specify ProximityPlacementGroupID. + */ + interface WithProximityPlacementGroupID { + /** + * Specifies proximityPlacementGroupID. + * @param proximityPlacementGroupID The ID for Proximity Placement Group + * @return the next update stage + */ + Update withProximityPlacementGroupID(String proximityPlacementGroupID); + } + + /** + * 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 Spot 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: 'Spot', 'Regular' + * @return the next update stage + */ + Update withScaleSetPriority(ScaleSetPriority scaleSetPriority); + } + + /** + * The stage of the agentpool update allowing to specify SpotMaxPrice. + */ + interface WithSpotMaxPrice { + /** + * Specifies spotMaxPrice. + * @param spotMaxPrice SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand + * @return the next update stage + */ + Update withSpotMaxPrice(Double spotMaxPrice); + } + + /** + * The stage of the agentpool update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Agent pool tags to be persisted on the agent pool virtual machine scale set + * @return the next update stage + */ + Update withTags(Map tags); + } + + /** + * The stage of the agentpool update allowing to specify UpgradeSettings. + */ + interface WithUpgradeSettings { + /** + * Specifies upgradeSettings. + * @param upgradeSettings Settings for upgrading the agentpool + * @return the next update stage + */ + Update withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings); + } + + /** + * 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 for nodes and maybe pods + * @return the next update stage + */ + Update withVnetSubnetID(String vnetSubnetID); + } + + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolAvailableVersions.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolAvailableVersions.java new file mode 100644 index 0000000000000..0eb6f8af8bedc --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java new file mode 100644 index 0000000000000..c858c59ec41d2 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolMode.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolMode.java new file mode 100644 index 0000000000000..421d5ca59b478 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolMode.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AgentPoolMode. + */ +public final class AgentPoolMode extends ExpandableStringEnum { + /** Static value System for AgentPoolMode. */ + public static final AgentPoolMode SYSTEM = fromString("System"); + + /** Static value User for AgentPoolMode. */ + public static final AgentPoolMode USER = fromString("User"); + + /** + * Creates or finds a AgentPoolMode from its string representation. + * @param name a name to look for + * @return the corresponding AgentPoolMode + */ + @JsonCreator + public static AgentPoolMode fromString(String name) { + return fromString(name, AgentPoolMode.class); + } + + /** + * @return known AgentPoolMode values + */ + public static Collection values() { + return values(AgentPoolMode.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolType.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolType.java new file mode 100644 index 0000000000000..89b446b8eac1a --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolUpgradeProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolUpgradeProfile.java new file mode 100644 index 0000000000000..b6ea78f4b8349 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolUpgradeProfile.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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_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 latestNodeImageVersion value. + */ + String latestNodeImageVersion(); + + /** + * @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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolUpgradeProfilePropertiesUpgradesItem.java new file mode 100644 index 0000000000000..04846f9f62f2c --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolUpgradeSettings.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolUpgradeSettings.java new file mode 100644 index 0000000000000..55f287d961ad0 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPoolUpgradeSettings.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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for upgrading an agentpool. + */ +public class AgentPoolUpgradeSettings { + /** + * Count or percentage of additional nodes to be added during upgrade. If + * empty uses AKS default. + */ + @JsonProperty(value = "maxSurge") + private String maxSurge; + + /** + * Get count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. + * + * @return the maxSurge value + */ + public String maxSurge() { + return this.maxSurge; + } + + /** + * Set count or percentage of additional nodes to be added during upgrade. If empty uses AKS default. + * + * @param maxSurge the maxSurge value to set + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withMaxSurge(String maxSurge) { + this.maxSurge = maxSurge; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPools.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPools.java new file mode 100644 index 0000000000000..68169db563d43 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/AgentPools.java @@ -0,0 +1,91 @@ +/** + * 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.v2020_11_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.AgentPoolsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AgentPools. + */ +public interface AgentPools extends SupportsCreating, HasInner { + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/Code.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/Code.java new file mode 100644 index 0000000000000..97aee2f1dde29 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/Code.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Code. + */ +public final class Code extends ExpandableStringEnum { + /** Static value Running for Code. */ + public static final Code RUNNING = fromString("Running"); + + /** Static value Stopped for Code. */ + public static final Code STOPPED = fromString("Stopped"); + + /** + * Creates or finds a Code from its string representation. + * @param name a name to look for + * @return the corresponding Code + */ + @JsonCreator + public static Code fromString(String name) { + return fromString(name, Code.class); + } + + /** + * @return known Code values + */ + public static Collection values() { + return values(Code.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ConnectionStatus.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ConnectionStatus.java new file mode 100644 index 0000000000000..4be9a7f468a23 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ConnectionStatus.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConnectionStatus. + */ +public final class ConnectionStatus extends ExpandableStringEnum { + /** Static value Pending for ConnectionStatus. */ + public static final ConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for ConnectionStatus. */ + public static final ConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for ConnectionStatus. */ + public static final ConnectionStatus REJECTED = fromString("Rejected"); + + /** Static value Disconnected for ConnectionStatus. */ + public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a ConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionStatus + */ + @JsonCreator + public static ConnectionStatus fromString(String name) { + return fromString(name, ConnectionStatus.class); + } + + /** + * @return known ConnectionStatus values + */ + public static Collection values() { + return values(ConnectionStatus.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceDiagnosticsProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceDiagnosticsProfile.java new file mode 100644 index 0000000000000..4574086c4447b --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceLinuxProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceLinuxProfile.java new file mode 100644 index 0000000000000..d583ae1885aa4 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceMasterProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceMasterProfile.java new file mode 100644 index 0000000000000..5474a05cff7ca --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceNetworkProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceNetworkProfile.java new file mode 100644 index 0000000000000..d1e1eaa9d496b --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceNetworkProfile.java @@ -0,0 +1,287 @@ +/** + * 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.v2020_11_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; + + /** + * Network mode used for building Kubernetes network. Possible values + * include: 'transparent', 'bridge'. + */ + @JsonProperty(value = "networkMode") + private NetworkMode networkMode; + + /** + * A CIDR notation IP range from which to assign pod IPs when kubenet is + * used. + */ + @JsonProperty(value = "podCidr") + private String podCidr; + + /** + * A CIDR notation IP range from which to assign service cluster IPs. It + * must not overlap with any Subnet IP ranges. + */ + @JsonProperty(value = "serviceCidr") + private String serviceCidr; + + /** + * An IP address assigned to the Kubernetes DNS service. It must be within + * the Kubernetes service address range specified in serviceCidr. + */ + @JsonProperty(value = "dnsServiceIP") + private String dnsServiceIP; + + /** + * A CIDR notation IP range assigned to the Docker bridge network. It must + * not overlap with any Subnet IP ranges or the Kubernetes service address + * range. + */ + @JsonProperty(value = "dockerBridgeCidr") + private String dockerBridgeCidr; + + /** + * The outbound (egress) routing method. Possible values include: + * 'loadBalancer', 'userDefinedRouting'. + */ + @JsonProperty(value = "outboundType") + private OutboundType outboundType; + + /** + * 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 network mode used for building Kubernetes network. Possible values include: 'transparent', 'bridge'. + * + * @return the networkMode value + */ + public NetworkMode networkMode() { + return this.networkMode; + } + + /** + * Set network mode used for building Kubernetes network. Possible values include: 'transparent', 'bridge'. + * + * @param networkMode the networkMode value to set + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkMode(NetworkMode networkMode) { + this.networkMode = networkMode; + 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 outbound (egress) routing method. Possible values include: 'loadBalancer', 'userDefinedRouting'. + * + * @return the outboundType value + */ + public OutboundType outboundType() { + return this.outboundType; + } + + /** + * Set the outbound (egress) routing method. Possible values include: 'loadBalancer', 'userDefinedRouting'. + * + * @param outboundType the outboundType value to set + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withOutboundType(OutboundType outboundType) { + this.outboundType = outboundType; + 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceSshConfiguration.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceSshConfiguration.java new file mode 100644 index 0000000000000..7059b0a8ea198 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceSshPublicKey.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceSshPublicKey.java new file mode 100644 index 0000000000000..e22fafc6e89df --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceStorageProfileTypes.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceStorageProfileTypes.java new file mode 100644 index 0000000000000..cbc44b5d69dc5 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceVMDiagnostics.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceVMDiagnostics.java new file mode 100644 index 0000000000000..ddb7dfbbb9731 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceVMSizeTypes.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ContainerServiceVMSizeTypes.java new file mode 100644 index 0000000000000..d1830851e3a36 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/CredentialResult.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/CredentialResult.java new file mode 100644 index 0000000000000..cb9f1bd4ad6c9 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/CredentialResults.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/CredentialResults.java new file mode 100644 index 0000000000000..c44363b6f55a2 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/Expander.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/Expander.java new file mode 100644 index 0000000000000..36ae57c5346c4 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/Expander.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Expander. + */ +public final class Expander extends ExpandableStringEnum { + /** Static value least-waste for Expander. */ + public static final Expander LEAST_WASTE = fromString("least-waste"); + + /** Static value most-pods for Expander. */ + public static final Expander MOST_PODS = fromString("most-pods"); + + /** Static value random for Expander. */ + public static final Expander RANDOM = fromString("random"); + + /** + * Creates or finds a Expander from its string representation. + * @param name a name to look for + * @return the corresponding Expander + */ + @JsonCreator + public static Expander fromString(String name) { + return fromString(name, Expander.class); + } + + /** + * @return known Expander values + */ + public static Collection values() { + return values(Expander.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/LicenseType.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/LicenseType.java new file mode 100644 index 0000000000000..800b9de67a418 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/LicenseType.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LicenseType. + */ +public final class LicenseType extends ExpandableStringEnum { + /** Static value None for LicenseType. */ + public static final LicenseType NONE = fromString("None"); + + /** Static value Windows_Server for LicenseType. */ + public static final LicenseType WINDOWS_SERVER = fromString("Windows_Server"); + + /** + * Creates or finds a LicenseType from its string representation. + * @param name a name to look for + * @return the corresponding LicenseType + */ + @JsonCreator + public static LicenseType fromString(String name) { + return fromString(name, LicenseType.class); + } + + /** + * @return known LicenseType values + */ + public static Collection values() { + return values(LicenseType.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/LoadBalancerSku.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/LoadBalancerSku.java new file mode 100644 index 0000000000000..f6bba58ae639e --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedCluster.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedCluster.java new file mode 100644 index 0000000000000..7714772219e0b --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedCluster.java @@ -0,0 +1,675 @@ +/** + * 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.v2020_11_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.v2020_11_01.implementation.ContainerServiceManager; +import java.util.List; +import java.util.Map; +import com.microsoft.azure.management.containerservice.v2020_11_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 autoScalerProfile value. + */ + ManagedClusterPropertiesAutoScalerProfile autoScalerProfile(); + + /** + * @return the autoUpgradeProfile value. + */ + ManagedClusterAutoUpgradeProfile autoUpgradeProfile(); + + /** + * @return the diskEncryptionSetID value. + */ + String diskEncryptionSetID(); + + /** + * @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 identityProfile value. + */ + Map identityProfile(); + + /** + * @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 podIdentityProfile value. + */ + ManagedClusterPodIdentityProfile podIdentityProfile(); + + /** + * @return the powerState value. + */ + PowerState powerState(); + + /** + * @return the privateFQDN value. + */ + String privateFQDN(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the servicePrincipalProfile value. + */ + ManagedClusterServicePrincipalProfile servicePrincipalProfile(); + + /** + * @return the sku value. + */ + ManagedClusterSKU sku(); + + /** + * @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 AutoScalerProfile. + */ + interface WithAutoScalerProfile { + /** + * Specifies autoScalerProfile. + * @param autoScalerProfile Parameters to be applied to the cluster-autoscaler when enabled + * @return the next definition stage + */ + WithCreate withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile); + } + + /** + * The stage of the managedcluster definition allowing to specify AutoUpgradeProfile. + */ + interface WithAutoUpgradeProfile { + /** + * Specifies autoUpgradeProfile. + * @param autoUpgradeProfile Profile of auto upgrade configuration + * @return the next definition stage + */ + WithCreate withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile); + } + + /** + * The stage of the managedcluster definition allowing to specify DiskEncryptionSetID. + */ + interface WithDiskEncryptionSetID { + /** + * Specifies diskEncryptionSetID. + * @param diskEncryptionSetID ResourceId of the disk encryption set to use for enabling encryption at rest + * @return the next definition stage + */ + WithCreate withDiskEncryptionSetID(String diskEncryptionSetID); + } + + /** + * The stage of the managedcluster definition allowing to specify 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 IdentityProfile. + */ + interface WithIdentityProfile { + /** + * Specifies identityProfile. + * @param identityProfile Identities associated with the cluster + * @return the next definition stage + */ + WithCreate withIdentityProfile(Map identityProfile); + } + + /** + * The stage of the managedcluster definition allowing to specify 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 PodIdentityProfile. + */ + interface WithPodIdentityProfile { + /** + * Specifies podIdentityProfile. + * @param podIdentityProfile Profile of managed cluster pod identity + * @return the next definition stage + */ + WithCreate withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile); + } + + /** + * The stage of the managedcluster definition allowing to specify 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 Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The managed cluster SKU + * @return the next definition stage + */ + WithCreate withSku(ManagedClusterSKU sku); + } + + /** + * The stage of the managedcluster definition allowing to specify 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.WithAutoScalerProfile, DefinitionStages.WithAutoUpgradeProfile, DefinitionStages.WithDiskEncryptionSetID, DefinitionStages.WithDnsPrefix, DefinitionStages.WithEnablePodSecurityPolicy, DefinitionStages.WithEnableRBAC, DefinitionStages.WithIdentity, DefinitionStages.WithIdentityProfile, DefinitionStages.WithKubernetesVersion, DefinitionStages.WithLinuxProfile, DefinitionStages.WithNetworkProfile, DefinitionStages.WithNodeResourceGroup, DefinitionStages.WithPodIdentityProfile, DefinitionStages.WithServicePrincipalProfile, DefinitionStages.WithSku, 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.WithAutoScalerProfile, UpdateStages.WithAutoUpgradeProfile, UpdateStages.WithDiskEncryptionSetID, UpdateStages.WithDnsPrefix, UpdateStages.WithEnablePodSecurityPolicy, UpdateStages.WithEnableRBAC, UpdateStages.WithIdentity, UpdateStages.WithIdentityProfile, UpdateStages.WithKubernetesVersion, UpdateStages.WithLinuxProfile, UpdateStages.WithNetworkProfile, UpdateStages.WithNodeResourceGroup, UpdateStages.WithPodIdentityProfile, UpdateStages.WithServicePrincipalProfile, UpdateStages.WithSku, 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 AutoScalerProfile. + */ + interface WithAutoScalerProfile { + /** + * Specifies autoScalerProfile. + * @param autoScalerProfile Parameters to be applied to the cluster-autoscaler when enabled + * @return the next update stage + */ + Update withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile); + } + + /** + * The stage of the managedcluster update allowing to specify AutoUpgradeProfile. + */ + interface WithAutoUpgradeProfile { + /** + * Specifies autoUpgradeProfile. + * @param autoUpgradeProfile Profile of auto upgrade configuration + * @return the next update stage + */ + Update withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile); + } + + /** + * The stage of the managedcluster update allowing to specify DiskEncryptionSetID. + */ + interface WithDiskEncryptionSetID { + /** + * Specifies diskEncryptionSetID. + * @param diskEncryptionSetID ResourceId of the disk encryption set to use for enabling encryption at rest + * @return the next update stage + */ + Update withDiskEncryptionSetID(String diskEncryptionSetID); + } + + /** + * 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 IdentityProfile. + */ + interface WithIdentityProfile { + /** + * Specifies identityProfile. + * @param identityProfile Identities associated with the cluster + * @return the next update stage + */ + Update withIdentityProfile(Map identityProfile); + } + + /** + * 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 PodIdentityProfile. + */ + interface WithPodIdentityProfile { + /** + * Specifies podIdentityProfile. + * @param podIdentityProfile Profile of managed cluster pod identity + * @return the next update stage + */ + Update withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile); + } + + /** + * 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 Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The managed cluster SKU + * @return the next update stage + */ + Update withSku(ManagedClusterSKU sku); + } + + /** + * 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAADProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAADProfile.java new file mode 100644 index 0000000000000..c8a81ba6e5275 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAADProfile.java @@ -0,0 +1,201 @@ +/** + * 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.v2020_11_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AADProfile specifies attributes for Azure Active Directory integration. + */ +public class ManagedClusterAADProfile { + /** + * Whether to enable managed AAD. + */ + @JsonProperty(value = "managed") + private Boolean managed; + + /** + * Whether to enable Azure RBAC for Kubernetes authorization. + */ + @JsonProperty(value = "enableAzureRBAC") + private Boolean enableAzureRBAC; + + /** + * AAD group object IDs that will have admin role of the cluster. + */ + @JsonProperty(value = "adminGroupObjectIDs") + private List adminGroupObjectIDs; + + /** + * The client AAD application ID. + */ + @JsonProperty(value = "clientAppID") + private String clientAppID; + + /** + * The server AAD application ID. + */ + @JsonProperty(value = "serverAppID") + private String serverAppID; + + /** + * The server AAD application secret. + */ + @JsonProperty(value = "serverAppSecret") + private String serverAppSecret; + + /** + * The AAD tenant ID to use for authentication. If not specified, will use + * the tenant of the deployment subscription. + */ + @JsonProperty(value = "tenantID") + private String tenantID; + + /** + * Get whether to enable managed AAD. + * + * @return the managed value + */ + public Boolean managed() { + return this.managed; + } + + /** + * Set whether to enable managed AAD. + * + * @param managed the managed value to set + * @return the ManagedClusterAADProfile object itself. + */ + public ManagedClusterAADProfile withManaged(Boolean managed) { + this.managed = managed; + return this; + } + + /** + * Get whether to enable Azure RBAC for Kubernetes authorization. + * + * @return the enableAzureRBAC value + */ + public Boolean enableAzureRBAC() { + return this.enableAzureRBAC; + } + + /** + * Set whether to enable Azure RBAC for Kubernetes authorization. + * + * @param enableAzureRBAC the enableAzureRBAC value to set + * @return the ManagedClusterAADProfile object itself. + */ + public ManagedClusterAADProfile withEnableAzureRBAC(Boolean enableAzureRBAC) { + this.enableAzureRBAC = enableAzureRBAC; + return this; + } + + /** + * Get aAD group object IDs that will have admin role of the cluster. + * + * @return the adminGroupObjectIDs value + */ + public List adminGroupObjectIDs() { + return this.adminGroupObjectIDs; + } + + /** + * Set aAD group object IDs that will have admin role of the cluster. + * + * @param adminGroupObjectIDs the adminGroupObjectIDs value to set + * @return the ManagedClusterAADProfile object itself. + */ + public ManagedClusterAADProfile withAdminGroupObjectIDs(List adminGroupObjectIDs) { + this.adminGroupObjectIDs = adminGroupObjectIDs; + return this; + } + + /** + * Get the 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAPIServerAccessProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAPIServerAccessProfile.java new file mode 100644 index 0000000000000..ee2e42f1c9455 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAPIServerAccessProfile.java @@ -0,0 +1,96 @@ +/** + * 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.v2020_11_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; + + /** + * Private dns zone mode for private cluster. + */ + @JsonProperty(value = "privateDNSZone") + private String privateDNSZone; + + /** + * 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; + } + + /** + * Get private dns zone mode for private cluster. + * + * @return the privateDNSZone value + */ + public String privateDNSZone() { + return this.privateDNSZone; + } + + /** + * Set private dns zone mode for private cluster. + * + * @param privateDNSZone the privateDNSZone value to set + * @return the ManagedClusterAPIServerAccessProfile object itself. + */ + public ManagedClusterAPIServerAccessProfile withPrivateDNSZone(String privateDNSZone) { + this.privateDNSZone = privateDNSZone; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAccessProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAccessProfile.java new file mode 100644 index 0000000000000..437410ce3a8f0 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAddonProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAddonProfile.java new file mode 100644 index 0000000000000..5c1ed7dc1d086 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAddonProfile.java @@ -0,0 +1,85 @@ +/** + * 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.v2020_11_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; + + /** + * Information of user assigned identity used by this add-on. + */ + @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterAddonProfileIdentity identity; + + /** + * 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; + } + + /** + * Get information of user assigned identity used by this add-on. + * + * @return the identity value + */ + public ManagedClusterAddonProfileIdentity identity() { + return this.identity; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAddonProfileIdentity.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAddonProfileIdentity.java new file mode 100644 index 0000000000000..0d66f645a9ad9 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAddonProfileIdentity.java @@ -0,0 +1,16 @@ +/** + * 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.v2020_11_01; + + +/** + * Information of user assigned identity used by this add-on. + */ +public class ManagedClusterAddonProfileIdentity extends UserAssignedIdentity { +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAgentPoolProfile.java new file mode 100644 index 0000000000000..01490f49947b9 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAgentPoolProfileProperties.java new file mode 100644 index 0000000000000..18e14c8f2abbe --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAgentPoolProfileProperties.java @@ -0,0 +1,759 @@ +/** + * 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.v2020_11_01; + +import java.util.List; +import java.util.Map; +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 0 to 100 (inclusive) for user pools and in the range of + * 1 to 100 (inclusive) for system pools. The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Size of agent VMs. 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; + + /** + * OS disk type to be used for machines in a given agent pool. Allowed + * values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be + * changed after creation. Possible values include: 'Managed', 'Ephemeral'. + */ + @JsonProperty(value = "osDiskType") + private OSDiskType osDiskType; + + /** + * VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + * pods. + */ + @JsonProperty(value = "vnetSubnetID") + private String vnetSubnetID; + + /** + * Pod SubnetID specifies the VNet's subnet identifier for pods. + */ + @JsonProperty(value = "podSubnetID") + private String podSubnetID; + + /** + * Maximum number of pods that can run on a node. + */ + @JsonProperty(value = "maxPods") + private Integer maxPods; + + /** + * OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux. 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; + + /** + * AgentPoolMode represents mode of an agent pool. Possible values include: + * 'System', 'User'. + */ + @JsonProperty(value = "mode") + private AgentPoolMode mode; + + /** + * Version of orchestrator specified when creating the managed cluster. + */ + @JsonProperty(value = "orchestratorVersion") + private String orchestratorVersion; + + /** + * Version of node image. + */ + @JsonProperty(value = "nodeImageVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeImageVersion; + + /** + * Settings for upgrading the agentpool. + */ + @JsonProperty(value = "upgradeSettings") + private AgentPoolUpgradeSettings upgradeSettings; + + /** + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Describes whether the Agent Pool is Running or Stopped. + */ + @JsonProperty(value = "powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /** + * Availability zones for nodes. Must use VirtualMachineScaleSets + * AgentPoolType. + */ + @JsonProperty(value = "availabilityZones") + private List availabilityZones; + + /** + * Enable public IP for nodes. + */ + @JsonProperty(value = "enableNodePublicIP") + private Boolean enableNodePublicIP; + + /** + * ScaleSetPriority to be used to specify virtual machine scale set + * priority. Default to regular. Possible values include: 'Spot', + * 'Regular'. + */ + @JsonProperty(value = "scaleSetPriority") + private ScaleSetPriority scaleSetPriority; + + /** + * ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to Delete. Possible values include: + * 'Delete', 'Deallocate'. + */ + @JsonProperty(value = "scaleSetEvictionPolicy") + private ScaleSetEvictionPolicy scaleSetEvictionPolicy; + + /** + * SpotMaxPrice to be used to specify the maximum price you are willing to + * pay in US Dollars. Possible values are any decimal value greater than + * zero or -1 which indicates default price to be up-to on-demand. + */ + @JsonProperty(value = "spotMaxPrice") + private Double spotMaxPrice; + + /** + * Agent pool tags to be persisted on the agent pool virtual machine scale + * set. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Agent pool node labels to be persisted across all nodes in agent pool. + */ + @JsonProperty(value = "nodeLabels") + private Map nodeLabels; + + /** + * Taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule. + */ + @JsonProperty(value = "nodeTaints") + private List nodeTaints; + + /** + * The ID for Proximity Placement Group. + */ + @JsonProperty(value = "proximityPlacementGroupID") + private String proximityPlacementGroupID; + + /** + * Get number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. + * + * @param count the count value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get 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 oS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be changed after creation. Possible values include: 'Managed', 'Ephemeral'. + * + * @return the osDiskType value + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set oS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be changed after creation. Possible values include: 'Managed', 'Ephemeral'. + * + * @param osDiskType the osDiskType value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsDiskType(OSDiskType osDiskType) { + this.osDiskType = osDiskType; + return this; + } + + /** + * Get vNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @return the vnetSubnetID value + */ + public String vnetSubnetID() { + return this.vnetSubnetID; + } + + /** + * Set vNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @param vnetSubnetID the vnetSubnetID value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withVnetSubnetID(String vnetSubnetID) { + this.vnetSubnetID = vnetSubnetID; + return this; + } + + /** + * Get pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @return the podSubnetID value + */ + public String podSubnetID() { + return this.podSubnetID; + } + + /** + * Set pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @param podSubnetID the podSubnetID value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withPodSubnetID(String podSubnetID) { + this.podSubnetID = podSubnetID; + return this; + } + + /** + * Get 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 agentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User'. + * + * @return the mode value + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set agentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User'. + * + * @param mode the mode value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMode(AgentPoolMode mode) { + this.mode = mode; + 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 version of node image. + * + * @return the nodeImageVersion value + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get settings for upgrading the agentpool. + * + * @return the upgradeSettings value + */ + public AgentPoolUpgradeSettings upgradeSettings() { + return this.upgradeSettings; + } + + /** + * Set settings for upgrading the agentpool. + * + * @param upgradeSettings the upgradeSettings value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + this.upgradeSettings = upgradeSettings; + return this; + } + + /** + * Get the current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get describes whether the Agent Pool is Running or Stopped. + * + * @return the powerState value + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * Get availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * + * @return the availabilityZones value + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set 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: 'Spot', '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: 'Spot', '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 Spot 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 Spot 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 spotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + * @return the spotMaxPrice value + */ + public Double spotMaxPrice() { + return this.spotMaxPrice; + } + + /** + * Set spotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + * @param spotMaxPrice the spotMaxPrice value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withSpotMaxPrice(Double spotMaxPrice) { + this.spotMaxPrice = spotMaxPrice; + return this; + } + + /** + * Get agent pool tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set agent pool tags to be persisted on the agent pool virtual machine scale set. + * + * @param tags the tags value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get agent pool node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value + */ + public Map nodeLabels() { + return this.nodeLabels; + } + + /** + * Set agent pool node labels to be persisted across all nodes in agent pool. + * + * @param nodeLabels the nodeLabels value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withNodeLabels(Map nodeLabels) { + this.nodeLabels = nodeLabels; + return this; + } + + /** + * Get 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; + } + + /** + * Get the ID for Proximity Placement Group. + * + * @return the proximityPlacementGroupID value + */ + public String proximityPlacementGroupID() { + return this.proximityPlacementGroupID; + } + + /** + * Set the ID for Proximity Placement Group. + * + * @param proximityPlacementGroupID the proximityPlacementGroupID value to set + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withProximityPlacementGroupID(String proximityPlacementGroupID) { + this.proximityPlacementGroupID = proximityPlacementGroupID; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAutoUpgradeProfile.java new file mode 100644 index 0000000000000..852932ffbd0c8 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterAutoUpgradeProfile.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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Auto upgrade profile for a managed cluster. + */ +public class ManagedClusterAutoUpgradeProfile { + /** + * upgrade channel for auto upgrade. Possible values include: 'rapid', + * 'stable', 'patch', 'none'. + */ + @JsonProperty(value = "upgradeChannel") + private UpgradeChannel upgradeChannel; + + /** + * Get upgrade channel for auto upgrade. Possible values include: 'rapid', 'stable', 'patch', 'none'. + * + * @return the upgradeChannel value + */ + public UpgradeChannel upgradeChannel() { + return this.upgradeChannel; + } + + /** + * Set upgrade channel for auto upgrade. Possible values include: 'rapid', 'stable', 'patch', 'none'. + * + * @param upgradeChannel the upgradeChannel value to set + * @return the ManagedClusterAutoUpgradeProfile object itself. + */ + public ManagedClusterAutoUpgradeProfile withUpgradeChannel(UpgradeChannel upgradeChannel) { + this.upgradeChannel = upgradeChannel; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterIdentity.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterIdentity.java new file mode 100644 index 0000000000000..057a2f973b468 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterIdentity.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.v2020_11_01; + +import java.util.Map; +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', 'UserAssigned', 'None'. + */ + @JsonProperty(value = "type") + private ResourceIdentityType type; + + /** + * The user identity associated with the managed cluster. This identity + * will be used in control plane and only one user assigned identity is + * allowed. The user identity dictionary key references will be ARM + * resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; + + /** + * Get the 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', 'UserAssigned', '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', 'UserAssigned', 'None'. + * + * @param type the type value to set + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterIdentityUserAssignedIdentitiesValue.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterIdentityUserAssignedIdentitiesValue.java new file mode 100644 index 0000000000000..5febd73d9ff52 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterIdentityUserAssignedIdentitiesValue.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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterIdentityUserAssignedIdentitiesValue model. + */ +public class ManagedClusterIdentityUserAssignedIdentitiesValue { + /** + * The principal id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The client id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** + * Get the principal id of user assigned identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the client id of user assigned identity. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfile.java new file mode 100644 index 0000000000000..86c1550db206d --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfile.java @@ -0,0 +1,177 @@ +/** + * 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.v2020_11_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; + + /** + * Desired number of allocated SNAT ports per VM. Allowed values must be in + * the range of 0 to 64000 (inclusive). The default value is 0 which + * results in Azure dynamically allocating ports. + */ + @JsonProperty(value = "allocatedOutboundPorts") + private Integer allocatedOutboundPorts; + + /** + * Desired outbound flow idle timeout in minutes. Allowed values must be in + * the range of 4 to 120 (inclusive). The default value is 30 minutes. + */ + @JsonProperty(value = "idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /** + * Get 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; + } + + /** + * Get desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. + * + * @return the allocatedOutboundPorts value + */ + public Integer allocatedOutboundPorts() { + return this.allocatedOutboundPorts; + } + + /** + * Set desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. + * + * @param allocatedOutboundPorts the allocatedOutboundPorts value to set + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withAllocatedOutboundPorts(Integer allocatedOutboundPorts) { + this.allocatedOutboundPorts = allocatedOutboundPorts; + return this; + } + + /** + * Get desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. + * + * @return the idleTimeoutInMinutes value + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java new file mode 100644 index 0000000000000..0fe29df9baff9 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.java new file mode 100644 index 0000000000000..4c0bcf4c4cb73 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfileOutboundIPs.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterLoadBalancerProfileOutboundIPs.java new file mode 100644 index 0000000000000..008bc71d351ed --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentity.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentity.java new file mode 100644 index 0000000000000..e944e7ad25923 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentity.java @@ -0,0 +1,126 @@ +/** + * 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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterPodIdentity model. + */ +public class ManagedClusterPodIdentity { + /** + * Name of the pod identity. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Namespace of the pod identity. + */ + @JsonProperty(value = "namespace", required = true) + private String namespace; + + /** + * Information of the user assigned identity. + */ + @JsonProperty(value = "identity", required = true) + private UserAssignedIdentity identity; + + /** + * The current provisioning state of the pod identity. Possible values + * include: 'Assigned', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterPodIdentityProvisioningState provisioningState; + + /** + * The provisioningInfo property. + */ + @JsonProperty(value = "provisioningInfo", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterPodIdentityProvisioningInfo provisioningInfo; + + /** + * Get name of the pod identity. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the pod identity. + * + * @param name the name value to set + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withName(String name) { + this.name = name; + return this; + } + + /** + * Get namespace of the pod identity. + * + * @return the namespace value + */ + public String namespace() { + return this.namespace; + } + + /** + * Set namespace of the pod identity. + * + * @param namespace the namespace value to set + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get information of the user assigned identity. + * + * @return the identity value + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Set information of the user assigned identity. + * + * @param identity the identity value to set + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withIdentity(UserAssignedIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the current provisioning state of the pod identity. Possible values include: 'Assigned', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ManagedClusterPodIdentityProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningInfo value. + * + * @return the provisioningInfo value + */ + public ManagedClusterPodIdentityProvisioningInfo provisioningInfo() { + return this.provisioningInfo; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityException.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityException.java new file mode 100644 index 0000000000000..141f90d824726 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityException.java @@ -0,0 +1,96 @@ +/** + * 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.v2020_11_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterPodIdentityException model. + */ +public class ManagedClusterPodIdentityException { + /** + * Name of the pod identity exception. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Namespace of the pod identity exception. + */ + @JsonProperty(value = "namespace", required = true) + private String namespace; + + /** + * Pod labels to match. + */ + @JsonProperty(value = "podLabels", required = true) + private Map podLabels; + + /** + * Get name of the pod identity exception. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the pod identity exception. + * + * @param name the name value to set + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withName(String name) { + this.name = name; + return this; + } + + /** + * Get namespace of the pod identity exception. + * + * @return the namespace value + */ + public String namespace() { + return this.namespace; + } + + /** + * Set namespace of the pod identity exception. + * + * @param namespace the namespace value to set + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get pod labels to match. + * + * @return the podLabels value + */ + public Map podLabels() { + return this.podLabels; + } + + /** + * Set pod labels to match. + * + * @param podLabels the podLabels value to set + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withPodLabels(Map podLabels) { + this.podLabels = podLabels; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProfile.java new file mode 100644 index 0000000000000..b23a65214d632 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProfile.java @@ -0,0 +1,96 @@ +/** + * 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.v2020_11_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterPodIdentityProfile model. + */ +public class ManagedClusterPodIdentityProfile { + /** + * Whether the pod identity addon is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * User assigned pod identity settings. + */ + @JsonProperty(value = "userAssignedIdentities") + private List userAssignedIdentities; + + /** + * User assigned pod identity exception settings. + */ + @JsonProperty(value = "userAssignedIdentityExceptions") + private List userAssignedIdentityExceptions; + + /** + * Get whether the pod identity addon is enabled. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set whether the pod identity addon is enabled. + * + * @param enabled the enabled value to set + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get user assigned pod identity settings. + * + * @return the userAssignedIdentities value + */ + public List userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set user assigned pod identity settings. + * + * @param userAssignedIdentities the userAssignedIdentities value to set + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withUserAssignedIdentities(List userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Get user assigned pod identity exception settings. + * + * @return the userAssignedIdentityExceptions value + */ + public List userAssignedIdentityExceptions() { + return this.userAssignedIdentityExceptions; + } + + /** + * Set user assigned pod identity exception settings. + * + * @param userAssignedIdentityExceptions the userAssignedIdentityExceptions value to set + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withUserAssignedIdentityExceptions(List userAssignedIdentityExceptions) { + this.userAssignedIdentityExceptions = userAssignedIdentityExceptions; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProvisioningInfo.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProvisioningInfo.java new file mode 100644 index 0000000000000..ee2ace202a52a --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProvisioningInfo.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.v2020_11_01; + +import com.microsoft.rest.CloudError; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterPodIdentityProvisioningInfo model. + */ +public class ManagedClusterPodIdentityProvisioningInfo { + /** + * Pod identity assignment error (if any). + */ + @JsonProperty(value = "error") + private CloudError error; + + /** + * Get pod identity assignment error (if any). + * + * @return the error value + */ + public CloudError error() { + return this.error; + } + + /** + * Set pod identity assignment error (if any). + * + * @param error the error value to set + * @return the ManagedClusterPodIdentityProvisioningInfo object itself. + */ + public ManagedClusterPodIdentityProvisioningInfo withError(CloudError error) { + this.error = error; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProvisioningState.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProvisioningState.java new file mode 100644 index 0000000000000..d8eea0b8c70b6 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPodIdentityProvisioningState.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ManagedClusterPodIdentityProvisioningState. + */ +public final class ManagedClusterPodIdentityProvisioningState extends ExpandableStringEnum { + /** Static value Assigned for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState ASSIGNED = fromString("Assigned"); + + /** Static value Updating for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for ManagedClusterPodIdentityProvisioningState. */ + public static final ManagedClusterPodIdentityProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a ManagedClusterPodIdentityProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ManagedClusterPodIdentityProvisioningState + */ + @JsonCreator + public static ManagedClusterPodIdentityProvisioningState fromString(String name) { + return fromString(name, ManagedClusterPodIdentityProvisioningState.class); + } + + /** + * @return known ManagedClusterPodIdentityProvisioningState values + */ + public static Collection values() { + return values(ManagedClusterPodIdentityProvisioningState.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPoolUpgradeProfile.java new file mode 100644 index 0000000000000..d971e5acd7a36 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPoolUpgradeProfileUpgradesItem.java new file mode 100644 index 0000000000000..4e5bb0155b3c1 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPropertiesAutoScalerProfile.java new file mode 100644 index 0000000000000..878bc95b8a5a7 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPropertiesAutoScalerProfile.java @@ -0,0 +1,433 @@ +/** + * 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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters to be applied to the cluster-autoscaler when enabled. + */ +public class ManagedClusterPropertiesAutoScalerProfile { + /** + * The balanceSimilarNodeGroups property. + */ + @JsonProperty(value = "balance-similar-node-groups") + private String balanceSimilarNodeGroups; + + /** + * Possible values include: 'least-waste', 'most-pods', 'random'. + */ + @JsonProperty(value = "expander") + private Expander expander; + + /** + * The maxEmptyBulkDelete property. + */ + @JsonProperty(value = "max-empty-bulk-delete") + private String maxEmptyBulkDelete; + + /** + * The maxGracefulTerminationSec property. + */ + @JsonProperty(value = "max-graceful-termination-sec") + private String maxGracefulTerminationSec; + + /** + * The maxTotalUnreadyPercentage property. + */ + @JsonProperty(value = "max-total-unready-percentage") + private String maxTotalUnreadyPercentage; + + /** + * The newPodScaleUpDelay property. + */ + @JsonProperty(value = "new-pod-scale-up-delay") + private String newPodScaleUpDelay; + + /** + * The okTotalUnreadyCount property. + */ + @JsonProperty(value = "ok-total-unready-count") + private String okTotalUnreadyCount; + + /** + * The scanInterval property. + */ + @JsonProperty(value = "scan-interval") + private String scanInterval; + + /** + * The scaleDownDelayAfterAdd property. + */ + @JsonProperty(value = "scale-down-delay-after-add") + private String scaleDownDelayAfterAdd; + + /** + * The scaleDownDelayAfterDelete property. + */ + @JsonProperty(value = "scale-down-delay-after-delete") + private String scaleDownDelayAfterDelete; + + /** + * The scaleDownDelayAfterFailure property. + */ + @JsonProperty(value = "scale-down-delay-after-failure") + private String scaleDownDelayAfterFailure; + + /** + * The scaleDownUnneededTime property. + */ + @JsonProperty(value = "scale-down-unneeded-time") + private String scaleDownUnneededTime; + + /** + * The scaleDownUnreadyTime property. + */ + @JsonProperty(value = "scale-down-unready-time") + private String scaleDownUnreadyTime; + + /** + * The scaleDownUtilizationThreshold property. + */ + @JsonProperty(value = "scale-down-utilization-threshold") + private String scaleDownUtilizationThreshold; + + /** + * The skipNodesWithLocalStorage property. + */ + @JsonProperty(value = "skip-nodes-with-local-storage") + private String skipNodesWithLocalStorage; + + /** + * The skipNodesWithSystemPods property. + */ + @JsonProperty(value = "skip-nodes-with-system-pods") + private String skipNodesWithSystemPods; + + /** + * Get the balanceSimilarNodeGroups value. + * + * @return the balanceSimilarNodeGroups value + */ + public String balanceSimilarNodeGroups() { + return this.balanceSimilarNodeGroups; + } + + /** + * Set the balanceSimilarNodeGroups value. + * + * @param balanceSimilarNodeGroups the balanceSimilarNodeGroups value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withBalanceSimilarNodeGroups(String balanceSimilarNodeGroups) { + this.balanceSimilarNodeGroups = balanceSimilarNodeGroups; + return this; + } + + /** + * Get possible values include: 'least-waste', 'most-pods', 'random'. + * + * @return the expander value + */ + public Expander expander() { + return this.expander; + } + + /** + * Set possible values include: 'least-waste', 'most-pods', 'random'. + * + * @param expander the expander value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withExpander(Expander expander) { + this.expander = expander; + return this; + } + + /** + * Get the maxEmptyBulkDelete value. + * + * @return the maxEmptyBulkDelete value + */ + public String maxEmptyBulkDelete() { + return this.maxEmptyBulkDelete; + } + + /** + * Set the maxEmptyBulkDelete value. + * + * @param maxEmptyBulkDelete the maxEmptyBulkDelete value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxEmptyBulkDelete(String maxEmptyBulkDelete) { + this.maxEmptyBulkDelete = maxEmptyBulkDelete; + return this; + } + + /** + * Get the maxGracefulTerminationSec value. + * + * @return the maxGracefulTerminationSec value + */ + public String maxGracefulTerminationSec() { + return this.maxGracefulTerminationSec; + } + + /** + * Set the maxGracefulTerminationSec value. + * + * @param maxGracefulTerminationSec the maxGracefulTerminationSec value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxGracefulTerminationSec(String maxGracefulTerminationSec) { + this.maxGracefulTerminationSec = maxGracefulTerminationSec; + return this; + } + + /** + * Get the maxTotalUnreadyPercentage value. + * + * @return the maxTotalUnreadyPercentage value + */ + public String maxTotalUnreadyPercentage() { + return this.maxTotalUnreadyPercentage; + } + + /** + * Set the maxTotalUnreadyPercentage value. + * + * @param maxTotalUnreadyPercentage the maxTotalUnreadyPercentage value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxTotalUnreadyPercentage(String maxTotalUnreadyPercentage) { + this.maxTotalUnreadyPercentage = maxTotalUnreadyPercentage; + return this; + } + + /** + * Get the newPodScaleUpDelay value. + * + * @return the newPodScaleUpDelay value + */ + public String newPodScaleUpDelay() { + return this.newPodScaleUpDelay; + } + + /** + * Set the newPodScaleUpDelay value. + * + * @param newPodScaleUpDelay the newPodScaleUpDelay value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withNewPodScaleUpDelay(String newPodScaleUpDelay) { + this.newPodScaleUpDelay = newPodScaleUpDelay; + return this; + } + + /** + * Get the okTotalUnreadyCount value. + * + * @return the okTotalUnreadyCount value + */ + public String okTotalUnreadyCount() { + return this.okTotalUnreadyCount; + } + + /** + * Set the okTotalUnreadyCount value. + * + * @param okTotalUnreadyCount the okTotalUnreadyCount value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withOkTotalUnreadyCount(String okTotalUnreadyCount) { + this.okTotalUnreadyCount = okTotalUnreadyCount; + return this; + } + + /** + * Get the scanInterval value. + * + * @return the scanInterval value + */ + public String scanInterval() { + return this.scanInterval; + } + + /** + * Set the scanInterval value. + * + * @param scanInterval the scanInterval value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScanInterval(String scanInterval) { + this.scanInterval = scanInterval; + return this; + } + + /** + * Get the scaleDownDelayAfterAdd value. + * + * @return the scaleDownDelayAfterAdd value + */ + public String scaleDownDelayAfterAdd() { + return this.scaleDownDelayAfterAdd; + } + + /** + * Set the scaleDownDelayAfterAdd value. + * + * @param scaleDownDelayAfterAdd the scaleDownDelayAfterAdd value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterAdd(String scaleDownDelayAfterAdd) { + this.scaleDownDelayAfterAdd = scaleDownDelayAfterAdd; + return this; + } + + /** + * Get the scaleDownDelayAfterDelete value. + * + * @return the scaleDownDelayAfterDelete value + */ + public String scaleDownDelayAfterDelete() { + return this.scaleDownDelayAfterDelete; + } + + /** + * Set the scaleDownDelayAfterDelete value. + * + * @param scaleDownDelayAfterDelete the scaleDownDelayAfterDelete value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterDelete(String scaleDownDelayAfterDelete) { + this.scaleDownDelayAfterDelete = scaleDownDelayAfterDelete; + return this; + } + + /** + * Get the scaleDownDelayAfterFailure value. + * + * @return the scaleDownDelayAfterFailure value + */ + public String scaleDownDelayAfterFailure() { + return this.scaleDownDelayAfterFailure; + } + + /** + * Set the scaleDownDelayAfterFailure value. + * + * @param scaleDownDelayAfterFailure the scaleDownDelayAfterFailure value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterFailure(String scaleDownDelayAfterFailure) { + this.scaleDownDelayAfterFailure = scaleDownDelayAfterFailure; + return this; + } + + /** + * Get the scaleDownUnneededTime value. + * + * @return the scaleDownUnneededTime value + */ + public String scaleDownUnneededTime() { + return this.scaleDownUnneededTime; + } + + /** + * Set the scaleDownUnneededTime value. + * + * @param scaleDownUnneededTime the scaleDownUnneededTime value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnneededTime(String scaleDownUnneededTime) { + this.scaleDownUnneededTime = scaleDownUnneededTime; + return this; + } + + /** + * Get the scaleDownUnreadyTime value. + * + * @return the scaleDownUnreadyTime value + */ + public String scaleDownUnreadyTime() { + return this.scaleDownUnreadyTime; + } + + /** + * Set the scaleDownUnreadyTime value. + * + * @param scaleDownUnreadyTime the scaleDownUnreadyTime value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnreadyTime(String scaleDownUnreadyTime) { + this.scaleDownUnreadyTime = scaleDownUnreadyTime; + return this; + } + + /** + * Get the scaleDownUtilizationThreshold value. + * + * @return the scaleDownUtilizationThreshold value + */ + public String scaleDownUtilizationThreshold() { + return this.scaleDownUtilizationThreshold; + } + + /** + * Set the scaleDownUtilizationThreshold value. + * + * @param scaleDownUtilizationThreshold the scaleDownUtilizationThreshold value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownUtilizationThreshold(String scaleDownUtilizationThreshold) { + this.scaleDownUtilizationThreshold = scaleDownUtilizationThreshold; + return this; + } + + /** + * Get the skipNodesWithLocalStorage value. + * + * @return the skipNodesWithLocalStorage value + */ + public String skipNodesWithLocalStorage() { + return this.skipNodesWithLocalStorage; + } + + /** + * Set the skipNodesWithLocalStorage value. + * + * @param skipNodesWithLocalStorage the skipNodesWithLocalStorage value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithLocalStorage(String skipNodesWithLocalStorage) { + this.skipNodesWithLocalStorage = skipNodesWithLocalStorage; + return this; + } + + /** + * Get the skipNodesWithSystemPods value. + * + * @return the skipNodesWithSystemPods value + */ + public String skipNodesWithSystemPods() { + return this.skipNodesWithSystemPods; + } + + /** + * Set the skipNodesWithSystemPods value. + * + * @param skipNodesWithSystemPods the skipNodesWithSystemPods value to set + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithSystemPods(String skipNodesWithSystemPods) { + this.skipNodesWithSystemPods = skipNodesWithSystemPods; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPropertiesIdentityProfileValue.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPropertiesIdentityProfileValue.java new file mode 100644 index 0000000000000..bddd47a51df12 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterPropertiesIdentityProfileValue.java @@ -0,0 +1,16 @@ +/** + * 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.v2020_11_01; + + +/** + * The ManagedClusterPropertiesIdentityProfileValue model. + */ +public class ManagedClusterPropertiesIdentityProfileValue extends UserAssignedIdentity { +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKU.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKU.java new file mode 100644 index 0000000000000..e9da9be61f379 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKU.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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterSKU model. + */ +public class ManagedClusterSKU { + /** + * Name of a managed cluster SKU. Possible values include: 'Basic'. + */ + @JsonProperty(value = "name") + private ManagedClusterSKUName name; + + /** + * Tier of a managed cluster SKU. Possible values include: 'Paid', 'Free'. + */ + @JsonProperty(value = "tier") + private ManagedClusterSKUTier tier; + + /** + * Get name of a managed cluster SKU. Possible values include: 'Basic'. + * + * @return the name value + */ + public ManagedClusterSKUName name() { + return this.name; + } + + /** + * Set name of a managed cluster SKU. Possible values include: 'Basic'. + * + * @param name the name value to set + * @return the ManagedClusterSKU object itself. + */ + public ManagedClusterSKU withName(ManagedClusterSKUName name) { + this.name = name; + return this; + } + + /** + * Get tier of a managed cluster SKU. Possible values include: 'Paid', 'Free'. + * + * @return the tier value + */ + public ManagedClusterSKUTier tier() { + return this.tier; + } + + /** + * Set tier of a managed cluster SKU. Possible values include: 'Paid', 'Free'. + * + * @param tier the tier value to set + * @return the ManagedClusterSKU object itself. + */ + public ManagedClusterSKU withTier(ManagedClusterSKUTier tier) { + this.tier = tier; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKUName.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKUName.java new file mode 100644 index 0000000000000..8060cb99b8f53 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKUName.java @@ -0,0 +1,38 @@ +/** + * 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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ManagedClusterSKUName. + */ +public final class ManagedClusterSKUName extends ExpandableStringEnum { + /** Static value Basic for ManagedClusterSKUName. */ + public static final ManagedClusterSKUName BASIC = fromString("Basic"); + + /** + * Creates or finds a ManagedClusterSKUName from its string representation. + * @param name a name to look for + * @return the corresponding ManagedClusterSKUName + */ + @JsonCreator + public static ManagedClusterSKUName fromString(String name) { + return fromString(name, ManagedClusterSKUName.class); + } + + /** + * @return known ManagedClusterSKUName values + */ + public static Collection values() { + return values(ManagedClusterSKUName.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKUTier.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKUTier.java new file mode 100644 index 0000000000000..4d779c143be58 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterSKUTier.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ManagedClusterSKUTier. + */ +public final class ManagedClusterSKUTier extends ExpandableStringEnum { + /** Static value Paid for ManagedClusterSKUTier. */ + public static final ManagedClusterSKUTier PAID = fromString("Paid"); + + /** Static value Free for ManagedClusterSKUTier. */ + public static final ManagedClusterSKUTier FREE = fromString("Free"); + + /** + * Creates or finds a ManagedClusterSKUTier from its string representation. + * @param name a name to look for + * @return the corresponding ManagedClusterSKUTier + */ + @JsonCreator + public static ManagedClusterSKUTier fromString(String name) { + return fromString(name, ManagedClusterSKUTier.class); + } + + /** + * @return known ManagedClusterSKUTier values + */ + public static Collection values() { + return values(ManagedClusterSKUTier.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterServicePrincipalProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterServicePrincipalProfile.java new file mode 100644 index 0000000000000..1c84173349f22 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterUpgradeProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterUpgradeProfile.java new file mode 100644 index 0000000000000..615461ba8249c --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterWindowsProfile.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterWindowsProfile.java new file mode 100644 index 0000000000000..5dfe82c25ad23 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusterWindowsProfile.java @@ -0,0 +1,112 @@ +/** + * 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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for Windows VMs in the container service cluster. + */ +public class ManagedClusterWindowsProfile { + /** + * Specifies the name of the administrator account. <br><br> + * **restriction:** Cannot end in "." <br><br> **Disallowed + * values:** "administrator", "admin", "user", "user1", "test", "user2", + * "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", + * "aspnet", "backup", "console", "david", "guest", "john", "owner", + * "root", "server", "sql", "support", "support_388945a0", "sys", "test2", + * "test3", "user4", "user5". <br><br> **Minimum-length:** 1 + * character <br><br> **Max-length:** 20 characters. + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /** + * Specifies the password of the administrator account. + * <br><br> **Minimum-length:** 8 characters + * <br><br> **Max-length:** 123 characters <br><br> + * **Complexity requirements:** 3 out of 4 conditions below need to be + * fulfilled <br> Has lower characters <br>Has upper characters + * <br> Has a digit <br> Has a special character (Regex match + * [\W_]) <br><br> **Disallowed values:** "abc@123", + * "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", + * "Password!", "Password1", "Password22", "iloveyou!". + */ + @JsonProperty(value = "adminPassword") + private String adminPassword; + + /** + * The licenseType to use for Windows VMs. Windows_Server is used to enable + * Azure Hybrid User Benefits for Windows VMs. Possible values include: + * 'None', 'Windows_Server'. + */ + @JsonProperty(value = "licenseType") + private LicenseType licenseType; + + /** + * Get specifies the name of the administrator account. <br><br> **restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length:** 1 character <br><br> **Max-length:** 20 characters. + * + * @return the adminUsername value + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set specifies the name of the administrator account. <br><br> **restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length:** 1 character <br><br> **Max-length:** 20 characters. + * + * @param adminUsername the adminUsername value to set + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get specifies the password of the administrator account. <br><br> **Minimum-length:** 8 characters <br><br> **Max-length:** 123 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + * + * @return the adminPassword value + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set specifies the password of the administrator account. <br><br> **Minimum-length:** 8 characters <br><br> **Max-length:** 123 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + * + * @param adminPassword the adminPassword value to set + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + + /** + * Get the licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. Possible values include: 'None', 'Windows_Server'. + * + * @return the licenseType value + */ + public LicenseType licenseType() { + return this.licenseType; + } + + /** + * Set the licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. Possible values include: 'None', 'Windows_Server'. + * + * @param licenseType the licenseType value to set + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withLicenseType(LicenseType licenseType) { + this.licenseType = licenseType; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusters.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusters.java new file mode 100644 index 0000000000000..5f7c383b4793e --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ManagedClusters.java @@ -0,0 +1,139 @@ +/** + * 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.v2020_11_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.v2020_11_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); + + /** + * Stop Managed Cluster. + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable stopAsync(String resourceGroupName, String resourceName); + + /** + * Start Managed Cluster. + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable startAsync(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. **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) . + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAccessProfileAsync(String resourceGroupName, String resourceName, String roleName); + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/NetworkMode.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/NetworkMode.java new file mode 100644 index 0000000000000..5f6ff79cc32a9 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/NetworkMode.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NetworkMode. + */ +public final class NetworkMode extends ExpandableStringEnum { + /** Static value transparent for NetworkMode. */ + public static final NetworkMode TRANSPARENT = fromString("transparent"); + + /** Static value bridge for NetworkMode. */ + public static final NetworkMode BRIDGE = fromString("bridge"); + + /** + * Creates or finds a NetworkMode from its string representation. + * @param name a name to look for + * @return the corresponding NetworkMode + */ + @JsonCreator + public static NetworkMode fromString(String name) { + return fromString(name, NetworkMode.class); + } + + /** + * @return known NetworkMode values + */ + public static Collection values() { + return values(NetworkMode.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/NetworkPlugin.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/NetworkPlugin.java new file mode 100644 index 0000000000000..6749e634b8f73 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/NetworkPolicy.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/NetworkPolicy.java new file mode 100644 index 0000000000000..bb8025532b7e4 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OSDiskType.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OSDiskType.java new file mode 100644 index 0000000000000..352f9ed5034d1 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OSDiskType.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OSDiskType. + */ +public final class OSDiskType extends ExpandableStringEnum { + /** Static value Managed for OSDiskType. */ + public static final OSDiskType MANAGED = fromString("Managed"); + + /** Static value Ephemeral for OSDiskType. */ + public static final OSDiskType EPHEMERAL = fromString("Ephemeral"); + + /** + * Creates or finds a OSDiskType from its string representation. + * @param name a name to look for + * @return the corresponding OSDiskType + */ + @JsonCreator + public static OSDiskType fromString(String name) { + return fromString(name, OSDiskType.class); + } + + /** + * @return known OSDiskType values + */ + public static Collection values() { + return values(OSDiskType.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OSType.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OSType.java new file mode 100644 index 0000000000000..7385f97097056 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OperationValue.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OperationValue.java new file mode 100644 index 0000000000000..f6a177b029e36 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/Operations.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/Operations.java new file mode 100644 index 0000000000000..b410f52f96b15 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01; + +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OutboundType.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OutboundType.java new file mode 100644 index 0000000000000..c21ab018812ef --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/OutboundType.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OutboundType. + */ +public final class OutboundType extends ExpandableStringEnum { + /** Static value loadBalancer for OutboundType. */ + public static final OutboundType LOAD_BALANCER = fromString("loadBalancer"); + + /** Static value userDefinedRouting for OutboundType. */ + public static final OutboundType USER_DEFINED_ROUTING = fromString("userDefinedRouting"); + + /** + * Creates or finds a OutboundType from its string representation. + * @param name a name to look for + * @return the corresponding OutboundType + */ + @JsonCreator + public static OutboundType fromString(String name) { + return fromString(name, OutboundType.class); + } + + /** + * @return known OutboundType values + */ + public static Collection values() { + return values(OutboundType.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PowerState.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PowerState.java new file mode 100644 index 0000000000000..5f78c58fe3549 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PowerState.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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the Power State of the cluster. + */ +public class PowerState { + /** + * Tells whether the cluster is Running or Stopped. Possible values + * include: 'Running', 'Stopped'. + */ + @JsonProperty(value = "code") + private Code code; + + /** + * Get tells whether the cluster is Running or Stopped. Possible values include: 'Running', 'Stopped'. + * + * @return the code value + */ + public Code code() { + return this.code; + } + + /** + * Set tells whether the cluster is Running or Stopped. Possible values include: 'Running', 'Stopped'. + * + * @param code the code value to set + * @return the PowerState object itself. + */ + public PowerState withCode(Code code) { + this.code = code; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpoint.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpoint.java new file mode 100644 index 0000000000000..8c686db48923a --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpoint.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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Private endpoint which a connection belongs to. + */ +public class PrivateEndpoint { + /** + * The resource Id for private endpoint. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the resource Id for private endpoint. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the resource Id for private endpoint. + * + * @param id the id value to set + * @return the PrivateEndpoint object itself. + */ + public PrivateEndpoint withId(String id) { + this.id = id; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnection.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnection.java new file mode 100644 index 0000000000000..ea9b49bf49d58 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnection.java @@ -0,0 +1,77 @@ +/** + * 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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateEndpointConnectionInner; +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.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; + +/** + * Type representing PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithPrivateEndpoint { + } + + /** + * Grouping of PrivateEndpointConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the privateendpointconnection update allowing to specify PrivateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies privateEndpoint. + * @param privateEndpoint The resource of private endpoint + * @return the next update stage + */ + Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnectionListResult.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnectionListResult.java new file mode 100644 index 0000000000000..b5f48b76a4c30 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnectionListResult.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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateEndpointConnectionListResultInner; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateEndpointConnectionInner; +import java.util.List; + +/** + * Type representing PrivateEndpointConnectionListResult. + */ +public interface PrivateEndpointConnectionListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnectionProvisioningState.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 0000000000000..1fa36b7fa3e97 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnectionProvisioningState.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + */ +public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding PrivateEndpointConnectionProvisioningState + */ + @JsonCreator + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** + * @return known PrivateEndpointConnectionProvisioningState values + */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnections.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnections.java new file mode 100644 index 0000000000000..644fe213b7216 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateEndpointConnections.java @@ -0,0 +1,55 @@ +/** + * 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.v2020_11_01; + +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateEndpointConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PrivateEndpointConnections. + */ +public interface PrivateEndpointConnections extends HasInner { + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String resourceName); + + /** + * Gets the private endpoint connection. + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResource.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResource.java new file mode 100644 index 0000000000000..6729e52d5f8d1 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResource.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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateLinkResourceInner; +import java.util.List; + +/** + * Type representing PrivateLinkResource. + */ +public interface PrivateLinkResource extends HasInner, HasManager { + /** + * @return the groupId value. + */ + String groupId(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privateLinkServiceID value. + */ + String privateLinkServiceID(); + + /** + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResources.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResources.java new file mode 100644 index 0000000000000..8109d442a6ebd --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResources.java @@ -0,0 +1,30 @@ +/** + * 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.v2020_11_01; + +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateLinkResourcesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PrivateLinkResources. + */ +public interface PrivateLinkResources extends HasInner { + /** + * Gets a list of private link resources in the specified managed cluster. + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each private link resource. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String resourceName); + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResourcesListResult.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResourcesListResult.java new file mode 100644 index 0000000000000..82f4bb488728d --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkResourcesListResult.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.v2020_11_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ContainerServiceManager; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateLinkResourcesListResultInner; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateLinkResourceInner; +import java.util.List; + +/** + * Type representing PrivateLinkResourcesListResult. + */ +public interface PrivateLinkResourcesListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkServiceConnectionState.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkServiceConnectionState.java new file mode 100644 index 0000000000000..77291197c50c6 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/PrivateLinkServiceConnectionState.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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The state of a private link service connection. + */ +public class PrivateLinkServiceConnectionState { + /** + * The private link service connection status. Possible values include: + * 'Pending', 'Approved', 'Rejected', 'Disconnected'. + */ + @JsonProperty(value = "status") + private ConnectionStatus status; + + /** + * The private link service connection description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the private link service connection status. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'. + * + * @return the status value + */ + public ConnectionStatus status() { + return this.status; + } + + /** + * Set the private link service connection status. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'. + * + * @param status the status value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(ConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the private link service connection description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the private link service connection description. + * + * @param description the description value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ResolvePrivateLinkServiceIds.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ResolvePrivateLinkServiceIds.java new file mode 100644 index 0000000000000..bf8a511c5ac6b --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ResolvePrivateLinkServiceIds.java @@ -0,0 +1,32 @@ +/** + * 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.v2020_11_01; + +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.PrivateLinkResourceInner; +import com.microsoft.azure.management.containerservice.v2020_11_01.implementation.ResolvePrivateLinkServiceIdsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ResolvePrivateLinkServiceIds. + */ +public interface ResolvePrivateLinkServiceIds extends HasInner { + /** + * Gets the private link service ID for the specified managed cluster. + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable pOSTAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ResourceIdentityType.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ResourceIdentityType.java new file mode 100644 index 0000000000000..3d5f6a49838a7 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ResourceIdentityType.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.v2020_11_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 UserAssigned. */ + USER_ASSIGNED("UserAssigned"), + + /** 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ResourceReference.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ResourceReference.java new file mode 100644 index 0000000000000..862162874f439 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ScaleSetEvictionPolicy.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ScaleSetEvictionPolicy.java new file mode 100644 index 0000000000000..40a7116d87843 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ScaleSetPriority.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/ScaleSetPriority.java new file mode 100644 index 0000000000000..4ee19720ea324 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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 Spot for ScaleSetPriority. */ + public static final ScaleSetPriority SPOT = fromString("Spot"); + + /** Static value Regular for ScaleSetPriority. */ + public static final ScaleSetPriority REGULAR = fromString("Regular"); + + /** + * Creates or finds a ScaleSetPriority from its string representation. + * @param name a name to look for + * @return the corresponding ScaleSetPriority + */ + @JsonCreator + public static ScaleSetPriority fromString(String name) { + return fromString(name, ScaleSetPriority.class); + } + + /** + * @return known ScaleSetPriority values + */ + public static Collection values() { + return values(ScaleSetPriority.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/TagsObject.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/TagsObject.java new file mode 100644 index 0000000000000..cdc39dc179381 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/UpgradeChannel.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/UpgradeChannel.java new file mode 100644 index 0000000000000..ef4b671869d22 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/UpgradeChannel.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.v2020_11_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for UpgradeChannel. + */ +public final class UpgradeChannel extends ExpandableStringEnum { + /** Static value rapid for UpgradeChannel. */ + public static final UpgradeChannel RAPID = fromString("rapid"); + + /** Static value stable for UpgradeChannel. */ + public static final UpgradeChannel STABLE = fromString("stable"); + + /** Static value patch for UpgradeChannel. */ + public static final UpgradeChannel PATCH = fromString("patch"); + + /** Static value none for UpgradeChannel. */ + public static final UpgradeChannel NONE = fromString("none"); + + /** + * Creates or finds a UpgradeChannel from its string representation. + * @param name a name to look for + * @return the corresponding UpgradeChannel + */ + @JsonCreator + public static UpgradeChannel fromString(String name) { + return fromString(name, UpgradeChannel.class); + } + + /** + * @return known UpgradeChannel values + */ + public static Collection values() { + return values(UpgradeChannel.class); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/UserAssignedIdentity.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/UserAssignedIdentity.java new file mode 100644 index 0000000000000..947ca5d1484d7 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/UserAssignedIdentity.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.v2020_11_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The UserAssignedIdentity model. + */ +public class UserAssignedIdentity { + /** + * The resource id of the user assigned identity. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * The client id of the user assigned identity. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /** + * The object id of the user assigned identity. + */ + @JsonProperty(value = "objectId") + private String objectId; + + /** + * Get the resource id of the user assigned identity. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resource id of the user assigned identity. + * + * @param resourceId the resourceId value to set + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the client id of the user assigned identity. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the client id of the user assigned identity. + * + * @param clientId the clientId value to set + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the object id of the user assigned identity. + * + * @return the objectId value + */ + public String objectId() { + return this.objectId; + } + + /** + * Set the object id of the user assigned identity. + * + * @param objectId the objectId value to set + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withObjectId(String objectId) { + this.objectId = objectId; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolAvailableVersionsImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolAvailableVersionsImpl.java new file mode 100644 index 0000000000000..5f0af701e7f17 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolAvailableVersions; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolAvailableVersionsInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolAvailableVersionsInner.java new file mode 100644 index 0000000000000..21c680df6fecc --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolImpl.java new file mode 100644 index 0000000000000..95e0778788d16 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolImpl.java @@ -0,0 +1,384 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPool; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.ContainerServiceVMSizeTypes; +import com.microsoft.azure.management.containerservice.v2020_11_01.OSDiskType; +import com.microsoft.azure.management.containerservice.v2020_11_01.OSType; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolType; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolMode; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolUpgradeSettings; +import com.microsoft.azure.management.containerservice.v2020_11_01.PowerState; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_01.ScaleSetPriority; +import com.microsoft.azure.management.containerservice.v2020_11_01.ScaleSetEvictionPolicy; +import java.util.Map; + +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 AgentPoolMode mode() { + return this.inner().mode(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String nodeImageVersion() { + return this.inner().nodeImageVersion(); + } + + @Override + public Map nodeLabels() { + return this.inner().nodeLabels(); + } + + @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 OSDiskType osDiskType() { + return this.inner().osDiskType(); + } + + @Override + public OSType osType() { + return this.inner().osType(); + } + + @Override + public String podSubnetID() { + return this.inner().podSubnetID(); + } + + @Override + public PowerState powerState() { + return this.inner().powerState(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String proximityPlacementGroupID() { + return this.inner().proximityPlacementGroupID(); + } + + @Override + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.inner().scaleSetEvictionPolicy(); + } + + @Override + public ScaleSetPriority scaleSetPriority() { + return this.inner().scaleSetPriority(); + } + + @Override + public Double spotMaxPrice() { + return this.inner().spotMaxPrice(); + } + + @Override + public Map tags() { + return this.inner().tags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public AgentPoolUpgradeSettings upgradeSettings() { + return this.inner().upgradeSettings(); + } + + @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 withMode(AgentPoolMode mode) { + this.inner().withMode(mode); + return this; + } + + @Override + public AgentPoolImpl withNodeLabels(Map nodeLabels) { + this.inner().withNodeLabels(nodeLabels); + 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 withOsDiskType(OSDiskType osDiskType) { + this.inner().withOsDiskType(osDiskType); + return this; + } + + @Override + public AgentPoolImpl withOsType(OSType osType) { + this.inner().withOsType(osType); + return this; + } + + @Override + public AgentPoolImpl withPodSubnetID(String podSubnetID) { + this.inner().withPodSubnetID(podSubnetID); + return this; + } + + @Override + public AgentPoolImpl withProximityPlacementGroupID(String proximityPlacementGroupID) { + this.inner().withProximityPlacementGroupID(proximityPlacementGroupID); + 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 withSpotMaxPrice(Double spotMaxPrice) { + this.inner().withSpotMaxPrice(spotMaxPrice); + return this; + } + + @Override + public AgentPoolImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public AgentPoolImpl withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + this.inner().withUpgradeSettings(upgradeSettings); + 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolInner.java new file mode 100644 index 0000000000000..ebc9f409b67f2 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolInner.java @@ -0,0 +1,802 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.ContainerServiceVMSizeTypes; +import com.microsoft.azure.management.containerservice.v2020_11_01.OSDiskType; +import com.microsoft.azure.management.containerservice.v2020_11_01.OSType; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolType; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolMode; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolUpgradeSettings; +import com.microsoft.azure.management.containerservice.v2020_11_01.PowerState; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_01.ScaleSetPriority; +import com.microsoft.azure.management.containerservice.v2020_11_01.ScaleSetEvictionPolicy; +import java.util.Map; +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 0 to 100 (inclusive) for user pools and in the range of + * 1 to 100 (inclusive) for system pools. The default value is 1. + */ + @JsonProperty(value = "properties.count") + private Integer count; + + /** + * Size of agent VMs. 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; + + /** + * OS disk type to be used for machines in a given agent pool. Allowed + * values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be + * changed after creation. Possible values include: 'Managed', 'Ephemeral'. + */ + @JsonProperty(value = "properties.osDiskType") + private OSDiskType osDiskType; + + /** + * VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + * pods. + */ + @JsonProperty(value = "properties.vnetSubnetID") + private String vnetSubnetID; + + /** + * Pod SubnetID specifies the VNet's subnet identifier for pods. + */ + @JsonProperty(value = "properties.podSubnetID") + private String podSubnetID; + + /** + * Maximum number of pods that can run on a node. + */ + @JsonProperty(value = "properties.maxPods") + private Integer maxPods; + + /** + * OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux. 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; + + /** + * AgentPoolMode represents mode of an agent pool. Possible values include: + * 'System', 'User'. + */ + @JsonProperty(value = "properties.mode") + private AgentPoolMode mode; + + /** + * Version of orchestrator specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.orchestratorVersion") + private String orchestratorVersion; + + /** + * Version of node image. + */ + @JsonProperty(value = "properties.nodeImageVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeImageVersion; + + /** + * Settings for upgrading the agentpool. + */ + @JsonProperty(value = "properties.upgradeSettings") + private AgentPoolUpgradeSettings upgradeSettings; + + /** + * The current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Describes whether the Agent Pool is Running or Stopped. + */ + @JsonProperty(value = "properties.powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /** + * Availability zones for nodes. Must use VirtualMachineScaleSets + * AgentPoolType. + */ + @JsonProperty(value = "properties.availabilityZones") + private List availabilityZones; + + /** + * Enable public IP for nodes. + */ + @JsonProperty(value = "properties.enableNodePublicIP") + private Boolean enableNodePublicIP; + + /** + * ScaleSetPriority to be used to specify virtual machine scale set + * priority. Default to regular. Possible values include: 'Spot', + * 'Regular'. + */ + @JsonProperty(value = "properties.scaleSetPriority") + private ScaleSetPriority scaleSetPriority; + + /** + * ScaleSetEvictionPolicy to be used to specify eviction policy for Spot + * virtual machine scale set. Default to Delete. Possible values include: + * 'Delete', 'Deallocate'. + */ + @JsonProperty(value = "properties.scaleSetEvictionPolicy") + private ScaleSetEvictionPolicy scaleSetEvictionPolicy; + + /** + * SpotMaxPrice to be used to specify the maximum price you are willing to + * pay in US Dollars. Possible values are any decimal value greater than + * zero or -1 which indicates default price to be up-to on-demand. + */ + @JsonProperty(value = "properties.spotMaxPrice") + private Double spotMaxPrice; + + /** + * Agent pool tags to be persisted on the agent pool virtual machine scale + * set. + */ + @JsonProperty(value = "properties.tags") + private Map tags; + + /** + * Agent pool node labels to be persisted across all nodes in agent pool. + */ + @JsonProperty(value = "properties.nodeLabels") + private Map nodeLabels; + + /** + * Taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule. + */ + @JsonProperty(value = "properties.nodeTaints") + private List nodeTaints; + + /** + * The ID for Proximity Placement Group. + */ + @JsonProperty(value = "properties.proximityPlacementGroupID") + private String proximityPlacementGroupID; + + /** + * 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 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. + * + * @param count the count value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get 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 oS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be changed after creation. Possible values include: 'Managed', 'Ephemeral'. + * + * @return the osDiskType value + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set oS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be changed after creation. Possible values include: 'Managed', 'Ephemeral'. + * + * @param osDiskType the osDiskType value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsDiskType(OSDiskType osDiskType) { + this.osDiskType = osDiskType; + return this; + } + + /** + * Get vNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @return the vnetSubnetID value + */ + public String vnetSubnetID() { + return this.vnetSubnetID; + } + + /** + * Set vNet SubnetID specifies the VNet's subnet identifier for nodes and maybe pods. + * + * @param vnetSubnetID the vnetSubnetID value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVnetSubnetID(String vnetSubnetID) { + this.vnetSubnetID = vnetSubnetID; + return this; + } + + /** + * Get pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @return the podSubnetID value + */ + public String podSubnetID() { + return this.podSubnetID; + } + + /** + * Set pod SubnetID specifies the VNet's subnet identifier for pods. + * + * @param podSubnetID the podSubnetID value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withPodSubnetID(String podSubnetID) { + this.podSubnetID = podSubnetID; + return this; + } + + /** + * Get 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 agentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User'. + * + * @return the mode value + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set agentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User'. + * + * @param mode the mode value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMode(AgentPoolMode mode) { + this.mode = mode; + 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 version of node image. + * + * @return the nodeImageVersion value + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get settings for upgrading the agentpool. + * + * @return the upgradeSettings value + */ + public AgentPoolUpgradeSettings upgradeSettings() { + return this.upgradeSettings; + } + + /** + * Set settings for upgrading the agentpool. + * + * @param upgradeSettings the upgradeSettings value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + this.upgradeSettings = upgradeSettings; + return this; + } + + /** + * Get the current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get describes whether the Agent Pool is Running or Stopped. + * + * @return the powerState value + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * Get availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + * + * @return the availabilityZones value + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set 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: 'Spot', '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: 'Spot', '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 Spot 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 Spot 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 spotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + * @return the spotMaxPrice value + */ + public Double spotMaxPrice() { + return this.spotMaxPrice; + } + + /** + * Set spotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * + * @param spotMaxPrice the spotMaxPrice value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withSpotMaxPrice(Double spotMaxPrice) { + this.spotMaxPrice = spotMaxPrice; + return this; + } + + /** + * Get agent pool tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set agent pool tags to be persisted on the agent pool virtual machine scale set. + * + * @param tags the tags value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get agent pool node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value + */ + public Map nodeLabels() { + return this.nodeLabels; + } + + /** + * Set agent pool node labels to be persisted across all nodes in agent pool. + * + * @param nodeLabels the nodeLabels value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeLabels(Map nodeLabels) { + this.nodeLabels = nodeLabels; + return this; + } + + /** + * Get 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 ID for Proximity Placement Group. + * + * @return the proximityPlacementGroupID value + */ + public String proximityPlacementGroupID() { + return this.proximityPlacementGroupID; + } + + /** + * Set the ID for Proximity Placement Group. + * + * @param proximityPlacementGroupID the proximityPlacementGroupID value to set + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withProximityPlacementGroupID(String proximityPlacementGroupID) { + this.proximityPlacementGroupID = proximityPlacementGroupID; + return this; + } + + /** + * Get the 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolUpgradeProfileImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolUpgradeProfileImpl.java new file mode 100644 index 0000000000000..3f3071bc79199 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolUpgradeProfileImpl.java @@ -0,0 +1,64 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolUpgradeProfile; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2020_11_01.OSType; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_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 latestNodeImageVersion() { + return this.inner().latestNodeImageVersion(); + } + + @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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolUpgradeProfileInner.java new file mode 100644 index 0000000000000..121910ce4add6 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolUpgradeProfileInner.java @@ -0,0 +1,172 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.OSType; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_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; + + /** + * LatestNodeImageVersion is the latest AKS supported node image version. + */ + @JsonProperty(value = "properties.latestNodeImageVersion") + private String latestNodeImageVersion; + + /** + * 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; + } + + /** + * Get latestNodeImageVersion is the latest AKS supported node image version. + * + * @return the latestNodeImageVersion value + */ + public String latestNodeImageVersion() { + return this.latestNodeImageVersion; + } + + /** + * Set latestNodeImageVersion is the latest AKS supported node image version. + * + * @param latestNodeImageVersion the latestNodeImageVersion value to set + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withLatestNodeImageVersion(String latestNodeImageVersion) { + this.latestNodeImageVersion = latestNodeImageVersion; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolsImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolsImpl.java new file mode 100644 index 0000000000000..55c8eddbfa32a --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolsImpl.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.v2020_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPools; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPool; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPoolUpgradeProfile; +import com.microsoft.azure.management.containerservice.v2020_11_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 upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolsInner client = this.inner(); + return client.upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName) + .map(new Func1() { + @Override + public AgentPool call(AgentPoolInner inner) { + return new AgentPoolImpl(inner, 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolsInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolsInner.java new file mode 100644 index 0000000000000..084aba874a720 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/AgentPoolsInner.java @@ -0,0 +1,1187 @@ +/** + * 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.v2020_11_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.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 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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_01.AgentPools upgradeNodeImageVersion" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion") + Observable> upgradeNodeImageVersion(@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.v2020_11_01.AgentPools beginUpgradeNodeImageVersion" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion") + Observable> beginUpgradeNodeImageVersion(@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.v2020_11_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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, this.client.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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, this.client.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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getUpgradeProfile(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAvailableAgentPoolVersions(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { + return upgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().last().body(); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param 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 upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(upgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return upgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1, AgentPoolInner>() { + @Override + public AgentPoolInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> upgradeNodeImageVersionWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.upgradeNodeImageVersion(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 beginUpgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { + return beginUpgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).toBlocking().single().body(); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param 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 beginUpgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName), serviceCallback); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AgentPoolInner object + */ + public Observable beginUpgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return beginUpgradeNodeImageVersionWithServiceResponseAsync(resourceGroupName, resourceName, agentPoolName).map(new Func1, AgentPoolInner>() { + @Override + public AgentPoolInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Upgrade node image version of an agent pool to the latest. + * Upgrade node image version of an agent pool to the latest. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AgentPoolInner object + */ + public Observable> beginUpgradeNodeImageVersionWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginUpgradeNodeImageVersion(this.client.subscriptionId(), resourceGroupName, resourceName, agentPoolName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpgradeNodeImageVersionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpgradeNodeImageVersionDelegate(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); + } + + /** + * 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ContainerServiceManagementClientImpl.java new file mode 100644 index 0000000000000..b8bdbf2983998 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ContainerServiceManagementClientImpl.java @@ -0,0 +1,266 @@ +/** + * 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.v2020_11_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; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** 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 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; + } + + /** + * The PrivateEndpointConnectionsInner object to access its operations. + */ + private PrivateEndpointConnectionsInner privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsInner object to access its operations. + * @return the PrivateEndpointConnectionsInner object. + */ + public PrivateEndpointConnectionsInner privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The PrivateLinkResourcesInner object to access its operations. + */ + private PrivateLinkResourcesInner privateLinkResources; + + /** + * Gets the PrivateLinkResourcesInner object to access its operations. + * @return the PrivateLinkResourcesInner object. + */ + public PrivateLinkResourcesInner privateLinkResources() { + return this.privateLinkResources; + } + + /** + * The ResolvePrivateLinkServiceIdsInner object to access its operations. + */ + private ResolvePrivateLinkServiceIdsInner resolvePrivateLinkServiceIds; + + /** + * Gets the ResolvePrivateLinkServiceIdsInner object to access its operations. + * @return the ResolvePrivateLinkServiceIdsInner object. + */ + public ResolvePrivateLinkServiceIdsInner resolvePrivateLinkServiceIds() { + return this.resolvePrivateLinkServiceIds; + } + + /** + * 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.apiVersion = "2020-11-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.operations = new OperationsInner(restClient().retrofit(), this); + this.managedClusters = new ManagedClustersInner(restClient().retrofit(), this); + this.agentPools = new AgentPoolsInner(restClient().retrofit(), this); + this.privateEndpointConnections = new PrivateEndpointConnectionsInner(restClient().retrofit(), this); + this.privateLinkResources = new PrivateLinkResourcesInner(restClient().retrofit(), this); + this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsInner(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", "2020-11-01"); + } +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ContainerServiceManager.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ContainerServiceManager.java new file mode 100644 index 0000000000000..3751a781529cb --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ContainerServiceManager.java @@ -0,0 +1,159 @@ +/** + * 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.v2020_11_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.v2020_11_01.Operations; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusters; +import com.microsoft.azure.management.containerservice.v2020_11_01.AgentPools; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnections; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkResources; +import com.microsoft.azure.management.containerservice.v2020_11_01.ResolvePrivateLinkServiceIds; +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 Operations operations; + private ManagedClusters managedClusters; + private AgentPools agentPools; + private PrivateEndpointConnections privateEndpointConnections; + private PrivateLinkResources privateLinkResources; + private ResolvePrivateLinkServiceIds resolvePrivateLinkServiceIds; + /** + * 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 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; + } + + /** + * @return Entry point to manage PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); + } + return this.privateEndpointConnections; + } + + /** + * @return Entry point to manage PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(this); + } + return this.privateLinkResources; + } + + /** + * @return Entry point to manage ResolvePrivateLinkServiceIds. + */ + public ResolvePrivateLinkServiceIds resolvePrivateLinkServiceIds() { + if (this.resolvePrivateLinkServiceIds == null) { + this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsImpl(this); + } + return this.resolvePrivateLinkServiceIds; + } + + /** + * 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/CredentialResultsImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/CredentialResultsImpl.java new file mode 100644 index 0000000000000..f35f17e4e8f54 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.CredentialResults; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/CredentialResultsInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/CredentialResultsInner.java new file mode 100644 index 0000000000000..0d6f623cdb34f --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/IdParsingUtils.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..86a79e1725894 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterAccessProfileImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterAccessProfileImpl.java new file mode 100644 index 0000000000000..49752b07fd87b --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterAccessProfileInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterAccessProfileInner.java new file mode 100644 index 0000000000000..f2d086980d576 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterImpl.java new file mode 100644 index 0000000000000..f80872eec58cb --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterImpl.java @@ -0,0 +1,308 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedCluster; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.PowerState; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAgentPoolProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ContainerServiceLinuxProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterWindowsProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterServicePrincipalProfile; +import java.util.Map; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAddonProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterPodIdentityProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ContainerServiceNetworkProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAADProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAutoUpgradeProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterPropertiesAutoScalerProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAPIServerAccessProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterPropertiesIdentityProfileValue; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterIdentity; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterSKU; + +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 ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { + return this.inner().autoScalerProfile(); + } + + @Override + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.inner().autoUpgradeProfile(); + } + + @Override + public String diskEncryptionSetID() { + return this.inner().diskEncryptionSetID(); + } + + @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 Map identityProfile() { + return this.inner().identityProfile(); + } + + @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 ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.inner().podIdentityProfile(); + } + + @Override + public PowerState powerState() { + return this.inner().powerState(); + } + + @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 ManagedClusterSKU sku() { + return this.inner().sku(); + } + + @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 withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + this.inner().withAutoScalerProfile(autoScalerProfile); + return this; + } + + @Override + public ManagedClusterImpl withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + this.inner().withAutoUpgradeProfile(autoUpgradeProfile); + return this; + } + + @Override + public ManagedClusterImpl withDiskEncryptionSetID(String diskEncryptionSetID) { + this.inner().withDiskEncryptionSetID(diskEncryptionSetID); + 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 withIdentityProfile(Map identityProfile) { + this.inner().withIdentityProfile(identityProfile); + 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 withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + this.inner().withPodIdentityProfile(podIdentityProfile); + return this; + } + + @Override + public ManagedClusterImpl withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + this.inner().withServicePrincipalProfile(servicePrincipalProfile); + return this; + } + + @Override + public ManagedClusterImpl withSku(ManagedClusterSKU sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public ManagedClusterImpl withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { + this.inner().withWindowsProfile(windowsProfile); + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterInner.java new file mode 100644 index 0000000000000..4bd1ded8c6e1a --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterInner.java @@ -0,0 +1,637 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.PowerState; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAgentPoolProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ContainerServiceLinuxProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterWindowsProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterServicePrincipalProfile; +import java.util.Map; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAddonProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterPodIdentityProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ContainerServiceNetworkProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAADProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAutoUpgradeProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterPropertiesAutoScalerProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAPIServerAccessProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterPropertiesIdentityProfileValue; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterIdentity; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterSKU; +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; + + /** + * Represents the Power State of the cluster. + */ + @JsonProperty(value = "properties.powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /** + * The max number of agent pools for the managed cluster. + */ + @JsonProperty(value = "properties.maxAgentPools", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxAgentPools; + + /** + * Version of Kubernetes specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.kubernetesVersion") + private String kubernetesVersion; + + /** + * DNS prefix specified when creating the managed cluster. + */ + @JsonProperty(value = "properties.dnsPrefix") + private String dnsPrefix; + + /** + * FQDN 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; + + /** + * Profile of managed cluster pod identity. + */ + @JsonProperty(value = "properties.podIdentityProfile") + private ManagedClusterPodIdentityProfile podIdentityProfile; + + /** + * Name of the resource group containing agent pool nodes. + */ + @JsonProperty(value = "properties.nodeResourceGroup") + private String nodeResourceGroup; + + /** + * Whether to enable Kubernetes Role-Based Access Control. + */ + @JsonProperty(value = "properties.enableRBAC") + private Boolean enableRBAC; + + /** + * (DEPRECATING) Whether to enable Kubernetes pod security policy + * (preview). This feature is set for removal on October 15th, 2020. Learn + * more at aka.ms/aks/azpodpolicy. + */ + @JsonProperty(value = "properties.enablePodSecurityPolicy") + private Boolean enablePodSecurityPolicy; + + /** + * Profile of network configuration. + */ + @JsonProperty(value = "properties.networkProfile") + private ContainerServiceNetworkProfile networkProfile; + + /** + * Profile of Azure Active Directory configuration. + */ + @JsonProperty(value = "properties.aadProfile") + private ManagedClusterAADProfile aadProfile; + + /** + * Profile of auto upgrade configuration. + */ + @JsonProperty(value = "properties.autoUpgradeProfile") + private ManagedClusterAutoUpgradeProfile autoUpgradeProfile; + + /** + * Parameters to be applied to the cluster-autoscaler when enabled. + */ + @JsonProperty(value = "properties.autoScalerProfile") + private ManagedClusterPropertiesAutoScalerProfile autoScalerProfile; + + /** + * Access profile for managed cluster API server. + */ + @JsonProperty(value = "properties.apiServerAccessProfile") + private ManagedClusterAPIServerAccessProfile apiServerAccessProfile; + + /** + * ResourceId of the disk encryption set to use for enabling encryption at + * rest. + */ + @JsonProperty(value = "properties.diskEncryptionSetID") + private String diskEncryptionSetID; + + /** + * Identities associated with the cluster. + */ + @JsonProperty(value = "properties.identityProfile") + private Map identityProfile; + + /** + * The identity of the managed cluster, if configured. + */ + @JsonProperty(value = "identity") + private ManagedClusterIdentity identity; + + /** + * The managed cluster SKU. + */ + @JsonProperty(value = "sku") + private ManagedClusterSKU sku; + + /** + * Get the current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get represents the Power State of the cluster. + * + * @return the powerState value + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * 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 profile of managed cluster pod identity. + * + * @return the podIdentityProfile value + */ + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.podIdentityProfile; + } + + /** + * Set profile of managed cluster pod identity. + * + * @param podIdentityProfile the podIdentityProfile value to set + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + this.podIdentityProfile = podIdentityProfile; + return this; + } + + /** + * Get 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 profile of auto upgrade configuration. + * + * @return the autoUpgradeProfile value + */ + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.autoUpgradeProfile; + } + + /** + * Set profile of auto upgrade configuration. + * + * @param autoUpgradeProfile the autoUpgradeProfile value to set + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + this.autoUpgradeProfile = autoUpgradeProfile; + return this; + } + + /** + * Get parameters to be applied to the cluster-autoscaler when enabled. + * + * @return the autoScalerProfile value + */ + public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { + return this.autoScalerProfile; + } + + /** + * Set parameters to be applied to the cluster-autoscaler when enabled. + * + * @param autoScalerProfile the autoScalerProfile value to set + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + this.autoScalerProfile = autoScalerProfile; + return this; + } + + /** + * Get 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 resourceId of the disk encryption set to use for enabling encryption at rest. + * + * @return the diskEncryptionSetID value + */ + public String diskEncryptionSetID() { + return this.diskEncryptionSetID; + } + + /** + * Set resourceId of the disk encryption set to use for enabling encryption at rest. + * + * @param diskEncryptionSetID the diskEncryptionSetID value to set + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withDiskEncryptionSetID(String diskEncryptionSetID) { + this.diskEncryptionSetID = diskEncryptionSetID; + return this; + } + + /** + * Get identities associated with the cluster. + * + * @return the identityProfile value + */ + public Map identityProfile() { + return this.identityProfile; + } + + /** + * Set identities associated with the cluster. + * + * @param identityProfile the identityProfile value to set + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withIdentityProfile(Map identityProfile) { + this.identityProfile = identityProfile; + return this; + } + + /** + * Get the 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; + } + + /** + * Get the managed cluster SKU. + * + * @return the sku value + */ + public ManagedClusterSKU sku() { + return this.sku; + } + + /** + * Set the managed cluster SKU. + * + * @param sku the sku value to set + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSku(ManagedClusterSKU sku) { + this.sku = sku; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterUpgradeProfileImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterUpgradeProfileImpl.java new file mode 100644 index 0000000000000..091acc0024962 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterUpgradeProfile; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterUpgradeProfileInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClusterUpgradeProfileInner.java new file mode 100644 index 0000000000000..04c70c554fcf0 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClustersImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClustersImpl.java new file mode 100644 index 0000000000000..35d438333990e --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClustersImpl.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. + * def + */ + +package com.microsoft.azure.management.containerservice.v2020_11_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusters; +import com.microsoft.azure.management.containerservice.v2020_11_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.v2020_11_01.CredentialResults; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterServicePrincipalProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterAADProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterUpgradeProfile; +import com.microsoft.azure.management.containerservice.v2020_11_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 + public Completable stopAsync(String resourceGroupName, String resourceName) { + ManagedClustersInner client = this.inner(); + return client.stopAsync(resourceGroupName, resourceName).toCompletable(); + } + + @Override + public Completable startAsync(String resourceGroupName, String resourceName) { + ManagedClustersInner client = this.inner(); + return client.startAsync(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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClustersInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClustersInner.java new file mode 100644 index 0000000000000..877c2f1a502f4 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ManagedClustersInner.java @@ -0,0 +1,2712 @@ +/** + * 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.v2020_11_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.v2020_11_01.ManagedClusterAADProfile; +import com.microsoft.azure.management.containerservice.v2020_11_01.ManagedClusterServicePrincipalProfile; +import com.microsoft.azure.management.containerservice.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_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.v2020_11_01.ManagedClusters stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop") + Observable> stop(@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.v2020_11_01.ManagedClusters beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop") + Observable> beginStop(@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.v2020_11_01.ManagedClusters start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start") + Observable> start(@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.v2020_11_01.ManagedClusters beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start") + Observable> beginStart(@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.v2020_11_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.v2020_11_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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getUpgradeProfile(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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. **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) . + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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. **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) . + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param 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. **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) . + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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. **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) . + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAccessProfile(this.client.subscriptionId(), resourceGroupName, resourceName, roleName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listClusterAdminCredentials(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listClusterUserCredentials(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listClusterMonitoringUserCredentials(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(tags); + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(tags); + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.resetServicePrincipalProfile(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginResetServicePrincipalProfile(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.resetAADProfile(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginResetAADProfile(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.rotateClusterCertificates(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginRotateClusterCertificates(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.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); + } + + /** + * Stop Managed Cluster. + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 stop(String resourceGroupName, String resourceName) { + stopWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Stop Managed Cluster. + * Stops a Running 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 stopAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Stop Managed Cluster. + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopAsync(String resourceGroupName, String resourceName) { + return stopWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop Managed Cluster. + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.stop(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Stop Managed Cluster. + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 beginStop(String resourceGroupName, String resourceName) { + beginStopWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Stop Managed Cluster. + * Stops a Running 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 beginStopAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Stop Managed Cluster. + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String resourceGroupName, String resourceName) { + return beginStopWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop Managed Cluster. + * Stops a Running Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginStop(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(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); + } + + /** + * Start Managed Cluster. + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 start(String resourceGroupName, String resourceName) { + startWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Start Managed Cluster. + * Starts a Stopped 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 startAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Start Managed Cluster. + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startAsync(String resourceGroupName, String resourceName) { + return startWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start Managed Cluster. + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.start(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Start Managed Cluster. + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 beginStart(String resourceGroupName, String resourceName) { + beginStartWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Start Managed Cluster. + * Starts a Stopped 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 beginStartAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Start Managed Cluster. + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String resourceGroupName, String resourceName) { + return beginStartWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start Managed Cluster. + * Starts a Stopped Managed Cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginStart(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationValueImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationValueImpl.java new file mode 100644 index 0000000000000..b04384d69340a --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationValueInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationValueInner.java new file mode 100644 index 0000000000000..7ff28da75f575 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationsImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..7ac545f64270e --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2020_11_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.containerservice.v2020_11_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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationsInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationsInner.java new file mode 100644 index 0000000000000..00f6735cab51e --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/OperationsInner.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.v2020_11_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.v2020_11_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() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.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, 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PageImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PageImpl.java new file mode 100644 index 0000000000000..d0e80226b00a4 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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("") + 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PageImpl1.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PageImpl1.java new file mode 100644 index 0000000000000..9db562eedabe4 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_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("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 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-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 0000000000000..72651127b51c3 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,110 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnectionProvisioningState; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpoint; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkServiceConnectionState; + +class PrivateEndpointConnectionImpl extends CreatableUpdatableImpl implements PrivateEndpointConnection, PrivateEndpointConnection.Update { + private final ContainerServiceManager manager; + private String resourceGroupName; + private String resourceName; + private String privateEndpointConnectionName; + + PrivateEndpointConnectionImpl(String name, ContainerServiceManager manager) { + super(name, new PrivateEndpointConnectionInner()); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = name; + // + } + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner inner, ContainerServiceManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.resourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "managedClusters"); + this.privateEndpointConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateEndpointConnections"); + // + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return client.updateAsync(this.resourceGroupName, this.resourceName, this.privateEndpointConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections(); + return client.getAsync(this.resourceGroupName, this.resourceName, this.privateEndpointConnectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PrivateEndpoint privateEndpoint() { + return this.inner().privateEndpoint(); + } + + @Override + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.inner().privateLinkServiceConnectionState(); + } + + @Override + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.inner().withPrivateEndpoint(privateEndpoint); + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionInner.java new file mode 100644 index 0000000000000..6f43d34ca1555 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionInner.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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnectionProvisioningState; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpoint; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * A private endpoint connection. + */ +@JsonFlatten +public class PrivateEndpointConnectionInner extends ProxyResource { + /** + * The current provisioning state. Possible values include: 'Succeeded', + * 'Creating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /** + * The resource of private endpoint. + */ + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /** + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState", required = true) + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * Get the current provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the resource of private endpoint. + * + * @return the privateEndpoint value + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the resource of private endpoint. + * + * @param privateEndpoint the privateEndpoint value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get a collection of information about the state of the connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set a collection of information about the state of the connection between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionListResultImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionListResultImpl.java new file mode 100644 index 0000000000000..957a2c6a6b551 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionListResultImpl.java @@ -0,0 +1,32 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnectionListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class PrivateEndpointConnectionListResultImpl extends WrapperImpl implements PrivateEndpointConnectionListResult { + private final ContainerServiceManager manager; + PrivateEndpointConnectionListResultImpl(PrivateEndpointConnectionListResultInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionListResultInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionListResultInner.java new file mode 100644 index 0000000000000..e69424195ea47 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionListResultInner.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.v2020_11_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A list of private endpoint connections. + */ +public class PrivateEndpointConnectionListResultInner { + /** + * The collection value. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the collection value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the collection value. + * + * @param value the value value to set + * @return the PrivateEndpointConnectionListResultInner object itself. + */ + public PrivateEndpointConnectionListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionsImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 0000000000000..cd077fe82e0b9 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionsImpl.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.v2020_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnections; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnectionListResult; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnection; + +class PrivateEndpointConnectionsImpl extends WrapperImpl implements PrivateEndpointConnections { + private final ContainerServiceManager manager; + + PrivateEndpointConnectionsImpl(ContainerServiceManager manager) { + super(manager.inner().privateEndpointConnections()); + this.manager = manager; + } + + public ContainerServiceManager manager() { + return this.manager; + } + + private PrivateEndpointConnectionImpl wrapModel(PrivateEndpointConnectionInner inner) { + return new PrivateEndpointConnectionImpl(inner, manager()); + } + + @Override + public Observable listAsync(String resourceGroupName, String resourceName) { + PrivateEndpointConnectionsInner client = this.inner(); + return client.listAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public PrivateEndpointConnectionListResult call(PrivateEndpointConnectionListResultInner inner) { + return new PrivateEndpointConnectionListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + PrivateEndpointConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, resourceName, privateEndpointConnectionName) + .flatMap(new Func1>() { + @Override + public Observable call(PrivateEndpointConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PrivateEndpointConnection)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + PrivateEndpointConnectionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).toCompletable(); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionsInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionsInner.java new file mode 100644 index 0000000000000..cb3f5f70b3add --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateEndpointConnectionsInner.java @@ -0,0 +1,548 @@ +/** + * 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.v2020_11_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 com.microsoft.rest.Validator; +import java.io.IOException; +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.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PrivateEndpointConnections. + */ +public class PrivateEndpointConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private PrivateEndpointConnectionsService service; + /** The service client containing this operation class. */ + private ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateEndpointConnectionsInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { + this.service = retrofit.create(PrivateEndpointConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateEndpointConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2020_11_01.PrivateEndpointConnections list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections") + 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.v2020_11_01.PrivateEndpointConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @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.v2020_11_01.PrivateEndpointConnections update" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Body PrivateEndpointConnectionInner 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.v2020_11_01.PrivateEndpointConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @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.v2020_11_01.PrivateEndpointConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 PrivateEndpointConnectionListResultInner object if successful. + */ + public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName) { + return listWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param 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(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionListResultInner object + */ + public Observable listAsync(String resourceGroupName, String resourceName) { + return listWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, PrivateEndpointConnectionListResultInner>() { + @Override + public PrivateEndpointConnectionListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of each private endpoint connection. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionListResultInner object + */ + public Observable> listWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(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 the private endpoint connection. + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).toBlocking().single().body(); + } + + /** + * Gets the private endpoint connection. + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param 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 privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName), serviceCallback); + } + + /** + * Gets the private endpoint connection. + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the private endpoint connection. + * Gets the details of the private endpoint connection by managed cluster and resource group. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + 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 (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.client.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); + } + + /** + * Updates a private endpoint connection. + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner update(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Updates a private endpoint connection. + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection operation. + * @param 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 updateAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters), serviceCallback); + } + + /** + * Updates a private endpoint connection. + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable updateAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a private endpoint connection. + * Updates a private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters supplied to the Update a private endpoint connection operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner 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 (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.update(this.client.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(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 private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 privateEndpointConnectionName) { + deleteWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).toBlocking().last().body(); + } + + /** + * Deletes a private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param 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 privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName), serviceCallback); + } + + /** + * Deletes a private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + 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 (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 privateEndpointConnectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).toBlocking().single().body(); + } + + /** + * Deletes a private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param 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 privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName), serviceCallback); + } + + /** + * Deletes a private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a private endpoint connection. + * Deletes the private endpoint connection in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + 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 (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, this.client.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(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourceImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 0000000000000..eca48e7d40936 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourceImpl.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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class PrivateLinkResourceImpl extends WrapperImpl implements PrivateLinkResource { + private final ContainerServiceManager manager; + PrivateLinkResourceImpl(PrivateLinkResourceInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public String groupId() { + return this.inner().groupId(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String privateLinkServiceID() { + return this.inner().privateLinkServiceID(); + } + + @Override + public List requiredMembers() { + return this.inner().requiredMembers(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourceInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourceInner.java new file mode 100644 index 0000000000000..cb5ccf7476571 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourceInner.java @@ -0,0 +1,164 @@ +/** + * 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.v2020_11_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A private link resource. + */ +public class PrivateLinkResourceInner { + /** + * The ID of the private link resource. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The name of the private link resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The resource type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The group ID of the resource. + */ + @JsonProperty(value = "groupId") + private String groupId; + + /** + * RequiredMembers of the resource. + */ + @JsonProperty(value = "requiredMembers") + private List requiredMembers; + + /** + * The private link service ID of the resource, this field is exposed only + * to NRP internally. + */ + @JsonProperty(value = "privateLinkServiceID", access = JsonProperty.Access.WRITE_ONLY) + private String privateLinkServiceID; + + /** + * Get the ID of the private link resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the ID of the private link resource. + * + * @param id the id value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name of the private link resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the private link resource. + * + * @param name the name value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the resource type. + * + * @param type the type value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the group ID of the resource. + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the group ID of the resource. + * + * @param groupId the groupId value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get requiredMembers of the resource. + * + * @return the requiredMembers value + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Set requiredMembers of the resource. + * + * @param requiredMembers the requiredMembers value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { + this.requiredMembers = requiredMembers; + return this; + } + + /** + * Get the private link service ID of the resource, this field is exposed only to NRP internally. + * + * @return the privateLinkServiceID value + */ + public String privateLinkServiceID() { + return this.privateLinkServiceID; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 0000000000000..00ad4b0a740d2 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesImpl.java @@ -0,0 +1,42 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkResources; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkResourcesListResult; + +class PrivateLinkResourcesImpl extends WrapperImpl implements PrivateLinkResources { + private final ContainerServiceManager manager; + + PrivateLinkResourcesImpl(ContainerServiceManager manager) { + super(manager.inner().privateLinkResources()); + this.manager = manager; + } + + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String resourceGroupName, String resourceName) { + PrivateLinkResourcesInner client = this.inner(); + return client.listAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public PrivateLinkResourcesListResult call(PrivateLinkResourcesListResultInner inner) { + return new PrivateLinkResourcesListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesInner.java new file mode 100644 index 0000000000000..eb9513c7921f5 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesInner.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.v2020_11_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 okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 PrivateLinkResources. + */ +public class PrivateLinkResourcesInner { + /** The Retrofit service to perform REST calls. */ + private PrivateLinkResourcesService service; + /** The service client containing this operation class. */ + private ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateLinkResourcesInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { + this.service = retrofit.create(PrivateLinkResourcesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateLinkResources to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateLinkResourcesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkResources list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources") + 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); + + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each private link resource. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 PrivateLinkResourcesListResultInner object if successful. + */ + public PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName) { + return listWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each private link resource. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param 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(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each private link resource. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourcesListResultInner object + */ + public Observable listAsync(String resourceGroupName, String resourceName) { + return listWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, PrivateLinkResourcesListResultInner>() { + @Override + public PrivateLinkResourcesListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * Gets a list of private link resources in the specified managed cluster. The operation returns properties of each private link resource. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourcesListResultInner object + */ + public Observable> listWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(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); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesListResultImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesListResultImpl.java new file mode 100644 index 0000000000000..1eed399f2c376 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesListResultImpl.java @@ -0,0 +1,32 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkResourcesListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class PrivateLinkResourcesListResultImpl extends WrapperImpl implements PrivateLinkResourcesListResult { + private final ContainerServiceManager manager; + PrivateLinkResourcesListResultImpl(PrivateLinkResourcesListResultInner inner, ContainerServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesListResultInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesListResultInner.java new file mode 100644 index 0000000000000..b91cdea8233fe --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/PrivateLinkResourcesListResultInner.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.v2020_11_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A list of private link resources. + */ +public class PrivateLinkResourcesListResultInner { + /** + * The collection value. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the collection value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the collection value. + * + * @param value the value value to set + * @return the PrivateLinkResourcesListResultInner object itself. + */ + public PrivateLinkResourcesListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ResolvePrivateLinkServiceIdsImpl.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ResolvePrivateLinkServiceIdsImpl.java new file mode 100644 index 0000000000000..092c8fbffb93d --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ResolvePrivateLinkServiceIdsImpl.java @@ -0,0 +1,42 @@ +/** + * 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.v2020_11_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.containerservice.v2020_11_01.ResolvePrivateLinkServiceIds; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.containerservice.v2020_11_01.PrivateLinkResource; + +class ResolvePrivateLinkServiceIdsImpl extends WrapperImpl implements ResolvePrivateLinkServiceIds { + private final ContainerServiceManager manager; + + ResolvePrivateLinkServiceIdsImpl(ContainerServiceManager manager) { + super(manager.inner().resolvePrivateLinkServiceIds()); + this.manager = manager; + } + + public ContainerServiceManager manager() { + return this.manager; + } + + @Override + public Observable pOSTAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + ResolvePrivateLinkServiceIdsInner client = this.inner(); + return client.pOSTAsync(resourceGroupName, resourceName, parameters) + .map(new Func1() { + @Override + public PrivateLinkResource call(PrivateLinkResourceInner inner) { + return new PrivateLinkResourceImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ResolvePrivateLinkServiceIdsInner.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ResolvePrivateLinkServiceIdsInner.java new file mode 100644 index 0000000000000..c5b8ae181a12e --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/ResolvePrivateLinkServiceIdsInner.java @@ -0,0 +1,160 @@ +/** + * 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.v2020_11_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 com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +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 ResolvePrivateLinkServiceIds. + */ +public class ResolvePrivateLinkServiceIdsInner { + /** The Retrofit service to perform REST calls. */ + private ResolvePrivateLinkServiceIdsService service; + /** The service client containing this operation class. */ + private ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ResolvePrivateLinkServiceIdsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ResolvePrivateLinkServiceIdsInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { + this.service = retrofit.create(ResolvePrivateLinkServiceIdsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ResolvePrivateLinkServiceIds to be + * used by Retrofit to perform actually REST calls. + */ + interface ResolvePrivateLinkServiceIdsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.v2020_11_01.ResolvePrivateLinkServiceIds pOST" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId") + Observable> pOST(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body PrivateLinkResourceInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the private link service ID for the specified managed cluster. + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 PrivateLinkResourceInner object if successful. + */ + public PrivateLinkResourceInner pOST(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + return pOSTWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. + * @param 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 pOSTAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(pOSTWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourceInner object + */ + public Observable pOSTAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { + return pOSTWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, PrivateLinkResourceInner>() { + @Override + public PrivateLinkResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * Gets the private link service ID the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourceInner object + */ + public Observable> pOSTWithServiceResponseAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.pOST(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = pOSTDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse pOSTDelegate(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); + } + +} diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/package-info.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/implementation/package-info.java new file mode 100644 index 0000000000000..2810bce8ff308 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01.implementation; diff --git a/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/package-info.java b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_01/package-info.java new file mode 100644 index 0000000000000..6ddfd90516d98 --- /dev/null +++ b/sdk/containerservice/mgmt-v2020_11_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_11_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.v2020_11_01;