diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/pom.xml b/machinelearningcompute/resource-manager/v2017_08_01_preview/pom.xml new file mode 100644 index 000000000000..0603313508be --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.machinelearningcompute.v2017_08_01_preview + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-machinelearningcompute + 1.0.0-beta + jar + Microsoft Azure SDK for MachineLearningCompute Management + This package contains Microsoft MachineLearningCompute 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 + + + + + + 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/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AcsClusterProperties.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AcsClusterProperties.java new file mode 100644 index 000000000000..603b017354c1 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AcsClusterProperties.java @@ -0,0 +1,206 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the container service backing the cluster. + */ +public class AcsClusterProperties { + /** + * The FQDN of the cluster. + */ + @JsonProperty(value = "clusterFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String clusterFqdn; + + /** + * Type of orchestrator. It cannot be changed once the cluster is created. + * Possible values include: 'Kubernetes', 'None'. + */ + @JsonProperty(value = "orchestratorType", required = true) + private OrchestratorType orchestratorType; + + /** + * Orchestrator specific properties. + */ + @JsonProperty(value = "orchestratorProperties") + private KubernetesClusterProperties orchestratorProperties; + + /** + * The system services deployed to the cluster. + */ + @JsonProperty(value = "systemServices") + private List systemServices; + + /** + * The number of master nodes in the container service. + */ + @JsonProperty(value = "masterCount") + private Integer masterCount; + + /** + * The number of agent nodes in the Container Service. This can be changed + * to scale the cluster. + */ + @JsonProperty(value = "agentCount") + private Integer agentCount; + + /** + * The Azure VM size of the agent VM nodes. This cannot be changed once the + * cluster is created. This list is non exhaustive; refer to + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes + * for the possible VM sizes. Possible values include: 'Standard_A0', + * 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', + * 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', + * 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + * 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + * 'Standard_D14_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', + * 'Standard_G4', 'Standard_G5', 'Standard_DS1', 'Standard_DS2', + * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + * 'Standard_DS13', 'Standard_DS14', 'Standard_GS1', 'Standard_GS2', + * 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'. + */ + @JsonProperty(value = "agentVmSize") + private AgentVMSizeTypes agentVmSize; + + /** + * Get the FQDN of the cluster. + * + * @return the clusterFqdn value + */ + public String clusterFqdn() { + return this.clusterFqdn; + } + + /** + * Get type of orchestrator. It cannot be changed once the cluster is created. Possible values include: 'Kubernetes', 'None'. + * + * @return the orchestratorType value + */ + public OrchestratorType orchestratorType() { + return this.orchestratorType; + } + + /** + * Set type of orchestrator. It cannot be changed once the cluster is created. Possible values include: 'Kubernetes', 'None'. + * + * @param orchestratorType the orchestratorType value to set + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withOrchestratorType(OrchestratorType orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get orchestrator specific properties. + * + * @return the orchestratorProperties value + */ + public KubernetesClusterProperties orchestratorProperties() { + return this.orchestratorProperties; + } + + /** + * Set orchestrator specific properties. + * + * @param orchestratorProperties the orchestratorProperties value to set + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withOrchestratorProperties(KubernetesClusterProperties orchestratorProperties) { + this.orchestratorProperties = orchestratorProperties; + return this; + } + + /** + * Get the system services deployed to the cluster. + * + * @return the systemServices value + */ + public List systemServices() { + return this.systemServices; + } + + /** + * Set the system services deployed to the cluster. + * + * @param systemServices the systemServices value to set + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withSystemServices(List systemServices) { + this.systemServices = systemServices; + return this; + } + + /** + * Get the number of master nodes in the container service. + * + * @return the masterCount value + */ + public Integer masterCount() { + return this.masterCount; + } + + /** + * Set the number of master nodes in the container service. + * + * @param masterCount the masterCount value to set + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withMasterCount(Integer masterCount) { + this.masterCount = masterCount; + return this; + } + + /** + * Get the number of agent nodes in the Container Service. This can be changed to scale the cluster. + * + * @return the agentCount value + */ + public Integer agentCount() { + return this.agentCount; + } + + /** + * Set the number of agent nodes in the Container Service. This can be changed to scale the cluster. + * + * @param agentCount the agentCount value to set + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withAgentCount(Integer agentCount) { + this.agentCount = agentCount; + return this; + } + + /** + * Get the Azure VM size of the agent VM nodes. This cannot be changed once the cluster is created. This list is non exhaustive; refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes for the possible VM sizes. Possible values include: 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'. + * + * @return the agentVmSize value + */ + public AgentVMSizeTypes agentVmSize() { + return this.agentVmSize; + } + + /** + * Set the Azure VM size of the agent VM nodes. This cannot be changed once the cluster is created. This list is non exhaustive; refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes for the possible VM sizes. Possible values include: 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'. + * + * @param agentVmSize the agentVmSize value to set + * @return the AcsClusterProperties object itself. + */ + public AcsClusterProperties withAgentVmSize(AgentVMSizeTypes agentVmSize) { + this.agentVmSize = agentVmSize; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AgentVMSizeTypes.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AgentVMSizeTypes.java new file mode 100644 index 000000000000..d4436a0b780e --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AgentVMSizeTypes.java @@ -0,0 +1,176 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AgentVMSizeTypes. + */ +public final class AgentVMSizeTypes extends ExpandableStringEnum { + /** Static value Standard_A0 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A0 = fromString("Standard_A0"); + + /** Static value Standard_A1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A1 = fromString("Standard_A1"); + + /** Static value Standard_A2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A2 = fromString("Standard_A2"); + + /** Static value Standard_A3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A3 = fromString("Standard_A3"); + + /** Static value Standard_A4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A4 = fromString("Standard_A4"); + + /** Static value Standard_A5 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A5 = fromString("Standard_A5"); + + /** Static value Standard_A6 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A6 = fromString("Standard_A6"); + + /** Static value Standard_A7 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A7 = fromString("Standard_A7"); + + /** Static value Standard_A8 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A8 = fromString("Standard_A8"); + + /** Static value Standard_A9 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A9 = fromString("Standard_A9"); + + /** Static value Standard_A10 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A10 = fromString("Standard_A10"); + + /** Static value Standard_A11 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_A11 = fromString("Standard_A11"); + + /** Static value Standard_D1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D1 = fromString("Standard_D1"); + + /** Static value Standard_D2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D2 = fromString("Standard_D2"); + + /** Static value Standard_D3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D3 = fromString("Standard_D3"); + + /** Static value Standard_D4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D4 = fromString("Standard_D4"); + + /** Static value Standard_D11 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D11 = fromString("Standard_D11"); + + /** Static value Standard_D12 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D12 = fromString("Standard_D12"); + + /** Static value Standard_D13 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D13 = fromString("Standard_D13"); + + /** Static value Standard_D14 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D14 = fromString("Standard_D14"); + + /** Static value Standard_D1_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D1_V2 = fromString("Standard_D1_v2"); + + /** Static value Standard_D2_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D2_V2 = fromString("Standard_D2_v2"); + + /** Static value Standard_D3_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D3_V2 = fromString("Standard_D3_v2"); + + /** Static value Standard_D4_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D4_V2 = fromString("Standard_D4_v2"); + + /** Static value Standard_D5_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D5_V2 = fromString("Standard_D5_v2"); + + /** Static value Standard_D11_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D11_V2 = fromString("Standard_D11_v2"); + + /** Static value Standard_D12_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D12_V2 = fromString("Standard_D12_v2"); + + /** Static value Standard_D13_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D13_V2 = fromString("Standard_D13_v2"); + + /** Static value Standard_D14_v2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_D14_V2 = fromString("Standard_D14_v2"); + + /** Static value Standard_G1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G1 = fromString("Standard_G1"); + + /** Static value Standard_G2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G2 = fromString("Standard_G2"); + + /** Static value Standard_G3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G3 = fromString("Standard_G3"); + + /** Static value Standard_G4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G4 = fromString("Standard_G4"); + + /** Static value Standard_G5 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_G5 = fromString("Standard_G5"); + + /** Static value Standard_DS1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS1 = fromString("Standard_DS1"); + + /** Static value Standard_DS2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS2 = fromString("Standard_DS2"); + + /** Static value Standard_DS3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS3 = fromString("Standard_DS3"); + + /** Static value Standard_DS4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS4 = fromString("Standard_DS4"); + + /** Static value Standard_DS11 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS11 = fromString("Standard_DS11"); + + /** Static value Standard_DS12 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS12 = fromString("Standard_DS12"); + + /** Static value Standard_DS13 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS13 = fromString("Standard_DS13"); + + /** Static value Standard_DS14 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_DS14 = fromString("Standard_DS14"); + + /** Static value Standard_GS1 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS1 = fromString("Standard_GS1"); + + /** Static value Standard_GS2 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS2 = fromString("Standard_GS2"); + + /** Static value Standard_GS3 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS3 = fromString("Standard_GS3"); + + /** Static value Standard_GS4 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS4 = fromString("Standard_GS4"); + + /** Static value Standard_GS5 for AgentVMSizeTypes. */ + public static final AgentVMSizeTypes STANDARD_GS5 = fromString("Standard_GS5"); + + /** + * Creates or finds a AgentVMSizeTypes from its string representation. + * @param name a name to look for + * @return the corresponding AgentVMSizeTypes + */ + @JsonCreator + public static AgentVMSizeTypes fromString(String name) { + return fromString(name, AgentVMSizeTypes.class); + } + + /** + * @return known AgentVMSizeTypes values + */ + public static Collection values() { + return values(AgentVMSizeTypes.class); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AppInsightsCredentials.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AppInsightsCredentials.java new file mode 100644 index 000000000000..eb9fbf757cdf --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AppInsightsCredentials.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AppInsights credentials. + */ +public class AppInsightsCredentials { + /** + * The AppInsights application ID. + */ + @JsonProperty(value = "appId") + private String appId; + + /** + * The AppInsights instrumentation key. This is not returned in response of + * GET/PUT on the resource. To see this please call listKeys API. + */ + @JsonProperty(value = "instrumentationKey") + private String instrumentationKey; + + /** + * Get the AppInsights application ID. + * + * @return the appId value + */ + public String appId() { + return this.appId; + } + + /** + * Set the AppInsights application ID. + * + * @param appId the appId value to set + * @return the AppInsightsCredentials object itself. + */ + public AppInsightsCredentials withAppId(String appId) { + this.appId = appId; + return this; + } + + /** + * Get the AppInsights instrumentation key. This is not returned in response of GET/PUT on the resource. To see this please call listKeys API. + * + * @return the instrumentationKey value + */ + public String instrumentationKey() { + return this.instrumentationKey; + } + + /** + * Set the AppInsights instrumentation key. This is not returned in response of GET/PUT on the resource. To see this please call listKeys API. + * + * @param instrumentationKey the instrumentationKey value to set + * @return the AppInsightsCredentials object itself. + */ + public AppInsightsCredentials withInstrumentationKey(String instrumentationKey) { + this.instrumentationKey = instrumentationKey; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AppInsightsProperties.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AppInsightsProperties.java new file mode 100644 index 000000000000..6c62da31e8cf --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AppInsightsProperties.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of App Insights. + */ +public class AppInsightsProperties { + /** + * ARM resource ID of the App Insights. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get aRM resource ID of the App Insights. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set aRM resource ID of the App Insights. + * + * @param resourceId the resourceId value to set + * @return the AppInsightsProperties object itself. + */ + public AppInsightsProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AutoScaleConfiguration.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AutoScaleConfiguration.java new file mode 100644 index 000000000000..4a1e95587ecd --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AutoScaleConfiguration.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutoScale configuration properties. + */ +public class AutoScaleConfiguration { + /** + * If auto-scale is enabled for all services. Each service can turn it off + * individually. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "status") + private Status status; + + /** + * The minimum number of replicas for each service. + */ + @JsonProperty(value = "minReplicas") + private Integer minReplicas; + + /** + * The maximum number of replicas for each service. + */ + @JsonProperty(value = "maxReplicas") + private Integer maxReplicas; + + /** + * The target utilization. + */ + @JsonProperty(value = "targetUtilization") + private Double targetUtilization; + + /** + * Refresh period in seconds. + */ + @JsonProperty(value = "refreshPeriodInSeconds") + private Integer refreshPeriodInSeconds; + + /** + * Get if auto-scale is enabled for all services. Each service can turn it off individually. Possible values include: 'Enabled', 'Disabled'. + * + * @return the status value + */ + public Status status() { + return this.status; + } + + /** + * Set if auto-scale is enabled for all services. Each service can turn it off individually. Possible values include: 'Enabled', 'Disabled'. + * + * @param status the status value to set + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withStatus(Status status) { + this.status = status; + return this; + } + + /** + * Get the minimum number of replicas for each service. + * + * @return the minReplicas value + */ + public Integer minReplicas() { + return this.minReplicas; + } + + /** + * Set the minimum number of replicas for each service. + * + * @param minReplicas the minReplicas value to set + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withMinReplicas(Integer minReplicas) { + this.minReplicas = minReplicas; + return this; + } + + /** + * Get the maximum number of replicas for each service. + * + * @return the maxReplicas value + */ + public Integer maxReplicas() { + return this.maxReplicas; + } + + /** + * Set the maximum number of replicas for each service. + * + * @param maxReplicas the maxReplicas value to set + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withMaxReplicas(Integer maxReplicas) { + this.maxReplicas = maxReplicas; + return this; + } + + /** + * Get the target utilization. + * + * @return the targetUtilization value + */ + public Double targetUtilization() { + return this.targetUtilization; + } + + /** + * Set the target utilization. + * + * @param targetUtilization the targetUtilization value to set + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withTargetUtilization(Double targetUtilization) { + this.targetUtilization = targetUtilization; + return this; + } + + /** + * Get refresh period in seconds. + * + * @return the refreshPeriodInSeconds value + */ + public Integer refreshPeriodInSeconds() { + return this.refreshPeriodInSeconds; + } + + /** + * Set refresh period in seconds. + * + * @param refreshPeriodInSeconds the refreshPeriodInSeconds value to set + * @return the AutoScaleConfiguration object itself. + */ + public AutoScaleConfiguration withRefreshPeriodInSeconds(Integer refreshPeriodInSeconds) { + this.refreshPeriodInSeconds = refreshPeriodInSeconds; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AvailableOperations.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AvailableOperations.java new file mode 100644 index 000000000000..3574acd0e825 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/AvailableOperations.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.machinelearningcompute.v2017_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.MachineLearningComputeManager; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.AvailableOperationsInner; +import java.util.List; + +/** + * Type representing AvailableOperations. + */ +public interface AvailableOperations extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/CheckSystemServicesUpdatesAvailableResponse.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/CheckSystemServicesUpdatesAvailableResponse.java new file mode 100644 index 000000000000..eef7828ba695 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/CheckSystemServicesUpdatesAvailableResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.MachineLearningComputeManager; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.CheckSystemServicesUpdatesAvailableResponseInner; + +/** + * Type representing CheckSystemServicesUpdatesAvailableResponse. + */ +public interface CheckSystemServicesUpdatesAvailableResponse extends HasInner, HasManager { + /** + * @return the updatesAvailable value. + */ + UpdatesAvailable updatesAvailable(); + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ClusterType.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ClusterType.java new file mode 100644 index 000000000000..ca7b11b48928 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ClusterType.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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ClusterType. + */ +public final class ClusterType extends ExpandableStringEnum { + /** Static value ACS for ClusterType. */ + public static final ClusterType ACS = fromString("ACS"); + + /** Static value Local for ClusterType. */ + public static final ClusterType LOCAL = fromString("Local"); + + /** + * Creates or finds a ClusterType from its string representation. + * @param name a name to look for + * @return the corresponding ClusterType + */ + @JsonCreator + public static ClusterType fromString(String name) { + return fromString(name, ClusterType.class); + } + + /** + * @return known ClusterType values + */ + public static Collection values() { + return values(ClusterType.class); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerRegistryCredentials.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerRegistryCredentials.java new file mode 100644 index 000000000000..9d679bb60746 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerRegistryCredentials.java @@ -0,0 +1,78 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the Azure Container Registry which contains the images + * deployed to the cluster. + */ +public class ContainerRegistryCredentials { + /** + * The ACR login server name. User name is the first part of the FQDN. + */ + @JsonProperty(value = "loginServer", access = JsonProperty.Access.WRITE_ONLY) + private String loginServer; + + /** + * The ACR primary password. + */ + @JsonProperty(value = "password", access = JsonProperty.Access.WRITE_ONLY) + private String password; + + /** + * The ACR secondary password. + */ + @JsonProperty(value = "password2", access = JsonProperty.Access.WRITE_ONLY) + private String password2; + + /** + * The ACR login username. + */ + @JsonProperty(value = "username", access = JsonProperty.Access.WRITE_ONLY) + private String username; + + /** + * Get the ACR login server name. User name is the first part of the FQDN. + * + * @return the loginServer value + */ + public String loginServer() { + return this.loginServer; + } + + /** + * Get the ACR primary password. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Get the ACR secondary password. + * + * @return the password2 value + */ + public String password2() { + return this.password2; + } + + /** + * Get the ACR login username. + * + * @return the username value + */ + public String username() { + return this.username; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerRegistryProperties.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerRegistryProperties.java new file mode 100644 index 000000000000..f6b8396d4f01 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerRegistryProperties.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of Azure Container Registry. + */ +public class ContainerRegistryProperties { + /** + * ARM resource ID of the Azure Container Registry used to store Docker + * images for web services in the cluster. If not provided one will be + * created. This cannot be changed once the cluster is created. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get aRM resource ID of the Azure Container Registry used to store Docker images for web services in the cluster. If not provided one will be created. This cannot be changed once the cluster is created. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set aRM resource ID of the Azure Container Registry used to store Docker images for web services in the cluster. If not provided one will be created. This cannot be changed once the cluster is created. + * + * @param resourceId the resourceId value to set + * @return the ContainerRegistryProperties object itself. + */ + public ContainerRegistryProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerServiceCredentials.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerServiceCredentials.java new file mode 100644 index 000000000000..5f5defb53c10 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ContainerServiceCredentials.java @@ -0,0 +1,63 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the Azure Container Registry which contains the images + * deployed to the cluster. + */ +public class ContainerServiceCredentials { + /** + * The ACS kube config file. + */ + @JsonProperty(value = "acsKubeConfig", access = JsonProperty.Access.WRITE_ONLY) + private String acsKubeConfig; + + /** + * Service principal configuration used by Kubernetes. + */ + @JsonProperty(value = "servicePrincipalConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private ServicePrincipalProperties servicePrincipalConfiguration; + + /** + * The ACR image pull secret name which was created in Kubernetes. + */ + @JsonProperty(value = "imagePullSecretName", access = JsonProperty.Access.WRITE_ONLY) + private String imagePullSecretName; + + /** + * Get the ACS kube config file. + * + * @return the acsKubeConfig value + */ + public String acsKubeConfig() { + return this.acsKubeConfig; + } + + /** + * Get service principal configuration used by Kubernetes. + * + * @return the servicePrincipalConfiguration value + */ + public ServicePrincipalProperties servicePrincipalConfiguration() { + return this.servicePrincipalConfiguration; + } + + /** + * Get the ACR image pull secret name which was created in Kubernetes. + * + * @return the imagePullSecretName value + */ + public String imagePullSecretName() { + return this.imagePullSecretName; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorDetail.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorDetail.java new file mode 100644 index 000000000000..284ff25129b7 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorDetail.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error detail information. + */ +public class ErrorDetail { + /** + * Error code. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * Error message. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * Get error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set error code. + * + * @param code the code value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withCode(String code) { + this.code = code; + return this; + } + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponse.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponse.java new file mode 100644 index 000000000000..92d067481613 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponse.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.machinelearningcompute.v2017_08_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error response information. + */ +public class ErrorResponse { + /** + * Error code. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * Error message. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * An array of error detail objects. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set error code. + * + * @param code the code value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withCode(String code) { + this.code = code; + return this; + } + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get an array of error detail objects. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set an array of error detail objects. + * + * @param details the details value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponseWrapper.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponseWrapper.java new file mode 100644 index 000000000000..ca55b741b420 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponseWrapper.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Wrapper for error response to follow ARM guidelines. + */ +public class ErrorResponseWrapper { + /** + * The error response. + */ + @JsonProperty(value = "error") + private ErrorResponse error; + + /** + * Get the error response. + * + * @return the error value + */ + public ErrorResponse error() { + return this.error; + } + + /** + * Set the error response. + * + * @param error the error value to set + * @return the ErrorResponseWrapper object itself. + */ + public ErrorResponseWrapper withError(ErrorResponse error) { + this.error = error; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponseWrapperException.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponseWrapperException.java new file mode 100644 index 000000000000..01bd5e76ac02 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ErrorResponseWrapperException.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.machinelearningcompute.v2017_08_01_preview; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponseWrapper + * information. + */ +public class ErrorResponseWrapperException extends RestException { + /** + * Initializes a new instance of the ErrorResponseWrapperException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseWrapperException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseWrapperException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseWrapperException(final String message, final Response response, final ErrorResponseWrapper body) { + super(message, response, body); + } + + @Override + public ErrorResponseWrapper body() { + return (ErrorResponseWrapper) super.body(); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/GlobalServiceConfiguration.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/GlobalServiceConfiguration.java new file mode 100644 index 000000000000..8eae5527ad9a --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/GlobalServiceConfiguration.java @@ -0,0 +1,149 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Global configuration for services in the cluster. + */ +public class GlobalServiceConfiguration { + /** + * Unmatched properties from the message are deserialized this collection. + */ + @JsonProperty(value = "") + private Map additionalProperties; + + /** + * The configuration ETag for updates. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * The SSL configuration properties. + */ + @JsonProperty(value = "ssl") + private SslConfiguration ssl; + + /** + * Optional global authorization keys for all user services deployed in + * cluster. These are used if the service does not have auth keys. + */ + @JsonProperty(value = "serviceAuth") + private ServiceAuthConfiguration serviceAuth; + + /** + * The auto-scale configuration. + */ + @JsonProperty(value = "autoScale") + private AutoScaleConfiguration autoScale; + + /** + * Get unmatched properties from the message are deserialized this collection. + * + * @return the additionalProperties value + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set unmatched properties from the message are deserialized this collection. + * + * @param additionalProperties the additionalProperties value to set + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * Get the configuration ETag for updates. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set the configuration ETag for updates. + * + * @param etag the etag value to set + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the SSL configuration properties. + * + * @return the ssl value + */ + public SslConfiguration ssl() { + return this.ssl; + } + + /** + * Set the SSL configuration properties. + * + * @param ssl the ssl value to set + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withSsl(SslConfiguration ssl) { + this.ssl = ssl; + return this; + } + + /** + * Get optional global authorization keys for all user services deployed in cluster. These are used if the service does not have auth keys. + * + * @return the serviceAuth value + */ + public ServiceAuthConfiguration serviceAuth() { + return this.serviceAuth; + } + + /** + * Set optional global authorization keys for all user services deployed in cluster. These are used if the service does not have auth keys. + * + * @param serviceAuth the serviceAuth value to set + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withServiceAuth(ServiceAuthConfiguration serviceAuth) { + this.serviceAuth = serviceAuth; + return this; + } + + /** + * Get the auto-scale configuration. + * + * @return the autoScale value + */ + public AutoScaleConfiguration autoScale() { + return this.autoScale; + } + + /** + * Set the auto-scale configuration. + * + * @param autoScale the autoScale value to set + * @return the GlobalServiceConfiguration object itself. + */ + public GlobalServiceConfiguration withAutoScale(AutoScaleConfiguration autoScale) { + this.autoScale = autoScale; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/KubernetesClusterProperties.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/KubernetesClusterProperties.java new file mode 100644 index 000000000000..cc796277a388 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/KubernetesClusterProperties.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Kubernetes cluster specific properties. + */ +public class KubernetesClusterProperties { + /** + * The Azure Service Principal used by Kubernetes. + */ + @JsonProperty(value = "servicePrincipal") + private ServicePrincipalProperties servicePrincipal; + + /** + * Get the Azure Service Principal used by Kubernetes. + * + * @return the servicePrincipal value + */ + public ServicePrincipalProperties servicePrincipal() { + return this.servicePrincipal; + } + + /** + * Set the Azure Service Principal used by Kubernetes. + * + * @param servicePrincipal the servicePrincipal value to set + * @return the KubernetesClusterProperties object itself. + */ + public KubernetesClusterProperties withServicePrincipal(ServicePrincipalProperties servicePrincipal) { + this.servicePrincipal = servicePrincipal; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/MachineLearningComputes.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/MachineLearningComputes.java new file mode 100644 index 000000000000..871349931932 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/MachineLearningComputes.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.machinelearningcompute.v2017_08_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.MachineLearningComputesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing MachineLearningComputes. + */ +public interface MachineLearningComputes extends HasInner { + /** + * Gets all available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAvailableOperationsAsync(); + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationStatus.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationStatus.java new file mode 100644 index 000000000000..654ad5ad91b3 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationStatus.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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OperationStatus. + */ +public final class OperationStatus extends ExpandableStringEnum { + /** Static value Unknown for OperationStatus. */ + public static final OperationStatus UNKNOWN = fromString("Unknown"); + + /** Static value Updating for OperationStatus. */ + public static final OperationStatus UPDATING = fromString("Updating"); + + /** Static value Creating for OperationStatus. */ + public static final OperationStatus CREATING = fromString("Creating"); + + /** Static value Deleting for OperationStatus. */ + public static final OperationStatus DELETING = fromString("Deleting"); + + /** Static value Succeeded for OperationStatus. */ + public static final OperationStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for OperationStatus. */ + public static final OperationStatus FAILED = fromString("Failed"); + + /** Static value Canceled for OperationStatus. */ + public static final OperationStatus CANCELED = fromString("Canceled"); + + /** + * Creates or finds a OperationStatus from its string representation. + * @param name a name to look for + * @return the corresponding OperationStatus + */ + @JsonCreator + public static OperationStatus fromString(String name) { + return fromString(name, OperationStatus.class); + } + + /** + * @return known OperationStatus values + */ + public static Collection values() { + return values(OperationStatus.class); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationCluster.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationCluster.java new file mode 100644 index 000000000000..37fe9872cfec --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationCluster.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview; + +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.machinelearningcompute.v2017_08_01_preview.implementation.MachineLearningComputeManager; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.OperationalizationClusterInner; + +/** + * Type representing OperationalizationCluster. + */ +public interface OperationalizationCluster extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the appInsights value. + */ + AppInsightsProperties appInsights(); + + /** + * @return the clusterType value. + */ + ClusterType clusterType(); + + /** + * @return the containerRegistry value. + */ + ContainerRegistryProperties containerRegistry(); + + /** + * @return the containerService value. + */ + AcsClusterProperties containerService(); + + /** + * @return the createdOn value. + */ + DateTime createdOn(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the globalServiceConfiguration value. + */ + GlobalServiceConfiguration globalServiceConfiguration(); + + /** + * @return the modifiedOn value. + */ + DateTime modifiedOn(); + + /** + * @return the provisioningErrors value. + */ + List provisioningErrors(); + + /** + * @return the provisioningState value. + */ + OperationStatus provisioningState(); + + /** + * @return the storageAccount value. + */ + StorageAccountProperties storageAccount(); + + /** + * The entirety of the OperationalizationCluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithClusterType, DefinitionStages.WithCreate { + } + + /** + * Grouping of OperationalizationCluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a OperationalizationCluster definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the OperationalizationCluster definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the operationalizationcluster definition allowing to specify ClusterType. + */ + interface WithClusterType { + /** + * Specifies clusterType. + * @param clusterType The cluster type. Possible values include: 'ACS', 'Local' + * @return the next definition stage +*/ + WithCreate withClusterType(ClusterType clusterType); + } + + /** + * The stage of the operationalizationcluster definition allowing to specify AppInsights. + */ + interface WithAppInsights { + /** + * Specifies appInsights. + * @param appInsights AppInsights configuration + * @return the next definition stage + */ + WithCreate withAppInsights(AppInsightsProperties appInsights); + } + + /** + * The stage of the operationalizationcluster definition allowing to specify ContainerRegistry. + */ + interface WithContainerRegistry { + /** + * Specifies containerRegistry. + * @param containerRegistry Container Registry properties + * @return the next definition stage + */ + WithCreate withContainerRegistry(ContainerRegistryProperties containerRegistry); + } + + /** + * The stage of the operationalizationcluster definition allowing to specify ContainerService. + */ + interface WithContainerService { + /** + * Specifies containerService. + * @param containerService Parameters for the Azure Container Service cluster + * @return the next definition stage + */ + WithCreate withContainerService(AcsClusterProperties containerService); + } + + /** + * The stage of the operationalizationcluster definition allowing to specify Description. + */ + interface WithDescription { + /** + * Specifies description. + * @param description The description of the cluster + * @return the next definition stage + */ + WithCreate withDescription(String description); + } + + /** + * The stage of the operationalizationcluster definition allowing to specify GlobalServiceConfiguration. + */ + interface WithGlobalServiceConfiguration { + /** + * Specifies globalServiceConfiguration. + * @param globalServiceConfiguration Contains global configuration for the web services in the cluster + * @return the next definition stage + */ + WithCreate withGlobalServiceConfiguration(GlobalServiceConfiguration globalServiceConfiguration); + } + + /** + * The stage of the operationalizationcluster definition allowing to specify StorageAccount. + */ + interface WithStorageAccount { + /** + * Specifies storageAccount. + * @param storageAccount Storage Account properties + * @return the next definition stage + */ + WithCreate withStorageAccount(StorageAccountProperties storageAccount); + } + + /** + * 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.WithAppInsights, DefinitionStages.WithContainerRegistry, DefinitionStages.WithContainerService, DefinitionStages.WithDescription, DefinitionStages.WithGlobalServiceConfiguration, DefinitionStages.WithStorageAccount { + } + } + /** + * The template for a OperationalizationCluster update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAppInsights, UpdateStages.WithContainerRegistry, UpdateStages.WithContainerService, UpdateStages.WithDescription, UpdateStages.WithGlobalServiceConfiguration, UpdateStages.WithStorageAccount { + } + + /** + * Grouping of OperationalizationCluster update stages. + */ + interface UpdateStages { + /** + * The stage of the operationalizationcluster update allowing to specify AppInsights. + */ + interface WithAppInsights { + /** + * Specifies appInsights. + * @param appInsights AppInsights configuration + * @return the next update stage + */ + Update withAppInsights(AppInsightsProperties appInsights); + } + + /** + * The stage of the operationalizationcluster update allowing to specify ContainerRegistry. + */ + interface WithContainerRegistry { + /** + * Specifies containerRegistry. + * @param containerRegistry Container Registry properties + * @return the next update stage + */ + Update withContainerRegistry(ContainerRegistryProperties containerRegistry); + } + + /** + * The stage of the operationalizationcluster update allowing to specify ContainerService. + */ + interface WithContainerService { + /** + * Specifies containerService. + * @param containerService Parameters for the Azure Container Service cluster + * @return the next update stage + */ + Update withContainerService(AcsClusterProperties containerService); + } + + /** + * The stage of the operationalizationcluster update allowing to specify Description. + */ + interface WithDescription { + /** + * Specifies description. + * @param description The description of the cluster + * @return the next update stage + */ + Update withDescription(String description); + } + + /** + * The stage of the operationalizationcluster update allowing to specify GlobalServiceConfiguration. + */ + interface WithGlobalServiceConfiguration { + /** + * Specifies globalServiceConfiguration. + * @param globalServiceConfiguration Contains global configuration for the web services in the cluster + * @return the next update stage + */ + Update withGlobalServiceConfiguration(GlobalServiceConfiguration globalServiceConfiguration); + } + + /** + * The stage of the operationalizationcluster update allowing to specify StorageAccount. + */ + interface WithStorageAccount { + /** + * Specifies storageAccount. + * @param storageAccount Storage Account properties + * @return the next update stage + */ + Update withStorageAccount(StorageAccountProperties storageAccount); + } + + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusterCredentials.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusterCredentials.java new file mode 100644 index 000000000000..7c25bb43f31a --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusterCredentials.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.machinelearningcompute.v2017_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.MachineLearningComputeManager; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.OperationalizationClusterCredentialsInner; + +/** + * Type representing OperationalizationClusterCredentials. + */ +public interface OperationalizationClusterCredentials extends HasInner, HasManager { + /** + * @return the appInsights value. + */ + AppInsightsCredentials appInsights(); + + /** + * @return the containerRegistry value. + */ + ContainerRegistryCredentials containerRegistry(); + + /** + * @return the containerService value. + */ + ContainerServiceCredentials containerService(); + + /** + * @return the serviceAuthConfiguration value. + */ + ServiceAuthConfiguration serviceAuthConfiguration(); + + /** + * @return the sslConfiguration value. + */ + SslConfiguration sslConfiguration(); + + /** + * @return the storageAccount value. + */ + StorageAccountCredentials storageAccount(); + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusterUpdateParameters.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusterUpdateParameters.java new file mode 100644 index 000000000000..0c181dea1a04 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusterUpdateParameters.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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for PATCH operation on an operationalization cluster. + */ +public class OperationalizationClusterUpdateParameters { + /** + * Gets or sets a list of key value pairs that describe the resource. These + * tags can be used in viewing and grouping this resource (across resource + * groups). A maximum of 15 tags can be provided for a resource. Each tag + * must have a key no greater in length than 128 characters and a value no + * greater in length than 256 characters. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Get gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * + * @param tags the tags value to set + * @return the OperationalizationClusterUpdateParameters object itself. + */ + public OperationalizationClusterUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusters.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusters.java new file mode 100644 index 000000000000..3c9cadb56234 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClusters.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.machinelearningcompute.v2017_08_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.OperationalizationClustersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing OperationalizationClusters. + */ +public interface OperationalizationClusters extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listKeysAsync(String resourceGroupName, String clusterName); + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkSystemServicesUpdatesAvailableAsync(String resourceGroupName, String clusterName); + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateSystemServicesAsync(String resourceGroupName, String clusterName); + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClustersDeleteHeaders.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClustersDeleteHeaders.java new file mode 100644 index 000000000000..6c3e7857e77b --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClustersDeleteHeaders.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Delete operation. + */ +public class OperationalizationClustersDeleteHeaders { + /** + * URI of the async operation. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get uRI of the async operation. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set uRI of the async operation. + * + * @param location the location value to set + * @return the OperationalizationClustersDeleteHeaders object itself. + */ + public OperationalizationClustersDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClustersUpdateSystemServicesHeaders.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClustersUpdateSystemServicesHeaders.java new file mode 100644 index 000000000000..157444b51718 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OperationalizationClustersUpdateSystemServicesHeaders.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for UpdateSystemServices operation. + */ +public class OperationalizationClustersUpdateSystemServicesHeaders { + /** + * URI of the async operation. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get uRI of the async operation. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set uRI of the async operation. + * + * @param location the location value to set + * @return the OperationalizationClustersUpdateSystemServicesHeaders object itself. + */ + public OperationalizationClustersUpdateSystemServicesHeaders withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OrchestratorType.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OrchestratorType.java new file mode 100644 index 000000000000..5a08925c1a28 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/OrchestratorType.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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OrchestratorType. + */ +public final class OrchestratorType extends ExpandableStringEnum { + /** Static value Kubernetes for OrchestratorType. */ + public static final OrchestratorType KUBERNETES = fromString("Kubernetes"); + + /** Static value None for OrchestratorType. */ + public static final OrchestratorType NONE = fromString("None"); + + /** + * Creates or finds a OrchestratorType from its string representation. + * @param name a name to look for + * @return the corresponding OrchestratorType + */ + @JsonCreator + public static OrchestratorType fromString(String name) { + return fromString(name, OrchestratorType.class); + } + + /** + * @return known OrchestratorType values + */ + public static Collection values() { + return values(OrchestratorType.class); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ResourceOperation.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ResourceOperation.java new file mode 100644 index 000000000000..69df40378679 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ResourceOperation.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resource operation. + */ +public class ResourceOperation { + /** + * Name of this operation. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display of the operation. + */ + @JsonProperty(value = "display") + private ResourceOperationDisplay display; + + /** + * The operation origin. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Get name of this operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of this operation. + * + * @param name the name value to set + * @return the ResourceOperation object itself. + */ + public ResourceOperation withName(String name) { + this.name = name; + return this; + } + + /** + * Get display of the operation. + * + * @return the display value + */ + public ResourceOperationDisplay display() { + return this.display; + } + + /** + * Set display of the operation. + * + * @param display the display value to set + * @return the ResourceOperation object itself. + */ + public ResourceOperation withDisplay(ResourceOperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the operation origin. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set the operation origin. + * + * @param origin the origin value to set + * @return the ResourceOperation object itself. + */ + public ResourceOperation withOrigin(String origin) { + this.origin = origin; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ResourceOperationDisplay.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ResourceOperationDisplay.java new file mode 100644 index 000000000000..08b2f4f2a85d --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ResourceOperationDisplay.java @@ -0,0 +1,121 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Display of the operation. + */ +public class ResourceOperationDisplay { + /** + * The resource provider name. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The resource name. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The operation. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The description of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the resource provider name. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the resource provider name. + * + * @param provider the provider value to set + * @return the ResourceOperationDisplay object itself. + */ + public ResourceOperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource name. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource name. + * + * @param resource the resource value to set + * @return the ResourceOperationDisplay object itself. + */ + public ResourceOperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation. + * + * @param operation the operation value to set + * @return the ResourceOperationDisplay object itself. + */ + public ResourceOperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description of the operation. + * + * @param description the description value to set + * @return the ResourceOperationDisplay object itself. + */ + public ResourceOperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ServiceAuthConfiguration.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ServiceAuthConfiguration.java new file mode 100644 index 000000000000..2550d001c826 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ServiceAuthConfiguration.java @@ -0,0 +1,72 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Global service auth configuration properties. These are the data-plane + * authorization keys and are used if a service doesn't define it's own. + */ +public class ServiceAuthConfiguration { + /** + * The primary auth key hash. This is not returned in response of GET/PUT + * on the resource.. To see this please call listKeys API. + */ + @JsonProperty(value = "primaryAuthKeyHash", required = true) + private String primaryAuthKeyHash; + + /** + * The secondary auth key hash. This is not returned in response of GET/PUT + * on the resource.. To see this please call listKeys API. + */ + @JsonProperty(value = "secondaryAuthKeyHash", required = true) + private String secondaryAuthKeyHash; + + /** + * Get the primary auth key hash. This is not returned in response of GET/PUT on the resource.. To see this please call listKeys API. + * + * @return the primaryAuthKeyHash value + */ + public String primaryAuthKeyHash() { + return this.primaryAuthKeyHash; + } + + /** + * Set the primary auth key hash. This is not returned in response of GET/PUT on the resource.. To see this please call listKeys API. + * + * @param primaryAuthKeyHash the primaryAuthKeyHash value to set + * @return the ServiceAuthConfiguration object itself. + */ + public ServiceAuthConfiguration withPrimaryAuthKeyHash(String primaryAuthKeyHash) { + this.primaryAuthKeyHash = primaryAuthKeyHash; + return this; + } + + /** + * Get the secondary auth key hash. This is not returned in response of GET/PUT on the resource.. To see this please call listKeys API. + * + * @return the secondaryAuthKeyHash value + */ + public String secondaryAuthKeyHash() { + return this.secondaryAuthKeyHash; + } + + /** + * Set the secondary auth key hash. This is not returned in response of GET/PUT on the resource.. To see this please call listKeys API. + * + * @param secondaryAuthKeyHash the secondaryAuthKeyHash value to set + * @return the ServiceAuthConfiguration object itself. + */ + public ServiceAuthConfiguration withSecondaryAuthKeyHash(String secondaryAuthKeyHash) { + this.secondaryAuthKeyHash = secondaryAuthKeyHash; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ServicePrincipalProperties.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ServicePrincipalProperties.java new file mode 100644 index 000000000000..8547fa5fe454 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/ServicePrincipalProperties.java @@ -0,0 +1,71 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Azure service principal used by Kubernetes for configuring load + * balancers. + */ +public class ServicePrincipalProperties { + /** + * The service principal client ID. + */ + @JsonProperty(value = "clientId", required = true) + private String clientId; + + /** + * The service principal secret. This is not returned in response of + * GET/PUT on the resource. To see this please call listKeys. + */ + @JsonProperty(value = "secret", required = true) + private String secret; + + /** + * Get the service principal client ID. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the service principal client ID. + * + * @param clientId the clientId value to set + * @return the ServicePrincipalProperties object itself. + */ + public ServicePrincipalProperties withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the service principal secret. This is not returned in response of GET/PUT on the resource. To see this please call listKeys. + * + * @return the secret value + */ + public String secret() { + return this.secret; + } + + /** + * Set the service principal secret. This is not returned in response of GET/PUT on the resource. To see this please call listKeys. + * + * @param secret the secret value to set + * @return the ServicePrincipalProperties object itself. + */ + public ServicePrincipalProperties withSecret(String secret) { + this.secret = secret; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SslConfiguration.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SslConfiguration.java new file mode 100644 index 000000000000..b98470603aee --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SslConfiguration.java @@ -0,0 +1,124 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SSL configuration. If configured data-plane calls to user services will be + * exposed over SSL only. + */ +public class SslConfiguration { + /** + * SSL status. Allowed values are Enabled and Disabled. Possible values + * include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "status") + private Status status; + + /** + * The SSL cert data in PEM format. + */ + @JsonProperty(value = "cert") + private String cert; + + /** + * The SSL key data in PEM format. This is not returned in response of + * GET/PUT on the resource. To see this please call listKeys API. + */ + @JsonProperty(value = "key") + private String key; + + /** + * The CName of the certificate. + */ + @JsonProperty(value = "cname") + private String cname; + + /** + * Get sSL status. Allowed values are Enabled and Disabled. Possible values include: 'Enabled', 'Disabled'. + * + * @return the status value + */ + public Status status() { + return this.status; + } + + /** + * Set sSL status. Allowed values are Enabled and Disabled. Possible values include: 'Enabled', 'Disabled'. + * + * @param status the status value to set + * @return the SslConfiguration object itself. + */ + public SslConfiguration withStatus(Status status) { + this.status = status; + return this; + } + + /** + * Get the SSL cert data in PEM format. + * + * @return the cert value + */ + public String cert() { + return this.cert; + } + + /** + * Set the SSL cert data in PEM format. + * + * @param cert the cert value to set + * @return the SslConfiguration object itself. + */ + public SslConfiguration withCert(String cert) { + this.cert = cert; + return this; + } + + /** + * Get the SSL key data in PEM format. This is not returned in response of GET/PUT on the resource. To see this please call listKeys API. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set the SSL key data in PEM format. This is not returned in response of GET/PUT on the resource. To see this please call listKeys API. + * + * @param key the key value to set + * @return the SslConfiguration object itself. + */ + public SslConfiguration withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the CName of the certificate. + * + * @return the cname value + */ + public String cname() { + return this.cname; + } + + /** + * Set the CName of the certificate. + * + * @param cname the cname value to set + * @return the SslConfiguration object itself. + */ + public SslConfiguration withCname(String cname) { + this.cname = cname; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/Status.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/Status.java new file mode 100644 index 000000000000..d8711e0ea93d --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/Status.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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Status. + */ +public final class Status extends ExpandableStringEnum { + /** Static value Enabled for Status. */ + public static final Status ENABLED = fromString("Enabled"); + + /** Static value Disabled for Status. */ + public static final Status DISABLED = fromString("Disabled"); + + /** + * Creates or finds a Status from its string representation. + * @param name a name to look for + * @return the corresponding Status + */ + @JsonCreator + public static Status fromString(String name) { + return fromString(name, Status.class); + } + + /** + * @return known Status values + */ + public static Collection values() { + return values(Status.class); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/StorageAccountCredentials.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/StorageAccountCredentials.java new file mode 100644 index 000000000000..9b63cadaf041 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/StorageAccountCredentials.java @@ -0,0 +1,62 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Access information for the storage account. + */ +public class StorageAccountCredentials { + /** + * The ARM resource ID of the storage account. + */ + @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceId; + + /** + * The primary key of the storage account. + */ + @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String primaryKey; + + /** + * The secondary key of the storage account. + */ + @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryKey; + + /** + * Get the ARM resource ID of the storage account. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the primary key of the storage account. + * + * @return the primaryKey value + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Get the secondary key of the storage account. + * + * @return the secondaryKey value + */ + public String secondaryKey() { + return this.secondaryKey; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/StorageAccountProperties.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/StorageAccountProperties.java new file mode 100644 index 000000000000..0b31148167c3 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/StorageAccountProperties.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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of Storage Account. + */ +public class StorageAccountProperties { + /** + * ARM resource ID of the Azure Storage Account to store CLI specific + * files. If not provided one will be created. This cannot be changed once + * the cluster is created. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get aRM resource ID of the Azure Storage Account to store CLI specific files. If not provided one will be created. This cannot be changed once the cluster is created. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set aRM resource ID of the Azure Storage Account to store CLI specific files. If not provided one will be created. This cannot be changed once the cluster is created. + * + * @param resourceId the resourceId value to set + * @return the StorageAccountProperties object itself. + */ + public StorageAccountProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SystemService.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SystemService.java new file mode 100644 index 000000000000..c0ad473bc02c --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SystemService.java @@ -0,0 +1,74 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a system service deployed in the cluster. + */ +public class SystemService { + /** + * The system service type. Possible values include: 'None', + * 'ScoringFrontEnd', 'BatchFrontEnd'. + */ + @JsonProperty(value = "systemServiceType", required = true) + private SystemServiceType systemServiceType; + + /** + * The public IP address of the system service. + */ + @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String publicIpAddress; + + /** + * The state of the system service. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** + * Get the system service type. Possible values include: 'None', 'ScoringFrontEnd', 'BatchFrontEnd'. + * + * @return the systemServiceType value + */ + public SystemServiceType systemServiceType() { + return this.systemServiceType; + } + + /** + * Set the system service type. Possible values include: 'None', 'ScoringFrontEnd', 'BatchFrontEnd'. + * + * @param systemServiceType the systemServiceType value to set + * @return the SystemService object itself. + */ + public SystemService withSystemServiceType(SystemServiceType systemServiceType) { + this.systemServiceType = systemServiceType; + return this; + } + + /** + * Get the public IP address of the system service. + * + * @return the publicIpAddress value + */ + public String publicIpAddress() { + return this.publicIpAddress; + } + + /** + * Get the state of the system service. + * + * @return the version value + */ + public String version() { + return this.version; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SystemServiceType.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SystemServiceType.java new file mode 100644 index 000000000000..28f4a5241a3d --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/SystemServiceType.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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SystemServiceType. + */ +public final class SystemServiceType extends ExpandableStringEnum { + /** Static value None for SystemServiceType. */ + public static final SystemServiceType NONE = fromString("None"); + + /** Static value ScoringFrontEnd for SystemServiceType. */ + public static final SystemServiceType SCORING_FRONT_END = fromString("ScoringFrontEnd"); + + /** Static value BatchFrontEnd for SystemServiceType. */ + public static final SystemServiceType BATCH_FRONT_END = fromString("BatchFrontEnd"); + + /** + * Creates or finds a SystemServiceType from its string representation. + * @param name a name to look for + * @return the corresponding SystemServiceType + */ + @JsonCreator + public static SystemServiceType fromString(String name) { + return fromString(name, SystemServiceType.class); + } + + /** + * @return known SystemServiceType values + */ + public static Collection values() { + return values(SystemServiceType.class); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/UpdateSystemServicesResponse.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/UpdateSystemServicesResponse.java new file mode 100644 index 000000000000..c6c661376d87 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/UpdateSystemServicesResponse.java @@ -0,0 +1,36 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.MachineLearningComputeManager; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation.UpdateSystemServicesResponseInner; +import org.joda.time.DateTime; + +/** + * Type representing UpdateSystemServicesResponse. + */ +public interface UpdateSystemServicesResponse extends HasInner, HasManager { + /** + * @return the updateCompletedOn value. + */ + DateTime updateCompletedOn(); + + /** + * @return the updateStartedOn value. + */ + DateTime updateStartedOn(); + + /** + * @return the updateStatus value. + */ + OperationStatus updateStatus(); + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/UpdatesAvailable.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/UpdatesAvailable.java new file mode 100644 index 000000000000..28ed4b759f46 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/UpdatesAvailable.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.machinelearningcompute.v2017_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for UpdatesAvailable. + */ +public final class UpdatesAvailable extends ExpandableStringEnum { + /** Static value Yes for UpdatesAvailable. */ + public static final UpdatesAvailable YES = fromString("Yes"); + + /** Static value No for UpdatesAvailable. */ + public static final UpdatesAvailable NO = fromString("No"); + + /** + * Creates or finds a UpdatesAvailable from its string representation. + * @param name a name to look for + * @return the corresponding UpdatesAvailable + */ + @JsonCreator + public static UpdatesAvailable fromString(String name) { + return fromString(name, UpdatesAvailable.class); + } + + /** + * @return known UpdatesAvailable values + */ + public static Collection values() { + return values(UpdatesAvailable.class); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/AvailableOperationsImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/AvailableOperationsImpl.java new file mode 100644 index 000000000000..2ae6607e39a0 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/AvailableOperationsImpl.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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.AvailableOperations; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ResourceOperation; + +class AvailableOperationsImpl extends WrapperImpl implements AvailableOperations { + private final MachineLearningComputeManager manager; + AvailableOperationsImpl(AvailableOperationsInner inner, MachineLearningComputeManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public MachineLearningComputeManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/AvailableOperationsInner.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/AvailableOperationsInner.java new file mode 100644 index 000000000000..575d7854395f --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/AvailableOperationsInner.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.machinelearningcompute.v2017_08_01_preview.implementation; + +import java.util.List; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ResourceOperation; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Available operation list. + */ +public class AvailableOperationsInner { + /** + * An array of available operations. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get an array of available operations. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set an array of available operations. + * + * @param value the value value to set + * @return the AvailableOperationsInner object itself. + */ + public AvailableOperationsInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/CheckSystemServicesUpdatesAvailableResponseImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/CheckSystemServicesUpdatesAvailableResponseImpl.java new file mode 100644 index 000000000000..6ff3c7fbfd9a --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/CheckSystemServicesUpdatesAvailableResponseImpl.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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.CheckSystemServicesUpdatesAvailableResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.UpdatesAvailable; + +class CheckSystemServicesUpdatesAvailableResponseImpl extends WrapperImpl implements CheckSystemServicesUpdatesAvailableResponse { + private final MachineLearningComputeManager manager; + CheckSystemServicesUpdatesAvailableResponseImpl(CheckSystemServicesUpdatesAvailableResponseInner inner, MachineLearningComputeManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public MachineLearningComputeManager manager() { + return this.manager; + } + + @Override + public UpdatesAvailable updatesAvailable() { + return this.inner().updatesAvailable(); + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/CheckSystemServicesUpdatesAvailableResponseInner.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/CheckSystemServicesUpdatesAvailableResponseInner.java new file mode 100644 index 000000000000..c59a6028fe8f --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/CheckSystemServicesUpdatesAvailableResponseInner.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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.UpdatesAvailable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about updates available for system services in a cluster. + */ +public class CheckSystemServicesUpdatesAvailableResponseInner { + /** + * Yes if updates are available for the system services, No if not. + * Possible values include: 'Yes', 'No'. + */ + @JsonProperty(value = "updatesAvailable", access = JsonProperty.Access.WRITE_ONLY) + private UpdatesAvailable updatesAvailable; + + /** + * Get yes if updates are available for the system services, No if not. Possible values include: 'Yes', 'No'. + * + * @return the updatesAvailable value + */ + public UpdatesAvailable updatesAvailable() { + return this.updatesAvailable; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/IdParsingUtils.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..415f7a469fd5 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/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.machinelearningcompute.v2017_08_01_preview.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/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputeManagementClientImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputeManagementClientImpl.java new file mode 100644 index 000000000000..a0c1e88d3e36 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputeManagementClientImpl.java @@ -0,0 +1,210 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview.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 MachineLearningComputeManagementClientImpl class. + */ +public class MachineLearningComputeManagementClientImpl 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; + } + + /** The Azure subscription ID. */ + private String subscriptionId; + + /** + * Gets The Azure subscription ID. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets The Azure subscription ID. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public MachineLearningComputeManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The version of the Microsoft.MachineLearningCompute resource provider API to use. */ + private String apiVersion; + + /** + * Gets The version of the Microsoft.MachineLearningCompute resource provider API to use. + * + * @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 MachineLearningComputeManagementClientImpl 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 MachineLearningComputeManagementClientImpl 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 MachineLearningComputeManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The OperationalizationClustersInner object to access its operations. + */ + private OperationalizationClustersInner operationalizationClusters; + + /** + * Gets the OperationalizationClustersInner object to access its operations. + * @return the OperationalizationClustersInner object. + */ + public OperationalizationClustersInner operationalizationClusters() { + return this.operationalizationClusters; + } + + /** + * The MachineLearningComputesInner object to access its operations. + */ + private MachineLearningComputesInner machineLearningComputes; + + /** + * Gets the MachineLearningComputesInner object to access its operations. + * @return the MachineLearningComputesInner object. + */ + public MachineLearningComputesInner machineLearningComputes() { + return this.machineLearningComputes; + } + + /** + * Initializes an instance of MachineLearningComputeManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public MachineLearningComputeManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of MachineLearningComputeManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public MachineLearningComputeManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of MachineLearningComputeManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public MachineLearningComputeManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2017-08-01-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.operationalizationClusters = new OperationalizationClustersInner(restClient().retrofit(), this); + this.machineLearningComputes = new MachineLearningComputesInner(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(), "MachineLearningComputeManagementClient", "2017-08-01-preview"); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputeManager.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputeManager.java new file mode 100644 index 000000000000..499c09070a71 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputeManager.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.machinelearningcompute.v2017_08_01_preview.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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.MachineLearningComputes; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure MachineLearningCompute resource management. + */ +public final class MachineLearningComputeManager extends ManagerCore { + private OperationalizationClusters operationalizationClusters; + private MachineLearningComputes machineLearningComputes; + /** + * Get a Configurable instance that can be used to create MachineLearningComputeManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new MachineLearningComputeManager.ConfigurableImpl(); + } + /** + * Creates an instance of MachineLearningComputeManager that exposes MachineLearningCompute resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the MachineLearningComputeManager + */ + public static MachineLearningComputeManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new MachineLearningComputeManager(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 MachineLearningComputeManager that exposes MachineLearningCompute resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the MachineLearningComputeManager + */ + public static MachineLearningComputeManager authenticate(RestClient restClient, String subscriptionId) { + return new MachineLearningComputeManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of MachineLearningComputeManager that exposes MachineLearningCompute management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing MachineLearningCompute management API entry points that work across subscriptions + */ + MachineLearningComputeManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage OperationalizationClusters. + */ + public OperationalizationClusters operationalizationClusters() { + if (this.operationalizationClusters == null) { + this.operationalizationClusters = new OperationalizationClustersImpl(this); + } + return this.operationalizationClusters; + } + + /** + * @return Entry point to manage MachineLearningComputes. + */ + public MachineLearningComputes machineLearningComputes() { + if (this.machineLearningComputes == null) { + this.machineLearningComputes = new MachineLearningComputesImpl(this); + } + return this.machineLearningComputes; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public MachineLearningComputeManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return MachineLearningComputeManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private MachineLearningComputeManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new MachineLearningComputeManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputesImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputesImpl.java new file mode 100644 index 000000000000..ff49e5a5dc73 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputesImpl.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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.MachineLearningComputes; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.AvailableOperations; + +class MachineLearningComputesImpl extends WrapperImpl implements MachineLearningComputes { + private final MachineLearningComputeManager manager; + + MachineLearningComputesImpl(MachineLearningComputeManager manager) { + super(manager.inner().machineLearningComputes()); + this.manager = manager; + } + + public MachineLearningComputeManager manager() { + return this.manager; + } + + @Override + public Observable listAvailableOperationsAsync() { + MachineLearningComputesInner client = this.inner(); + return client.listAvailableOperationsAsync() + .map(new Func1() { + @Override + public AvailableOperations call(AvailableOperationsInner inner) { + return new AvailableOperationsImpl(inner, manager()); + } + }); + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputesInner.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputesInner.java new file mode 100644 index 000000000000..a78104393d93 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/MachineLearningComputesInner.java @@ -0,0 +1,128 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview.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.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MachineLearningComputes. + */ +public class MachineLearningComputesInner { + /** The Retrofit service to perform REST calls. */ + private MachineLearningComputesService service; + /** The service client containing this operation class. */ + private MachineLearningComputeManagementClientImpl client; + + /** + * Initializes an instance of MachineLearningComputesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MachineLearningComputesInner(Retrofit retrofit, MachineLearningComputeManagementClientImpl client) { + this.service = retrofit.create(MachineLearningComputesService.class); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningComputes to be + * used by Retrofit to perform actually REST calls. + */ + interface MachineLearningComputesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.MachineLearningComputes listAvailableOperations" }) + @GET("providers/Microsoft.MachineLearningCompute/operations") + Observable> listAvailableOperations(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all available 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 AvailableOperationsInner object if successful. + */ + public AvailableOperationsInner listAvailableOperations() { + return listAvailableOperationsWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Gets all available 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 listAvailableOperationsAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAvailableOperationsWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets all available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AvailableOperationsInner object + */ + public Observable listAvailableOperationsAsync() { + return listAvailableOperationsWithServiceResponseAsync().map(new Func1, AvailableOperationsInner>() { + @Override + public AvailableOperationsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AvailableOperationsInner object + */ + public Observable> listAvailableOperationsWithServiceResponseAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAvailableOperations(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listAvailableOperationsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listAvailableOperationsDelegate(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/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterCredentialsImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterCredentialsImpl.java new file mode 100644 index 000000000000..436611f05c27 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterCredentialsImpl.java @@ -0,0 +1,62 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationClusterCredentials; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.AppInsightsCredentials; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ContainerRegistryCredentials; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ContainerServiceCredentials; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ServiceAuthConfiguration; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.SslConfiguration; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.StorageAccountCredentials; + +class OperationalizationClusterCredentialsImpl extends WrapperImpl implements OperationalizationClusterCredentials { + private final MachineLearningComputeManager manager; + OperationalizationClusterCredentialsImpl(OperationalizationClusterCredentialsInner inner, MachineLearningComputeManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public MachineLearningComputeManager manager() { + return this.manager; + } + + @Override + public AppInsightsCredentials appInsights() { + return this.inner().appInsights(); + } + + @Override + public ContainerRegistryCredentials containerRegistry() { + return this.inner().containerRegistry(); + } + + @Override + public ContainerServiceCredentials containerService() { + return this.inner().containerService(); + } + + @Override + public ServiceAuthConfiguration serviceAuthConfiguration() { + return this.inner().serviceAuthConfiguration(); + } + + @Override + public SslConfiguration sslConfiguration() { + return this.inner().sslConfiguration(); + } + + @Override + public StorageAccountCredentials storageAccount() { + return this.inner().storageAccount(); + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterCredentialsInner.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterCredentialsInner.java new file mode 100644 index 000000000000..b58c7274e270 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterCredentialsInner.java @@ -0,0 +1,180 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.StorageAccountCredentials; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ContainerRegistryCredentials; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ContainerServiceCredentials; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.AppInsightsCredentials; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ServiceAuthConfiguration; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.SslConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Credentials to resources in the cluster. + */ +public class OperationalizationClusterCredentialsInner { + /** + * Credentials for the Storage Account. + */ + @JsonProperty(value = "storageAccount") + private StorageAccountCredentials storageAccount; + + /** + * Credentials for Azure Container Registry. + */ + @JsonProperty(value = "containerRegistry") + private ContainerRegistryCredentials containerRegistry; + + /** + * Credentials for Azure Container Service. + */ + @JsonProperty(value = "containerService") + private ContainerServiceCredentials containerService; + + /** + * Credentials for Azure AppInsights. + */ + @JsonProperty(value = "appInsights") + private AppInsightsCredentials appInsights; + + /** + * Global authorization keys for all user services deployed in cluster. + * These are used if the service does not have auth keys. + */ + @JsonProperty(value = "serviceAuthConfiguration") + private ServiceAuthConfiguration serviceAuthConfiguration; + + /** + * The SSL configuration for the services. + */ + @JsonProperty(value = "sslConfiguration") + private SslConfiguration sslConfiguration; + + /** + * Get credentials for the Storage Account. + * + * @return the storageAccount value + */ + public StorageAccountCredentials storageAccount() { + return this.storageAccount; + } + + /** + * Set credentials for the Storage Account. + * + * @param storageAccount the storageAccount value to set + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withStorageAccount(StorageAccountCredentials storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Get credentials for Azure Container Registry. + * + * @return the containerRegistry value + */ + public ContainerRegistryCredentials containerRegistry() { + return this.containerRegistry; + } + + /** + * Set credentials for Azure Container Registry. + * + * @param containerRegistry the containerRegistry value to set + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withContainerRegistry(ContainerRegistryCredentials containerRegistry) { + this.containerRegistry = containerRegistry; + return this; + } + + /** + * Get credentials for Azure Container Service. + * + * @return the containerService value + */ + public ContainerServiceCredentials containerService() { + return this.containerService; + } + + /** + * Set credentials for Azure Container Service. + * + * @param containerService the containerService value to set + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withContainerService(ContainerServiceCredentials containerService) { + this.containerService = containerService; + return this; + } + + /** + * Get credentials for Azure AppInsights. + * + * @return the appInsights value + */ + public AppInsightsCredentials appInsights() { + return this.appInsights; + } + + /** + * Set credentials for Azure AppInsights. + * + * @param appInsights the appInsights value to set + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withAppInsights(AppInsightsCredentials appInsights) { + this.appInsights = appInsights; + return this; + } + + /** + * Get global authorization keys for all user services deployed in cluster. These are used if the service does not have auth keys. + * + * @return the serviceAuthConfiguration value + */ + public ServiceAuthConfiguration serviceAuthConfiguration() { + return this.serviceAuthConfiguration; + } + + /** + * Set global authorization keys for all user services deployed in cluster. These are used if the service does not have auth keys. + * + * @param serviceAuthConfiguration the serviceAuthConfiguration value to set + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withServiceAuthConfiguration(ServiceAuthConfiguration serviceAuthConfiguration) { + this.serviceAuthConfiguration = serviceAuthConfiguration; + return this; + } + + /** + * Get the SSL configuration for the services. + * + * @return the sslConfiguration value + */ + public SslConfiguration sslConfiguration() { + return this.sslConfiguration; + } + + /** + * Set the SSL configuration for the services. + * + * @param sslConfiguration the sslConfiguration value to set + * @return the OperationalizationClusterCredentialsInner object itself. + */ + public OperationalizationClusterCredentialsInner withSslConfiguration(SslConfiguration sslConfiguration) { + this.sslConfiguration = sslConfiguration; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterImpl.java new file mode 100644 index 000000000000..efdda9902b76 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterImpl.java @@ -0,0 +1,153 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationCluster; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationStatus; +import java.util.List; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ErrorResponseWrapper; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ClusterType; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.StorageAccountProperties; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ContainerRegistryProperties; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.AcsClusterProperties; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.AppInsightsProperties; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.GlobalServiceConfiguration; + +class OperationalizationClusterImpl extends GroupableResourceCoreImpl implements OperationalizationCluster, OperationalizationCluster.Definition, OperationalizationCluster.Update { + OperationalizationClusterImpl(String name, OperationalizationClusterInner inner, MachineLearningComputeManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + OperationalizationClustersInner client = this.manager().inner().operationalizationClusters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + OperationalizationClustersInner client = this.manager().inner().operationalizationClusters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + OperationalizationClustersInner client = this.manager().inner().operationalizationClusters(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public AppInsightsProperties appInsights() { + return this.inner().appInsights(); + } + + @Override + public ClusterType clusterType() { + return this.inner().clusterType(); + } + + @Override + public ContainerRegistryProperties containerRegistry() { + return this.inner().containerRegistry(); + } + + @Override + public AcsClusterProperties containerService() { + return this.inner().containerService(); + } + + @Override + public DateTime createdOn() { + return this.inner().createdOn(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public GlobalServiceConfiguration globalServiceConfiguration() { + return this.inner().globalServiceConfiguration(); + } + + @Override + public DateTime modifiedOn() { + return this.inner().modifiedOn(); + } + + @Override + public List provisioningErrors() { + return this.inner().provisioningErrors(); + } + + @Override + public OperationStatus provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public StorageAccountProperties storageAccount() { + return this.inner().storageAccount(); + } + + @Override + public OperationalizationClusterImpl withClusterType(ClusterType clusterType) { + this.inner().withClusterType(clusterType); + return this; + } + + @Override + public OperationalizationClusterImpl withAppInsights(AppInsightsProperties appInsights) { + this.inner().withAppInsights(appInsights); + return this; + } + + @Override + public OperationalizationClusterImpl withContainerRegistry(ContainerRegistryProperties containerRegistry) { + this.inner().withContainerRegistry(containerRegistry); + return this; + } + + @Override + public OperationalizationClusterImpl withContainerService(AcsClusterProperties containerService) { + this.inner().withContainerService(containerService); + return this; + } + + @Override + public OperationalizationClusterImpl withDescription(String description) { + this.inner().withDescription(description); + return this; + } + + @Override + public OperationalizationClusterImpl withGlobalServiceConfiguration(GlobalServiceConfiguration globalServiceConfiguration) { + this.inner().withGlobalServiceConfiguration(globalServiceConfiguration); + return this; + } + + @Override + public OperationalizationClusterImpl withStorageAccount(StorageAccountProperties storageAccount) { + this.inner().withStorageAccount(storageAccount); + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterInner.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterInner.java new file mode 100644 index 000000000000..92da0f0019df --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClusterInner.java @@ -0,0 +1,274 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationStatus; +import java.util.List; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ErrorResponseWrapper; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ClusterType; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.StorageAccountProperties; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.ContainerRegistryProperties; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.AcsClusterProperties; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.AppInsightsProperties; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.GlobalServiceConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Instance of an Azure ML Operationalization Cluster resource. + */ +@JsonFlatten +public class OperationalizationClusterInner extends Resource { + /** + * The description of the cluster. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * The date and time when the cluster was created. + */ + @JsonProperty(value = "properties.createdOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdOn; + + /** + * The date and time when the cluster was last modified. + */ + @JsonProperty(value = "properties.modifiedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime modifiedOn; + + /** + * The provision state of the cluster. Valid values are Unknown, Updating, + * Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', + * 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus provisioningState; + + /** + * List of provisioning errors reported by the resource provider. + */ + @JsonProperty(value = "properties.provisioningErrors", access = JsonProperty.Access.WRITE_ONLY) + private List provisioningErrors; + + /** + * The cluster type. Possible values include: 'ACS', 'Local'. + */ + @JsonProperty(value = "properties.clusterType", required = true) + private ClusterType clusterType; + + /** + * Storage Account properties. + */ + @JsonProperty(value = "properties.storageAccount") + private StorageAccountProperties storageAccount; + + /** + * Container Registry properties. + */ + @JsonProperty(value = "properties.containerRegistry") + private ContainerRegistryProperties containerRegistry; + + /** + * Parameters for the Azure Container Service cluster. + */ + @JsonProperty(value = "properties.containerService") + private AcsClusterProperties containerService; + + /** + * AppInsights configuration. + */ + @JsonProperty(value = "properties.appInsights") + private AppInsightsProperties appInsights; + + /** + * Contains global configuration for the web services in the cluster. + */ + @JsonProperty(value = "properties.globalServiceConfiguration") + private GlobalServiceConfiguration globalServiceConfiguration; + + /** + * Get the description of the cluster. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description of the cluster. + * + * @param description the description value to set + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the date and time when the cluster was created. + * + * @return the createdOn value + */ + public DateTime createdOn() { + return this.createdOn; + } + + /** + * Get the date and time when the cluster was last modified. + * + * @return the modifiedOn value + */ + public DateTime modifiedOn() { + return this.modifiedOn; + } + + /** + * Get the provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'. + * + * @return the provisioningState value + */ + public OperationStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get list of provisioning errors reported by the resource provider. + * + * @return the provisioningErrors value + */ + public List provisioningErrors() { + return this.provisioningErrors; + } + + /** + * Get the cluster type. Possible values include: 'ACS', 'Local'. + * + * @return the clusterType value + */ + public ClusterType clusterType() { + return this.clusterType; + } + + /** + * Set the cluster type. Possible values include: 'ACS', 'Local'. + * + * @param clusterType the clusterType value to set + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withClusterType(ClusterType clusterType) { + this.clusterType = clusterType; + return this; + } + + /** + * Get storage Account properties. + * + * @return the storageAccount value + */ + public StorageAccountProperties storageAccount() { + return this.storageAccount; + } + + /** + * Set storage Account properties. + * + * @param storageAccount the storageAccount value to set + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withStorageAccount(StorageAccountProperties storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Get container Registry properties. + * + * @return the containerRegistry value + */ + public ContainerRegistryProperties containerRegistry() { + return this.containerRegistry; + } + + /** + * Set container Registry properties. + * + * @param containerRegistry the containerRegistry value to set + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withContainerRegistry(ContainerRegistryProperties containerRegistry) { + this.containerRegistry = containerRegistry; + return this; + } + + /** + * Get parameters for the Azure Container Service cluster. + * + * @return the containerService value + */ + public AcsClusterProperties containerService() { + return this.containerService; + } + + /** + * Set parameters for the Azure Container Service cluster. + * + * @param containerService the containerService value to set + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withContainerService(AcsClusterProperties containerService) { + this.containerService = containerService; + return this; + } + + /** + * Get appInsights configuration. + * + * @return the appInsights value + */ + public AppInsightsProperties appInsights() { + return this.appInsights; + } + + /** + * Set appInsights configuration. + * + * @param appInsights the appInsights value to set + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withAppInsights(AppInsightsProperties appInsights) { + this.appInsights = appInsights; + return this; + } + + /** + * Get contains global configuration for the web services in the cluster. + * + * @return the globalServiceConfiguration value + */ + public GlobalServiceConfiguration globalServiceConfiguration() { + return this.globalServiceConfiguration; + } + + /** + * Set contains global configuration for the web services in the cluster. + * + * @param globalServiceConfiguration the globalServiceConfiguration value to set + * @return the OperationalizationClusterInner object itself. + */ + public OperationalizationClusterInner withGlobalServiceConfiguration(GlobalServiceConfiguration globalServiceConfiguration) { + this.globalServiceConfiguration = globalServiceConfiguration; + return this; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClustersImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClustersImpl.java new file mode 100644 index 000000000000..be5a66451d17 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClustersImpl.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. + * def + */ + +package com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationCluster; +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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusterCredentials; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.CheckSystemServicesUpdatesAvailableResponse; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.UpdateSystemServicesResponse; + +class OperationalizationClustersImpl extends GroupableResourcesCoreImpl implements OperationalizationClusters { + protected OperationalizationClustersImpl(MachineLearningComputeManager manager) { + super(manager.inner().operationalizationClusters(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + OperationalizationClustersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + OperationalizationClustersInner 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) { + OperationalizationClustersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + OperationalizationClustersInner 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 OperationalizationCluster call(OperationalizationClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + OperationalizationClustersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + OperationalizationClustersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public OperationalizationCluster call(OperationalizationClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public OperationalizationClusterImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable listKeysAsync(String resourceGroupName, String clusterName) { + OperationalizationClustersInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, clusterName) + .map(new Func1() { + @Override + public OperationalizationClusterCredentials call(OperationalizationClusterCredentialsInner inner) { + return new OperationalizationClusterCredentialsImpl(inner, manager()); + } + }); + } + + @Override + public Observable checkSystemServicesUpdatesAvailableAsync(String resourceGroupName, String clusterName) { + OperationalizationClustersInner client = this.inner(); + return client.checkSystemServicesUpdatesAvailableAsync(resourceGroupName, clusterName) + .map(new Func1() { + @Override + public CheckSystemServicesUpdatesAvailableResponse call(CheckSystemServicesUpdatesAvailableResponseInner inner) { + return new CheckSystemServicesUpdatesAvailableResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateSystemServicesAsync(String resourceGroupName, String clusterName) { + OperationalizationClustersInner client = this.inner(); + return client.updateSystemServicesAsync(resourceGroupName, clusterName) + .map(new Func1() { + @Override + public UpdateSystemServicesResponse call(UpdateSystemServicesResponseInner inner) { + return new UpdateSystemServicesResponseImpl(inner, manager()); + } + }); + } + + @Override + protected OperationalizationClusterImpl wrapModel(OperationalizationClusterInner inner) { + return new OperationalizationClusterImpl(inner.name(), inner, manager()); + } + + @Override + protected OperationalizationClusterImpl wrapModel(String name) { + return new OperationalizationClusterImpl(name, new OperationalizationClusterInner(), this.manager()); + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClustersInner.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClustersInner.java new file mode 100644 index 000000000000..7ca19dbb6d39 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/OperationalizationClustersInner.java @@ -0,0 +1,1867 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview.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.machinelearningcompute.v2017_08_01_preview.ErrorResponseWrapperException; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationClustersDeleteHeaders; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationClustersUpdateSystemServicesHeaders; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationClusterUpdateParameters; +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.ServiceResponseWithHeaders; +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 OperationalizationClusters. + */ +public class OperationalizationClustersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private OperationalizationClustersService service; + /** The service client containing this operation class. */ + private MachineLearningComputeManagementClientImpl client; + + /** + * Initializes an instance of OperationalizationClustersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationalizationClustersInner(Retrofit retrofit, MachineLearningComputeManagementClientImpl client) { + this.service = retrofit.create(OperationalizationClustersService.class); + this.client = client; + } + + /** + * The interface defining all the services for OperationalizationClusters to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationalizationClustersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body OperationalizationClusterInner 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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body OperationalizationClusterInner 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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body OperationalizationClusterUpdateParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Query("deleteAll") Boolean deleteAll, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Query("deleteAll") Boolean deleteAll, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters listKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys") + Observable> listKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters checkSystemServicesUpdatesAvailable" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/checkSystemServicesUpdatesAvailable") + Observable> checkSystemServicesUpdatesAvailable(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters updateSystemServices" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices") + Observable> updateSystemServices(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters beginUpdateSystemServices" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices") + Observable> beginUpdateSystemServices(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$skiptoken") String skiptoken, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningCompute/operationalizationClusters") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$skiptoken") String skiptoken, @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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@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.machinelearningcompute.v2017_08_01_preview.OperationalizationClusters listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationalizationClusterInner object if successful. + */ + public OperationalizationClusterInner createOrUpdate(String resourceGroupName, String clusterName, OperationalizationClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body(); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization 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 createOrUpdateAsync(String resourceGroupName, String clusterName, OperationalizationClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, OperationalizationClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, OperationalizationClusterInner>() { + @Override + public OperationalizationClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, OperationalizationClusterInner 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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, clusterName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationalizationClusterInner object if successful. + */ + public OperationalizationClusterInner beginCreateOrUpdate(String resourceGroupName, String clusterName, OperationalizationClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization 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 beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, OperationalizationClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, OperationalizationClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, OperationalizationClusterInner>() { + @Override + public OperationalizationClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an operationalization cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param parameters Parameters supplied to create or update an Operationalization cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, OperationalizationClusterInner 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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, clusterName, 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 ErrorResponseWrapperException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseWrapperException.class) + .build(response); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationalizationClusterInner object if successful. + */ + public OperationalizationClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 getByResourceGroupAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String clusterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, OperationalizationClusterInner>() { + @Override + public OperationalizationClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call ListKeys to get them. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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, clusterName, 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 ErrorResponseWrapperException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseWrapperException.class) + .build(response); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationalizationClusterInner object if successful. + */ + public OperationalizationClusterInner update(String resourceGroupName, String clusterName) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 updateAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterInner object + */ + public Observable updateAsync(String resourceGroupName, String clusterName) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, OperationalizationClusterInner>() { + @Override + public OperationalizationClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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; + OperationalizationClusterUpdateParameters parameters = new OperationalizationClusterUpdateParameters(); + parameters.withTags(null); + return service.update(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, 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); + } + } + }); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationalizationClusterInner object if successful. + */ + public OperationalizationClusterInner update(String resourceGroupName, String clusterName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, tags).toBlocking().single().body(); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * @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 clusterName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName, tags), serviceCallback); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterInner object + */ + public Observable updateAsync(String resourceGroupName, String clusterName, Map tags) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, tags).map(new Func1, OperationalizationClusterInner>() { + @Override + public OperationalizationClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param tags Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName, 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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); + OperationalizationClusterUpdateParameters parameters = new OperationalizationClusterUpdateParameters(); + parameters.withTags(tags); + return service.update(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, 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 ErrorResponseWrapperException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseWrapperException.class) + .build(response); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException 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 clusterName) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 deleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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 Boolean deleteAll = null; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), deleteAll, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken() { }.getType(), OperationalizationClustersDeleteHeaders.class); + } + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException 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 clusterName, Boolean deleteAll) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName, deleteAll).toBlocking().last().body(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this 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 deleteAsync(String resourceGroupName, String clusterName, Boolean deleteAll, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName, deleteAll), serviceCallback); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName, Boolean deleteAll) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName, deleteAll).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName, Boolean deleteAll) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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, clusterName, this.client.apiVersion(), deleteAll, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken() { }.getType(), OperationalizationClustersDeleteHeaders.class); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException 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 clusterName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 beginDeleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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 Boolean deleteAll = null; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), deleteAll, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseWrapperException 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 clusterName, Boolean deleteAll) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, deleteAll).toBlocking().single().body(); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this 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 beginDeleteAsync(String resourceGroupName, String clusterName, Boolean deleteAll, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, deleteAll), serviceCallback); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName, Boolean deleteAll) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, deleteAll).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @param deleteAll If true, deletes all resources associated with this cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName, Boolean deleteAll) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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, clusterName, this.client.apiVersion(), deleteAll, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginDeleteDelegate(Response response) throws ErrorResponseWrapperException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseWrapperException.class) + .buildWithHeaders(response, OperationalizationClustersDeleteHeaders.class); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 OperationalizationClusterCredentialsInner object if successful. + */ + public OperationalizationClusterCredentialsInner listKeys(String resourceGroupName, String clusterName) { + return listKeysWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 listKeysAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterCredentialsInner object + */ + public Observable listKeysAsync(String resourceGroupName, String clusterName) { + return listKeysWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, OperationalizationClusterCredentialsInner>() { + @Override + public OperationalizationClusterCredentialsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running operation because it fetches keys from dependencies. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationalizationClusterCredentialsInner object + */ + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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.listKeys(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listKeysDelegate(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); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 CheckSystemServicesUpdatesAvailableResponseInner object if successful. + */ + public CheckSystemServicesUpdatesAvailableResponseInner checkSystemServicesUpdatesAvailable(String resourceGroupName, String clusterName) { + return checkSystemServicesUpdatesAvailableWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 checkSystemServicesUpdatesAvailableAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkSystemServicesUpdatesAvailableWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckSystemServicesUpdatesAvailableResponseInner object + */ + public Observable checkSystemServicesUpdatesAvailableAsync(String resourceGroupName, String clusterName) { + return checkSystemServicesUpdatesAvailableWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, CheckSystemServicesUpdatesAvailableResponseInner>() { + @Override + public CheckSystemServicesUpdatesAvailableResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks if updates are available for system services in the cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckSystemServicesUpdatesAvailableResponseInner object + */ + public Observable> checkSystemServicesUpdatesAvailableWithServiceResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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.checkSystemServicesUpdatesAvailable(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkSystemServicesUpdatesAvailableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkSystemServicesUpdatesAvailableDelegate(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 system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 UpdateSystemServicesResponseInner object if successful. + */ + public UpdateSystemServicesResponseInner updateSystemServices(String resourceGroupName, String clusterName) { + return updateSystemServicesWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 updateSystemServicesAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(updateSystemServicesWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateSystemServicesAsync(String resourceGroupName, String clusterName) { + return updateSystemServicesWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, UpdateSystemServicesResponseInner>() { + @Override + public UpdateSystemServicesResponseInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateSystemServicesWithServiceResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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.updateSystemServices(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken() { }.getType(), OperationalizationClustersUpdateSystemServicesHeaders.class); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 UpdateSystemServicesResponseInner object if successful. + */ + public UpdateSystemServicesResponseInner beginUpdateSystemServices(String resourceGroupName, String clusterName) { + return beginUpdateSystemServicesWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the 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 beginUpdateSystemServicesAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginUpdateSystemServicesWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UpdateSystemServicesResponseInner object + */ + public Observable beginUpdateSystemServicesAsync(String resourceGroupName, String clusterName) { + return beginUpdateSystemServicesWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, UpdateSystemServicesResponseInner>() { + @Override + public UpdateSystemServicesResponseInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Updates system services in a cluster. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UpdateSystemServicesResponseInner object + */ + public Observable> beginUpdateSystemServicesWithServiceResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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.beginUpdateSystemServices(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginUpdateSystemServicesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginUpdateSystemServicesDelegate(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) + .buildWithHeaders(response, OperationalizationClustersUpdateSystemServicesHeaders.class); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @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<OperationalizationClusterInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationalizationClusterInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationalizationClusterInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationalizationClusterInner> 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."); + } + final String skiptoken = null; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), skiptoken, 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); + } + } + }); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @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<OperationalizationClusterInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String skiptoken) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @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 String skiptoken, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationalizationClusterInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String skiptoken) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, skiptoken) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the clusters in the specified resource group. + * + * @param resourceGroupName Name of the resource group in which the cluster is located. + * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationalizationClusterInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String skiptoken) { + return listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the clusters in the specified resource group. + * + ServiceResponse> * @param resourceGroupName Name of the resource group in which the cluster is located. + ServiceResponse> * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationalizationClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String skiptoken) { + 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(), skiptoken, 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 the operationalization clusters in the specified subscription. + * + * @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<OperationalizationClusterInner> 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 the operationalization clusters in the specified subscription. + * + * @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 the operationalization clusters in the specified subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationalizationClusterInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationalizationClusterInner> 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 the operationalization clusters in the specified subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationalizationClusterInner> 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."); + } + final String skiptoken = null; + return service.list(this.client.subscriptionId(), this.client.apiVersion(), skiptoken, 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); + } + } + }); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @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<OperationalizationClusterInner> object if successful. + */ + public PagedList list(final String skiptoken) { + ServiceResponse> response = listSinglePageAsync(skiptoken).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @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 skiptoken, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(skiptoken), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationalizationClusterInner> object + */ + public Observable> listAsync(final String skiptoken) { + return listWithServiceResponseAsync(skiptoken) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationalizationClusterInner> object + */ + public Observable>> listWithServiceResponseAsync(final String skiptoken) { + return listSinglePageAsync(skiptoken) + .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 the operationalization clusters in the specified subscription. + * + ServiceResponse> * @param skiptoken Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationalizationClusterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String skiptoken) { + 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(), skiptoken, 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 clusters in the specified resource group. + * + * @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<OperationalizationClusterInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the clusters in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the clusters in the specified resource group. + * + * @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<OperationalizationClusterInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the clusters in the specified resource group. + * + * @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<OperationalizationClusterInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the clusters in the specified resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationalizationClusterInner> 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); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @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<OperationalizationClusterInner> 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 the operationalization clusters in the specified subscription. + * + * @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 the operationalization clusters in the specified subscription. + * + * @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<OperationalizationClusterInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the operationalization clusters in the specified subscription. + * + * @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<OperationalizationClusterInner> 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 the operationalization clusters in the specified subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationalizationClusterInner> 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/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/PageImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/PageImpl.java new file mode 100644 index 000000000000..478be89dfacd --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/UpdateSystemServicesResponseImpl.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/UpdateSystemServicesResponseImpl.java new file mode 100644 index 000000000000..079ad3bf1635 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/UpdateSystemServicesResponseImpl.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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.UpdateSystemServicesResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationStatus; + +class UpdateSystemServicesResponseImpl extends WrapperImpl implements UpdateSystemServicesResponse { + private final MachineLearningComputeManager manager; + UpdateSystemServicesResponseImpl(UpdateSystemServicesResponseInner inner, MachineLearningComputeManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public MachineLearningComputeManager manager() { + return this.manager; + } + + @Override + public DateTime updateCompletedOn() { + return this.inner().updateCompletedOn(); + } + + @Override + public DateTime updateStartedOn() { + return this.inner().updateStartedOn(); + } + + @Override + public OperationStatus updateStatus() { + return this.inner().updateStatus(); + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/UpdateSystemServicesResponseInner.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/UpdateSystemServicesResponseInner.java new file mode 100644 index 000000000000..2ae32beebf48 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/UpdateSystemServicesResponseInner.java @@ -0,0 +1,65 @@ +/** + * 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.machinelearningcompute.v2017_08_01_preview.implementation; + +import com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.OperationStatus; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response of the update system services API. + */ +public class UpdateSystemServicesResponseInner { + /** + * Update status. Possible values include: 'Unknown', 'Updating', + * 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'. + */ + @JsonProperty(value = "updateStatus", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus updateStatus; + + /** + * The date and time when the last system services update was started. + */ + @JsonProperty(value = "updateStartedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime updateStartedOn; + + /** + * The date and time when the last system services update completed. + */ + @JsonProperty(value = "updateCompletedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime updateCompletedOn; + + /** + * Get update status. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'. + * + * @return the updateStatus value + */ + public OperationStatus updateStatus() { + return this.updateStatus; + } + + /** + * Get the date and time when the last system services update was started. + * + * @return the updateStartedOn value + */ + public DateTime updateStartedOn() { + return this.updateStartedOn; + } + + /** + * Get the date and time when the last system services update completed. + * + * @return the updateCompletedOn value + */ + public DateTime updateCompletedOn() { + return this.updateCompletedOn; + } + +} diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/package-info.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/implementation/package-info.java new file mode 100644 index 000000000000..41edb1709742 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/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 MachineLearningComputeManagementClient. + * These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations:
  • Create or update a cluster
  • Get a cluster
  • Patch a cluster
  • Delete a cluster
  • Get keys for a cluster
  • Check if updates are available for system services in a cluster
  • Update system services in a cluster
  • Get all clusters in a resource group
  • Get all clusters in a subscription
. + */ +package com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview.implementation; diff --git a/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/package-info.java b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/package-info.java new file mode 100644 index 000000000000..ed38e2c023a4 --- /dev/null +++ b/machinelearningcompute/resource-manager/v2017_08_01_preview/src/main/java/com/microsoft/azure/management/machinelearningcompute/v2017_08_01_preview/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 MachineLearningComputeManagementClient. + * These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations:
  • Create or update a cluster
  • Get a cluster
  • Patch a cluster
  • Delete a cluster
  • Get keys for a cluster
  • Check if updates are available for system services in a cluster
  • Update system services in a cluster
  • Get all clusters in a resource group
  • Get all clusters in a subscription
. + */ +package com.microsoft.azure.management.machinelearningcompute.v2017_08_01_preview;