diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/AzureFileVolume.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/AzureFileVolume.java index e1ff347babf..986f586ba00 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/AzureFileVolume.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/AzureFileVolume.java @@ -41,7 +41,7 @@ public class AzureFileVolume { private String storageAccountKey; /** - * Get the shareName value. + * Get the name of the Azure File share to be mounted as a volume. * * @return the shareName value */ @@ -50,7 +50,7 @@ public String shareName() { } /** - * Set the shareName value. + * Set the name of the Azure File share to be mounted as a volume. * * @param shareName the shareName value to set * @return the AzureFileVolume object itself. @@ -61,7 +61,7 @@ public AzureFileVolume withShareName(String shareName) { } /** - * Get the readOnly value. + * Get the flag indicating whether the Azure File shared mounted as a volume is read-only. * * @return the readOnly value */ @@ -70,7 +70,7 @@ public Boolean readOnly() { } /** - * Set the readOnly value. + * Set the flag indicating whether the Azure File shared mounted as a volume is read-only. * * @param readOnly the readOnly value to set * @return the AzureFileVolume object itself. @@ -81,7 +81,7 @@ public AzureFileVolume withReadOnly(Boolean readOnly) { } /** - * Get the storageAccountName value. + * Get the name of the storage account that contains the Azure File share. * * @return the storageAccountName value */ @@ -90,7 +90,7 @@ public String storageAccountName() { } /** - * Set the storageAccountName value. + * Set the name of the storage account that contains the Azure File share. * * @param storageAccountName the storageAccountName value to set * @return the AzureFileVolume object itself. @@ -101,7 +101,7 @@ public AzureFileVolume withStorageAccountName(String storageAccountName) { } /** - * Get the storageAccountKey value. + * Get the storage account access key used to access the Azure File share. * * @return the storageAccountKey value */ @@ -110,7 +110,7 @@ public String storageAccountKey() { } /** - * Set the storageAccountKey value. + * Set the storage account access key used to access the Azure File share. * * @param storageAccountKey the storageAccountKey value to set * @return the AzureFileVolume object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Container.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Container.java index 1008e23448b..c422c9695a1 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Container.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Container.java @@ -66,7 +66,19 @@ public class Container { private List volumeMounts; /** - * Get the name value. + * The liveness probe. + */ + @JsonProperty(value = "properties.livenessProbe") + private ContainerProbe livenessProbe; + + /** + * The readiness probe. + */ + @JsonProperty(value = "properties.readinessProbe") + private ContainerProbe readinessProbe; + + /** + * Get the user-provided name of the container instance. * * @return the name value */ @@ -75,7 +87,7 @@ public String name() { } /** - * Set the name value. + * Set the user-provided name of the container instance. * * @param name the name value to set * @return the Container object itself. @@ -86,7 +98,7 @@ public Container withName(String name) { } /** - * Get the image value. + * Get the name of the image used to create the container instance. * * @return the image value */ @@ -95,7 +107,7 @@ public String image() { } /** - * Set the image value. + * Set the name of the image used to create the container instance. * * @param image the image value to set * @return the Container object itself. @@ -106,7 +118,7 @@ public Container withImage(String image) { } /** - * Get the command value. + * Get the commands to execute within the container instance in exec form. * * @return the command value */ @@ -115,7 +127,7 @@ public List command() { } /** - * Set the command value. + * Set the commands to execute within the container instance in exec form. * * @param command the command value to set * @return the Container object itself. @@ -126,7 +138,7 @@ public Container withCommand(List command) { } /** - * Get the ports value. + * Get the exposed ports on the container instance. * * @return the ports value */ @@ -135,7 +147,7 @@ public List ports() { } /** - * Set the ports value. + * Set the exposed ports on the container instance. * * @param ports the ports value to set * @return the Container object itself. @@ -146,7 +158,7 @@ public Container withPorts(List ports) { } /** - * Get the environmentVariables value. + * Get the environment variables to set in the container instance. * * @return the environmentVariables value */ @@ -155,7 +167,7 @@ public List environmentVariables() { } /** - * Set the environmentVariables value. + * Set the environment variables to set in the container instance. * * @param environmentVariables the environmentVariables value to set * @return the Container object itself. @@ -166,7 +178,7 @@ public Container withEnvironmentVariables(List environmentV } /** - * Get the instanceView value. + * Get the instance view of the container instance. Only valid in response. * * @return the instanceView value */ @@ -175,7 +187,7 @@ public ContainerPropertiesInstanceView instanceView() { } /** - * Get the resources value. + * Get the resource requirements of the container instance. * * @return the resources value */ @@ -184,7 +196,7 @@ public ResourceRequirements resources() { } /** - * Set the resources value. + * Set the resource requirements of the container instance. * * @param resources the resources value to set * @return the Container object itself. @@ -195,7 +207,7 @@ public Container withResources(ResourceRequirements resources) { } /** - * Get the volumeMounts value. + * Get the volume mounts available to the container instance. * * @return the volumeMounts value */ @@ -204,7 +216,7 @@ public List volumeMounts() { } /** - * Set the volumeMounts value. + * Set the volume mounts available to the container instance. * * @param volumeMounts the volumeMounts value to set * @return the Container object itself. @@ -214,4 +226,44 @@ public Container withVolumeMounts(List volumeMounts) { return this; } + /** + * Get the liveness probe. + * + * @return the livenessProbe value + */ + public ContainerProbe livenessProbe() { + return this.livenessProbe; + } + + /** + * Set the liveness probe. + * + * @param livenessProbe the livenessProbe value to set + * @return the Container object itself. + */ + public Container withLivenessProbe(ContainerProbe livenessProbe) { + this.livenessProbe = livenessProbe; + return this; + } + + /** + * Get the readiness probe. + * + * @return the readinessProbe value + */ + public ContainerProbe readinessProbe() { + return this.readinessProbe; + } + + /** + * Set the readiness probe. + * + * @param readinessProbe the readinessProbe value to set + * @return the Container object itself. + */ + public Container withReadinessProbe(ContainerProbe readinessProbe) { + this.readinessProbe = readinessProbe; + return this; + } + } diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExec.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExec.java new file mode 100644 index 00000000000..82861f5123c --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExec.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.containerinstance; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The container execution command, for liveness or readiness probe. + */ +public class ContainerExec { + /** + * The commands to execute within the container. + */ + @JsonProperty(value = "command") + private List command; + + /** + * Get the commands to execute within the container. + * + * @return the command value + */ + public List command() { + return this.command; + } + + /** + * Set the commands to execute within the container. + * + * @param command the command value to set + * @return the ContainerExec object itself. + */ + public ContainerExec withCommand(List command) { + this.command = command; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExecRequest.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExecRequest.java new file mode 100644 index 00000000000..876437463eb --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExecRequest.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.containerinstance; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The start container exec request. + */ +public class ContainerExecRequest { + /** + * The command to be executed. + */ + @JsonProperty(value = "command") + private String command; + + /** + * The size of the terminal. + */ + @JsonProperty(value = "terminalSize") + private ContainerExecRequestTerminalSize terminalSize; + + /** + * Get the command to be executed. + * + * @return the command value + */ + public String command() { + return this.command; + } + + /** + * Set the command to be executed. + * + * @param command the command value to set + * @return the ContainerExecRequest object itself. + */ + public ContainerExecRequest withCommand(String command) { + this.command = command; + return this; + } + + /** + * Get the size of the terminal. + * + * @return the terminalSize value + */ + public ContainerExecRequestTerminalSize terminalSize() { + return this.terminalSize; + } + + /** + * Set the size of the terminal. + * + * @param terminalSize the terminalSize value to set + * @return the ContainerExecRequest object itself. + */ + public ContainerExecRequest withTerminalSize(ContainerExecRequestTerminalSize terminalSize) { + this.terminalSize = terminalSize; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExecRequestTerminalSize.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExecRequestTerminalSize.java new file mode 100644 index 00000000000..e0308c43326 --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerExecRequestTerminalSize.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.containerinstance; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The size of the terminal. + */ +public class ContainerExecRequestTerminalSize { + /** + * The row size of the terminal. + */ + @JsonProperty(value = "row") + private Integer row; + + /** + * The column size of the terminal. + */ + @JsonProperty(value = "column") + private Integer column; + + /** + * Get the row size of the terminal. + * + * @return the row value + */ + public Integer row() { + return this.row; + } + + /** + * Set the row size of the terminal. + * + * @param row the row value to set + * @return the ContainerExecRequestTerminalSize object itself. + */ + public ContainerExecRequestTerminalSize withRow(Integer row) { + this.row = row; + return this; + } + + /** + * Get the column size of the terminal. + * + * @return the column value + */ + public Integer column() { + return this.column; + } + + /** + * Set the column size of the terminal. + * + * @param column the column value to set + * @return the ContainerExecRequestTerminalSize object itself. + */ + public ContainerExecRequestTerminalSize withColumn(Integer column) { + this.column = column; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroupDiagnostics.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroupDiagnostics.java new file mode 100644 index 00000000000..55726f285e1 --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroupDiagnostics.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.containerinstance; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container group diagnostic information. + */ +public class ContainerGroupDiagnostics { + /** + * Container group log analytics information. + */ + @JsonProperty(value = "logAnalytics") + private LogAnalytics logAnalytics; + + /** + * Get container group log analytics information. + * + * @return the logAnalytics value + */ + public LogAnalytics logAnalytics() { + return this.logAnalytics; + } + + /** + * Set container group log analytics information. + * + * @param logAnalytics the logAnalytics value to set + * @return the ContainerGroupDiagnostics object itself. + */ + public ContainerGroupDiagnostics withLogAnalytics(LogAnalytics logAnalytics) { + this.logAnalytics = logAnalytics; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroupPropertiesInstanceView.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroupPropertiesInstanceView.java index c46427f8422..7bc96d5e256 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroupPropertiesInstanceView.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroupPropertiesInstanceView.java @@ -28,7 +28,7 @@ public class ContainerGroupPropertiesInstanceView { private String state; /** - * Get the events value. + * Get the events of this container group. * * @return the events value */ @@ -37,7 +37,7 @@ public List events() { } /** - * Get the state value. + * Get the state of the container group. Only valid in response. * * @return the state value */ diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerHttpGet.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerHttpGet.java new file mode 100644 index 00000000000..ba790c3dcda --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerHttpGet.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.containerinstance; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The container Http Get settings, for liveness or readiness probe. + */ +public class ContainerHttpGet { + /** + * The path to probe. + */ + @JsonProperty(value = "path") + private String path; + + /** + * The port number to probe. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /** + * The scheme. Possible values include: 'http', 'https'. + */ + @JsonProperty(value = "scheme") + private String scheme; + + /** + * Get the path to probe. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the path to probe. + * + * @param path the path value to set + * @return the ContainerHttpGet object itself. + */ + public ContainerHttpGet withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the port number to probe. + * + * @return the port value + */ + public int port() { + return this.port; + } + + /** + * Set the port number to probe. + * + * @param port the port value to set + * @return the ContainerHttpGet object itself. + */ + public ContainerHttpGet withPort(int port) { + this.port = port; + return this; + } + + /** + * Get the scheme. Possible values include: 'http', 'https'. + * + * @return the scheme value + */ + public String scheme() { + return this.scheme; + } + + /** + * Set the scheme. Possible values include: 'http', 'https'. + * + * @param scheme the scheme value to set + * @return the ContainerHttpGet object itself. + */ + public ContainerHttpGet withScheme(String scheme) { + this.scheme = scheme; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerPort.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerPort.java index f9843d0e267..2e0057865f6 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerPort.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerPort.java @@ -28,7 +28,7 @@ public class ContainerPort { private int port; /** - * Get the protocol value. + * Get the protocol associated with the port. Possible values include: 'TCP', 'UDP'. * * @return the protocol value */ @@ -37,7 +37,7 @@ public ContainerNetworkProtocol protocol() { } /** - * Set the protocol value. + * Set the protocol associated with the port. Possible values include: 'TCP', 'UDP'. * * @param protocol the protocol value to set * @return the ContainerPort object itself. @@ -48,7 +48,7 @@ public ContainerPort withProtocol(ContainerNetworkProtocol protocol) { } /** - * Get the port value. + * Get the port number exposed within the container group. * * @return the port value */ @@ -57,7 +57,7 @@ public int port() { } /** - * Set the port value. + * Set the port number exposed within the container group. * * @param port the port value to set * @return the ContainerPort object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerProbe.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerProbe.java new file mode 100644 index 00000000000..2493f70436e --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerProbe.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerinstance; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The container probe, for liveness or readiness. + */ +public class ContainerProbe { + /** + * The execution command to probe. + */ + @JsonProperty(value = "exec") + private ContainerExec exec; + + /** + * The Http Get settings to probe. + */ + @JsonProperty(value = "httpGet") + private ContainerHttpGet httpGet; + + /** + * The initial delay seconds. + */ + @JsonProperty(value = "initialDelaySeconds") + private Integer initialDelaySeconds; + + /** + * The period seconds. + */ + @JsonProperty(value = "periodSeconds") + private Integer periodSeconds; + + /** + * The failure threshold. + */ + @JsonProperty(value = "failureThreshold") + private Integer failureThreshold; + + /** + * The success threshold. + */ + @JsonProperty(value = "successThreshold") + private Integer successThreshold; + + /** + * The timeout seconds. + */ + @JsonProperty(value = "timeoutSeconds") + private Integer timeoutSeconds; + + /** + * Get the execution command to probe. + * + * @return the exec value + */ + public ContainerExec exec() { + return this.exec; + } + + /** + * Set the execution command to probe. + * + * @param exec the exec value to set + * @return the ContainerProbe object itself. + */ + public ContainerProbe withExec(ContainerExec exec) { + this.exec = exec; + return this; + } + + /** + * Get the Http Get settings to probe. + * + * @return the httpGet value + */ + public ContainerHttpGet httpGet() { + return this.httpGet; + } + + /** + * Set the Http Get settings to probe. + * + * @param httpGet the httpGet value to set + * @return the ContainerProbe object itself. + */ + public ContainerProbe withHttpGet(ContainerHttpGet httpGet) { + this.httpGet = httpGet; + return this; + } + + /** + * Get the initial delay seconds. + * + * @return the initialDelaySeconds value + */ + public Integer initialDelaySeconds() { + return this.initialDelaySeconds; + } + + /** + * Set the initial delay seconds. + * + * @param initialDelaySeconds the initialDelaySeconds value to set + * @return the ContainerProbe object itself. + */ + public ContainerProbe withInitialDelaySeconds(Integer initialDelaySeconds) { + this.initialDelaySeconds = initialDelaySeconds; + return this; + } + + /** + * Get the period seconds. + * + * @return the periodSeconds value + */ + public Integer periodSeconds() { + return this.periodSeconds; + } + + /** + * Set the period seconds. + * + * @param periodSeconds the periodSeconds value to set + * @return the ContainerProbe object itself. + */ + public ContainerProbe withPeriodSeconds(Integer periodSeconds) { + this.periodSeconds = periodSeconds; + return this; + } + + /** + * Get the failure threshold. + * + * @return the failureThreshold value + */ + public Integer failureThreshold() { + return this.failureThreshold; + } + + /** + * Set the failure threshold. + * + * @param failureThreshold the failureThreshold value to set + * @return the ContainerProbe object itself. + */ + public ContainerProbe withFailureThreshold(Integer failureThreshold) { + this.failureThreshold = failureThreshold; + return this; + } + + /** + * Get the success threshold. + * + * @return the successThreshold value + */ + public Integer successThreshold() { + return this.successThreshold; + } + + /** + * Set the success threshold. + * + * @param successThreshold the successThreshold value to set + * @return the ContainerProbe object itself. + */ + public ContainerProbe withSuccessThreshold(Integer successThreshold) { + this.successThreshold = successThreshold; + return this; + } + + /** + * Get the timeout seconds. + * + * @return the timeoutSeconds value + */ + public Integer timeoutSeconds() { + return this.timeoutSeconds; + } + + /** + * Set the timeout seconds. + * + * @param timeoutSeconds the timeoutSeconds value to set + * @return the ContainerProbe object itself. + */ + public ContainerProbe withTimeoutSeconds(Integer timeoutSeconds) { + this.timeoutSeconds = timeoutSeconds; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerPropertiesInstanceView.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerPropertiesInstanceView.java index dd72d04ae48..28a31847875 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerPropertiesInstanceView.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerPropertiesInstanceView.java @@ -40,7 +40,7 @@ public class ContainerPropertiesInstanceView { private List events; /** - * Get the restartCount value. + * Get the number of times that the container instance has been restarted. * * @return the restartCount value */ @@ -49,7 +49,7 @@ public Integer restartCount() { } /** - * Get the currentState value. + * Get current container instance state. * * @return the currentState value */ @@ -58,7 +58,7 @@ public ContainerState currentState() { } /** - * Get the previousState value. + * Get previous container instance state. * * @return the previousState value */ @@ -67,7 +67,7 @@ public ContainerState previousState() { } /** - * Get the events value. + * Get the events of the container instance. * * @return the events value */ diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerState.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerState.java index cbb079b471a..4e68dab4bcf 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerState.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerState.java @@ -47,7 +47,7 @@ public class ContainerState { private String detailStatus; /** - * Get the state value. + * Get the state of the container instance. * * @return the state value */ @@ -56,7 +56,7 @@ public String state() { } /** - * Set the state value. + * Set the state of the container instance. * * @param state the state value to set * @return the ContainerState object itself. @@ -67,7 +67,7 @@ public ContainerState withState(String state) { } /** - * Get the startTime value. + * Get the date-time when the container instance state started. * * @return the startTime value */ @@ -76,7 +76,7 @@ public DateTime startTime() { } /** - * Set the startTime value. + * Set the date-time when the container instance state started. * * @param startTime the startTime value to set * @return the ContainerState object itself. @@ -87,7 +87,7 @@ public ContainerState withStartTime(DateTime startTime) { } /** - * Get the exitCode value. + * Get the container instance exit codes correspond to those from the `docker run` command. * * @return the exitCode value */ @@ -96,7 +96,7 @@ public Integer exitCode() { } /** - * Set the exitCode value. + * Set the container instance exit codes correspond to those from the `docker run` command. * * @param exitCode the exitCode value to set * @return the ContainerState object itself. @@ -107,7 +107,7 @@ public ContainerState withExitCode(Integer exitCode) { } /** - * Get the finishTime value. + * Get the date-time when the container instance state finished. * * @return the finishTime value */ @@ -116,7 +116,7 @@ public DateTime finishTime() { } /** - * Set the finishTime value. + * Set the date-time when the container instance state finished. * * @param finishTime the finishTime value to set * @return the ContainerState object itself. @@ -127,7 +127,7 @@ public ContainerState withFinishTime(DateTime finishTime) { } /** - * Get the detailStatus value. + * Get the human-readable status of the container instance state. * * @return the detailStatus value */ @@ -136,7 +136,7 @@ public String detailStatus() { } /** - * Set the detailStatus value. + * Set the human-readable status of the container instance state. * * @param detailStatus the detailStatus value to set * @return the ContainerState object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/EnvironmentVariable.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/EnvironmentVariable.java index b8424382065..04fd87d121c 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/EnvironmentVariable.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/EnvironmentVariable.java @@ -23,11 +23,17 @@ public class EnvironmentVariable { /** * The value of the environment variable. */ - @JsonProperty(value = "value", required = true) + @JsonProperty(value = "value") private String value; /** - * Get the name value. + * The value of the secure environment variable. + */ + @JsonProperty(value = "secureValue") + private String secureValue; + + /** + * Get the name of the environment variable. * * @return the name value */ @@ -36,7 +42,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the environment variable. * * @param name the name value to set * @return the EnvironmentVariable object itself. @@ -47,7 +53,7 @@ public EnvironmentVariable withName(String name) { } /** - * Get the value value. + * Get the value of the environment variable. * * @return the value value */ @@ -56,7 +62,7 @@ public String value() { } /** - * Set the value value. + * Set the value of the environment variable. * * @param value the value value to set * @return the EnvironmentVariable object itself. @@ -66,4 +72,24 @@ public EnvironmentVariable withValue(String value) { return this; } + /** + * Get the value of the secure environment variable. + * + * @return the secureValue value + */ + public String secureValue() { + return this.secureValue; + } + + /** + * Set the value of the secure environment variable. + * + * @param secureValue the secureValue value to set + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withSecureValue(String secureValue) { + this.secureValue = secureValue; + return this; + } + } diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Event.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Event.java index 7aa28dcf83f..d862e147015 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Event.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Event.java @@ -52,7 +52,7 @@ public class Event { private String type; /** - * Get the count value. + * Get the count of the event. * * @return the count value */ @@ -61,7 +61,7 @@ public Integer count() { } /** - * Set the count value. + * Set the count of the event. * * @param count the count value to set * @return the Event object itself. @@ -72,7 +72,7 @@ public Event withCount(Integer count) { } /** - * Get the firstTimestamp value. + * Get the date-time of the earliest logged event. * * @return the firstTimestamp value */ @@ -81,7 +81,7 @@ public DateTime firstTimestamp() { } /** - * Set the firstTimestamp value. + * Set the date-time of the earliest logged event. * * @param firstTimestamp the firstTimestamp value to set * @return the Event object itself. @@ -92,7 +92,7 @@ public Event withFirstTimestamp(DateTime firstTimestamp) { } /** - * Get the lastTimestamp value. + * Get the date-time of the latest logged event. * * @return the lastTimestamp value */ @@ -101,7 +101,7 @@ public DateTime lastTimestamp() { } /** - * Set the lastTimestamp value. + * Set the date-time of the latest logged event. * * @param lastTimestamp the lastTimestamp value to set * @return the Event object itself. @@ -112,7 +112,7 @@ public Event withLastTimestamp(DateTime lastTimestamp) { } /** - * Get the name value. + * Get the event name. * * @return the name value */ @@ -121,7 +121,7 @@ public String name() { } /** - * Set the name value. + * Set the event name. * * @param name the name value to set * @return the Event object itself. @@ -132,7 +132,7 @@ public Event withName(String name) { } /** - * Get the message value. + * Get the event message. * * @return the message value */ @@ -141,7 +141,7 @@ public String message() { } /** - * Set the message value. + * Set the event message. * * @param message the message value to set * @return the Event object itself. @@ -152,7 +152,7 @@ public Event withMessage(String message) { } /** - * Get the type value. + * Get the event type. * * @return the type value */ @@ -161,7 +161,7 @@ public String type() { } /** - * Set the type value. + * Set the event type. * * @param type the type value to set * @return the Event object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/GitRepoVolume.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/GitRepoVolume.java index d5dfc9bebe2..93a8c79e2c9 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/GitRepoVolume.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/GitRepoVolume.java @@ -36,7 +36,7 @@ public class GitRepoVolume { private String revision; /** - * Get the directory value. + * Get target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. * * @return the directory value */ @@ -45,7 +45,7 @@ public String directory() { } /** - * Set the directory value. + * Set target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. * * @param directory the directory value to set * @return the GitRepoVolume object itself. @@ -56,7 +56,7 @@ public GitRepoVolume withDirectory(String directory) { } /** - * Get the repository value. + * Get repository URL. * * @return the repository value */ @@ -65,7 +65,7 @@ public String repository() { } /** - * Set the repository value. + * Set repository URL. * * @param repository the repository value to set * @return the GitRepoVolume object itself. @@ -76,7 +76,7 @@ public GitRepoVolume withRepository(String repository) { } /** - * Get the revision value. + * Get commit hash for the specified revision. * * @return the revision value */ @@ -85,7 +85,7 @@ public String revision() { } /** - * Set the revision value. + * Set commit hash for the specified revision. * * @param revision the revision value to set * @return the GitRepoVolume object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ImageRegistryCredential.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ImageRegistryCredential.java index 34e4764f726..090b85410d0 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ImageRegistryCredential.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ImageRegistryCredential.java @@ -34,7 +34,7 @@ public class ImageRegistryCredential { private String password; /** - * Get the server value. + * Get the Docker image registry server without a protocol such as "http" and "https". * * @return the server value */ @@ -43,7 +43,7 @@ public String server() { } /** - * Set the server value. + * Set the Docker image registry server without a protocol such as "http" and "https". * * @param server the server value to set * @return the ImageRegistryCredential object itself. @@ -54,7 +54,7 @@ public ImageRegistryCredential withServer(String server) { } /** - * Get the username value. + * Get the username for the private registry. * * @return the username value */ @@ -63,7 +63,7 @@ public String username() { } /** - * Set the username value. + * Set the username for the private registry. * * @param username the username value to set * @return the ImageRegistryCredential object itself. @@ -74,7 +74,7 @@ public ImageRegistryCredential withUsername(String username) { } /** - * Get the password value. + * Get the password for the private registry. * * @return the password value */ @@ -83,7 +83,7 @@ public String password() { } /** - * Set the password value. + * Set the password for the private registry. * * @param password the password value to set * @return the ImageRegistryCredential object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/IpAddress.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/IpAddress.java index f03ea53af06..a8c1d88dd33 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/IpAddress.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/IpAddress.java @@ -47,13 +47,14 @@ public class IpAddress { /** * Creates an instance of IpAddress class. + * @param ports the list of ports exposed on the container group. */ public IpAddress() { type = "Public"; } /** - * Get the ports value. + * Get the list of ports exposed on the container group. * * @return the ports value */ @@ -62,7 +63,7 @@ public List ports() { } /** - * Set the ports value. + * Set the list of ports exposed on the container group. * * @param ports the ports value to set * @return the IpAddress object itself. @@ -73,7 +74,7 @@ public IpAddress withPorts(List ports) { } /** - * Get the type value. + * Get specifies if the IP is exposed to the public internet. * * @return the type value */ @@ -82,7 +83,7 @@ public String type() { } /** - * Set the type value. + * Set specifies if the IP is exposed to the public internet. * * @param type the type value to set * @return the IpAddress object itself. @@ -93,7 +94,7 @@ public IpAddress withType(String type) { } /** - * Get the ip value. + * Get the IP exposed to the public internet. * * @return the ip value */ @@ -102,7 +103,7 @@ public String ip() { } /** - * Set the ip value. + * Set the IP exposed to the public internet. * * @param ip the ip value to set * @return the IpAddress object itself. @@ -113,7 +114,7 @@ public IpAddress withIp(String ip) { } /** - * Get the dnsNameLabel value. + * Get the Dns name label for the IP. * * @return the dnsNameLabel value */ @@ -122,7 +123,7 @@ public String dnsNameLabel() { } /** - * Set the dnsNameLabel value. + * Set the Dns name label for the IP. * * @param dnsNameLabel the dnsNameLabel value to set * @return the IpAddress object itself. @@ -133,7 +134,7 @@ public IpAddress withDnsNameLabel(String dnsNameLabel) { } /** - * Get the fqdn value. + * Get the FQDN for the IP. * * @return the fqdn value */ diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/LogAnalytics.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/LogAnalytics.java new file mode 100644 index 00000000000..4eae772221f --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/LogAnalytics.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.containerinstance; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container group log analytics information. + */ +public class LogAnalytics { + /** + * The workspace id for log analytics. + */ + @JsonProperty(value = "workspaceId", required = true) + private String workspaceId; + + /** + * The workspace key for log analytics. + */ + @JsonProperty(value = "workspaceKey", required = true) + private String workspaceKey; + + /** + * Get the workspace id for log analytics. + * + * @return the workspaceId value + */ + public String workspaceId() { + return this.workspaceId; + } + + /** + * Set the workspace id for log analytics. + * + * @param workspaceId the workspaceId value to set + * @return the LogAnalytics object itself. + */ + public LogAnalytics withWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * Get the workspace key for log analytics. + * + * @return the workspaceKey value + */ + public String workspaceKey() { + return this.workspaceKey; + } + + /** + * Set the workspace key for log analytics. + * + * @param workspaceKey the workspaceKey value to set + * @return the LogAnalytics object itself. + */ + public LogAnalytics withWorkspaceKey(String workspaceKey) { + this.workspaceKey = workspaceKey; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Operation.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Operation.java index 6e4746ff45d..09c4d71394d 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Operation.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Operation.java @@ -17,20 +17,20 @@ public class Operation { /** * The name of the operation. */ - @JsonProperty(value = "name", required = true) + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /** * The display information of the operation. */ - @JsonProperty(value = "display", required = true) + @JsonProperty(value = "display") private OperationDisplay display; /** * The intended executor of the operation. Possible values include: 'User', * 'System'. */ - @JsonProperty(value = "origin") + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private ContainerInstanceOperationsOrigin origin; /** @@ -42,17 +42,6 @@ public String name() { return this.name; } - /** - * Set the name value. - * - * @param name the name value to set - * @return the Operation object itself. - */ - public Operation withName(String name) { - this.name = name; - return this; - } - /** * Get the display value. * @@ -82,15 +71,4 @@ public ContainerInstanceOperationsOrigin origin() { return this.origin; } - /** - * Set the origin value. - * - * @param origin the origin value to set - * @return the Operation object itself. - */ - public Operation withOrigin(ContainerInstanceOperationsOrigin origin) { - this.origin = origin; - return this; - } - } diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/OperationDisplay.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/OperationDisplay.java index 8a7505bc63f..041307d9f1d 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/OperationDisplay.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/OperationDisplay.java @@ -39,7 +39,7 @@ public class OperationDisplay { private String description; /** - * Get the provider value. + * Get the name of the provider of the operation. * * @return the provider value */ @@ -48,7 +48,7 @@ public String provider() { } /** - * Set the provider value. + * Set the name of the provider of the operation. * * @param provider the provider value to set * @return the OperationDisplay object itself. @@ -59,7 +59,7 @@ public OperationDisplay withProvider(String provider) { } /** - * Get the resource value. + * Get the name of the resource type of the operation. * * @return the resource value */ @@ -68,7 +68,7 @@ public String resource() { } /** - * Set the resource value. + * Set the name of the resource type of the operation. * * @param resource the resource value to set * @return the OperationDisplay object itself. @@ -79,7 +79,7 @@ public OperationDisplay withResource(String resource) { } /** - * Get the operation value. + * Get the friendly name of the operation. * * @return the operation value */ @@ -88,7 +88,7 @@ public String operation() { } /** - * Set the operation value. + * Set the friendly name of the operation. * * @param operation the operation value to set * @return the OperationDisplay object itself. @@ -99,7 +99,7 @@ public OperationDisplay withOperation(String operation) { } /** - * Get the description value. + * Get the description of the operation. * * @return the description value */ @@ -108,7 +108,7 @@ public String description() { } /** - * Set the description value. + * Set the description of the operation. * * @param description the description value to set * @return the OperationDisplay object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Port.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Port.java index e772f35c422..4a5065fb486 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Port.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Port.java @@ -28,7 +28,7 @@ public class Port { private int port; /** - * Get the protocol value. + * Get the protocol associated with the port. Possible values include: 'TCP', 'UDP'. * * @return the protocol value */ @@ -37,7 +37,7 @@ public ContainerGroupNetworkProtocol protocol() { } /** - * Set the protocol value. + * Set the protocol associated with the port. Possible values include: 'TCP', 'UDP'. * * @param protocol the protocol value to set * @return the Port object itself. @@ -48,7 +48,7 @@ public Port withProtocol(ContainerGroupNetworkProtocol protocol) { } /** - * Get the port value. + * Get the port number. * * @return the port value */ @@ -57,7 +57,7 @@ public int port() { } /** - * Set the port value. + * Set the port number. * * @param port the port value to set * @return the Port object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceLimits.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceLimits.java index 8017e36d8d5..a586184b8d7 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceLimits.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceLimits.java @@ -27,7 +27,7 @@ public class ResourceLimits { private Double cpu; /** - * Get the memoryInGB value. + * Get the memory limit in GB of this container instance. * * @return the memoryInGB value */ @@ -36,7 +36,7 @@ public Double memoryInGB() { } /** - * Set the memoryInGB value. + * Set the memory limit in GB of this container instance. * * @param memoryInGB the memoryInGB value to set * @return the ResourceLimits object itself. @@ -47,7 +47,7 @@ public ResourceLimits withMemoryInGB(Double memoryInGB) { } /** - * Get the cpu value. + * Get the CPU limit of this container instance. * * @return the cpu value */ @@ -56,7 +56,7 @@ public Double cpu() { } /** - * Set the cpu value. + * Set the CPU limit of this container instance. * * @param cpu the cpu value to set * @return the ResourceLimits object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceRequests.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceRequests.java index 2491a58c894..be642a548a8 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceRequests.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceRequests.java @@ -27,7 +27,7 @@ public class ResourceRequests { private double cpu; /** - * Get the memoryInGB value. + * Get the memory request in GB of this container instance. * * @return the memoryInGB value */ @@ -36,7 +36,7 @@ public double memoryInGB() { } /** - * Set the memoryInGB value. + * Set the memory request in GB of this container instance. * * @param memoryInGB the memoryInGB value to set * @return the ResourceRequests object itself. @@ -47,7 +47,7 @@ public ResourceRequests withMemoryInGB(double memoryInGB) { } /** - * Get the cpu value. + * Get the CPU request of this container instance. * * @return the cpu value */ @@ -56,7 +56,7 @@ public double cpu() { } /** - * Set the cpu value. + * Set the CPU request of this container instance. * * @param cpu the cpu value to set * @return the ResourceRequests object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceRequirements.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceRequirements.java index af584094605..d649b0776fe 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceRequirements.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ResourceRequirements.java @@ -27,7 +27,7 @@ public class ResourceRequirements { private ResourceLimits limits; /** - * Get the requests value. + * Get the resource requests of this container instance. * * @return the requests value */ @@ -36,7 +36,7 @@ public ResourceRequests requests() { } /** - * Set the requests value. + * Set the resource requests of this container instance. * * @param requests the requests value to set * @return the ResourceRequirements object itself. @@ -47,7 +47,7 @@ public ResourceRequirements withRequests(ResourceRequests requests) { } /** - * Get the limits value. + * Get the resource limits of this container instance. * * @return the limits value */ @@ -56,7 +56,7 @@ public ResourceLimits limits() { } /** - * Set the limits value. + * Set the resource limits of this container instance. * * @param limits the limits value to set * @return the ResourceRequirements object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Usage.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Usage.java index c67ec0c1973..9646296dddf 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Usage.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Usage.java @@ -39,7 +39,7 @@ public class Usage { private UsageName name; /** - * Get the unit value. + * Get unit of the usage result. * * @return the unit value */ @@ -48,7 +48,7 @@ public String unit() { } /** - * Get the currentValue value. + * Get the current usage of the resource. * * @return the currentValue value */ @@ -57,7 +57,7 @@ public Integer currentValue() { } /** - * Get the limit value. + * Get the maximum permitted usage of the resource. * * @return the limit value */ @@ -66,7 +66,7 @@ public Integer limit() { } /** - * Get the name value. + * Get the name object of the resource. * * @return the name value */ diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/UsageName.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/UsageName.java index b238f437de6..8fa54f8852f 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/UsageName.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/UsageName.java @@ -27,7 +27,7 @@ public class UsageName { private String localizedValue; /** - * Get the value value. + * Get the name of the resource. * * @return the value value */ @@ -36,7 +36,7 @@ public String value() { } /** - * Get the localizedValue value. + * Get the localized name of the resource. * * @return the localizedValue value */ diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Volume.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Volume.java index dbdfffa1ce2..020d337a16d 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Volume.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/Volume.java @@ -46,7 +46,7 @@ public class Volume { private GitRepoVolume gitRepo; /** - * Get the name value. + * Get the name of the volume. * * @return the name value */ @@ -55,7 +55,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the volume. * * @param name the name value to set * @return the Volume object itself. @@ -66,7 +66,7 @@ public Volume withName(String name) { } /** - * Get the azureFile value. + * Get the Azure File volume. * * @return the azureFile value */ @@ -75,7 +75,7 @@ public AzureFileVolume azureFile() { } /** - * Set the azureFile value. + * Set the Azure File volume. * * @param azureFile the azureFile value to set * @return the Volume object itself. @@ -86,7 +86,7 @@ public Volume withAzureFile(AzureFileVolume azureFile) { } /** - * Get the emptyDir value. + * Get the empty directory volume. * * @return the emptyDir value */ @@ -95,7 +95,7 @@ public Object emptyDir() { } /** - * Set the emptyDir value. + * Set the empty directory volume. * * @param emptyDir the emptyDir value to set * @return the Volume object itself. @@ -106,7 +106,7 @@ public Volume withEmptyDir(Object emptyDir) { } /** - * Get the secret value. + * Get the secret volume. * * @return the secret value */ @@ -115,7 +115,7 @@ public Map secret() { } /** - * Set the secret value. + * Set the secret volume. * * @param secret the secret value to set * @return the Volume object itself. @@ -126,7 +126,7 @@ public Volume withSecret(Map secret) { } /** - * Get the gitRepo value. + * Get the git repo volume. * * @return the gitRepo value */ @@ -135,7 +135,7 @@ public GitRepoVolume gitRepo() { } /** - * Set the gitRepo value. + * Set the git repo volume. * * @param gitRepo the gitRepo value to set * @return the Volume object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/VolumeMount.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/VolumeMount.java index 2fa5f7e17b2..942aee18716 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/VolumeMount.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/VolumeMount.java @@ -34,7 +34,7 @@ public class VolumeMount { private Boolean readOnly; /** - * Get the name value. + * Get the name of the volume mount. * * @return the name value */ @@ -43,7 +43,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the volume mount. * * @param name the name value to set * @return the VolumeMount object itself. @@ -54,7 +54,7 @@ public VolumeMount withName(String name) { } /** - * Get the mountPath value. + * Get the path within the container where the volume should be mounted. Must not contain colon (:). * * @return the mountPath value */ @@ -63,7 +63,7 @@ public String mountPath() { } /** - * Set the mountPath value. + * Set the path within the container where the volume should be mounted. Must not contain colon (:). * * @param mountPath the mountPath value to set * @return the VolumeMount object itself. @@ -74,7 +74,7 @@ public VolumeMount withMountPath(String mountPath) { } /** - * Get the readOnly value. + * Get the flag indicating whether the volume mount is read-only. * * @return the readOnly value */ @@ -83,7 +83,7 @@ public Boolean readOnly() { } /** - * Set the readOnly value. + * Set the flag indicating whether the volume mount is read-only. * * @param readOnly the readOnly value to set * @return the VolumeMount object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerExecRequestInner.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerExecRequestInner.java new file mode 100644 index 00000000000..3db3910e4a4 --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerExecRequestInner.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.containerinstance.implementation; + +import com.microsoft.azure.management.containerinstance.ContainerExecRequestTerminalSize; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The start container exec request. + */ +public class ContainerExecRequestInner { + /** + * The command to be executed. + */ + @JsonProperty(value = "command") + private String command; + + /** + * The size of the terminal. + */ + @JsonProperty(value = "terminalSize") + private ContainerExecRequestTerminalSize terminalSize; + + /** + * Get the command value. + * + * @return the command value + */ + public String command() { + return this.command; + } + + /** + * Set the command value. + * + * @param command the command value to set + * @return the ContainerExecRequestInner object itself. + */ + public ContainerExecRequestInner withCommand(String command) { + this.command = command; + return this; + } + + /** + * Get the terminalSize value. + * + * @return the terminalSize value + */ + public ContainerExecRequestTerminalSize terminalSize() { + return this.terminalSize; + } + + /** + * Set the terminalSize value. + * + * @param terminalSize the terminalSize value to set + * @return the ContainerExecRequestInner object itself. + */ + public ContainerExecRequestInner withTerminalSize(ContainerExecRequestTerminalSize terminalSize) { + this.terminalSize = terminalSize; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerExecResponseInner.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerExecResponseInner.java new file mode 100644 index 00000000000..c405e2dc026 --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerExecResponseInner.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.containerinstance.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The information for the container exec command. + */ +public class ContainerExecResponseInner { + /** + * The uri for the exec websocket. + */ + @JsonProperty(value = "webSocketUri") + private String webSocketUri; + + /** + * The password to start the exec command. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the uri for the exec websocket. + * + * @return the webSocketUri value + */ + public String webSocketUri() { + return this.webSocketUri; + } + + /** + * Set the uri for the exec websocket. + * + * @param webSocketUri the webSocketUri value to set + * @return the ContainerExecResponseInner object itself. + */ + public ContainerExecResponseInner withWebSocketUri(String webSocketUri) { + this.webSocketUri = webSocketUri; + return this; + } + + /** + * Get the password to start the exec command. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password to start the exec command. + * + * @param password the password value to set + * @return the ContainerExecResponseInner object itself. + */ + public ContainerExecResponseInner withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupInner.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupInner.java index e11826f7541..9d373b9276a 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupInner.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupInner.java @@ -16,14 +16,17 @@ import com.microsoft.azure.management.containerinstance.OperatingSystemTypes; import com.microsoft.azure.management.containerinstance.Volume; import com.microsoft.azure.management.containerinstance.ContainerGroupPropertiesInstanceView; +import com.microsoft.azure.management.containerinstance.ContainerGroupDiagnostics; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * A container group. */ @JsonFlatten +@SkipParentValidation public class ContainerGroupInner extends Resource { /** * The provisioning state of the container group. This only appears in the @@ -82,7 +85,13 @@ public class ContainerGroupInner extends Resource { private ContainerGroupPropertiesInstanceView instanceView; /** - * Get the provisioningState value. + * The diagnostic information for a container group. + */ + @JsonProperty(value = "properties.diagnostics") + private ContainerGroupDiagnostics diagnostics; + + /** + * Get the provisioning state of the container group. This only appears in the response. * * @return the provisioningState value */ @@ -91,7 +100,7 @@ public String provisioningState() { } /** - * Get the containers value. + * Get the containers within the container group. * * @return the containers value */ @@ -100,7 +109,7 @@ public List containers() { } /** - * Set the containers value. + * Set the containers within the container group. * * @param containers the containers value to set * @return the ContainerGroupInner object itself. @@ -111,7 +120,7 @@ public ContainerGroupInner withContainers(List containers) { } /** - * Get the imageRegistryCredentials value. + * Get the image registry credentials by which the container group is created from. * * @return the imageRegistryCredentials value */ @@ -120,7 +129,7 @@ public List imageRegistryCredentials() { } /** - * Set the imageRegistryCredentials value. + * Set the image registry credentials by which the container group is created from. * * @param imageRegistryCredentials the imageRegistryCredentials value to set * @return the ContainerGroupInner object itself. @@ -131,7 +140,11 @@ public ContainerGroupInner withImageRegistryCredentials(List volumes() { } /** - * Set the volumes value. + * Set the list of volumes that can be mounted by containers in this container group. * * @param volumes the volumes value to set * @return the ContainerGroupInner object itself. @@ -211,7 +228,7 @@ public ContainerGroupInner withVolumes(List volumes) { } /** - * Get the instanceView value. + * Get the instance view of the container group. Only valid in response. * * @return the instanceView value */ @@ -219,4 +236,24 @@ public ContainerGroupPropertiesInstanceView instanceView() { return this.instanceView; } + /** + * Get the diagnostic information for a container group. + * + * @return the diagnostics value + */ + public ContainerGroupDiagnostics diagnostics() { + return this.diagnostics; + } + + /** + * Set the diagnostic information for a container group. + * + * @param diagnostics the diagnostics value to set + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withDiagnostics(ContainerGroupDiagnostics diagnostics) { + this.diagnostics = diagnostics; + return this; + } + } diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupsInner.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupsInner.java index 497049ab7bc..20e9ef85cd2 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupsInner.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupsInner.java @@ -82,6 +82,10 @@ interface ContainerGroupsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}") Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("containerGroupName") String containerGroupName, @Query("api-version") String apiVersion, @Body ContainerGroupInner containerGroup, @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.containerinstance.ContainerGroups beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("containerGroupName") String containerGroupName, @Query("api-version") String apiVersion, @Body ContainerGroupInner containerGroup, @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.containerinstance.ContainerGroups update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}") Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("containerGroupName") String containerGroupName, @Query("api-version") String apiVersion, @Body Resource resource, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -435,7 +439,7 @@ private ServiceResponse getByResourceGroupDelegate(Response * @return the ContainerGroupInner object if successful. */ public ContainerGroupInner createOrUpdate(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).toBlocking().single().body(); + return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).toBlocking().last().body(); } /** @@ -461,7 +465,7 @@ public ServiceFuture createOrUpdateAsync(String resourceGro * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ContainerGroupInner object + * @return the observable for the request */ public Observable createOrUpdateAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).map(new Func1, ContainerGroupInner>() { @@ -480,7 +484,7 @@ public ContainerGroupInner call(ServiceResponse response) { * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ContainerGroupInner object + * @return the observable for the request */ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { if (this.client.subscriptionId() == null) { @@ -499,68 +503,53 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter containerGroup is required and cannot be null."); } Validator.validate(containerGroup); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, containerGroupName, this.client.apiVersion(), containerGroup, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, containerGroupName, this.client.apiVersion(), containerGroup, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Update container groups. - * Updates container group tags with specified values. + * Create or update container groups. + * Create or update container groups with specified configurations. * * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. + * @param containerGroup The properties of the container group to be created or updated. * @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 ContainerGroupInner object if successful. */ - public ContainerGroupInner update(String resourceGroupName, String containerGroupName) { - return updateWithServiceResponseAsync(resourceGroupName, containerGroupName).toBlocking().single().body(); + public ContainerGroupInner beginCreateOrUpdate(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).toBlocking().single().body(); } /** - * Update container groups. - * Updates container group tags with specified values. + * Create or update container groups. + * Create or update container groups with specified configurations. * * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. + * @param containerGroup The properties of the container group to be created or updated. * @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 containerGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, containerGroupName), serviceCallback); + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup), serviceCallback); } /** - * Update container groups. - * Updates container group tags with specified values. + * Create or update container groups. + * Create or update container groups with specified configurations. * * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. + * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ContainerGroupInner object */ - public Observable updateAsync(String resourceGroupName, String containerGroupName) { - return updateWithServiceResponseAsync(resourceGroupName, containerGroupName).map(new Func1, ContainerGroupInner>() { + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).map(new Func1, ContainerGroupInner>() { @Override public ContainerGroupInner call(ServiceResponse response) { return response.body(); @@ -569,15 +558,16 @@ public ContainerGroupInner call(ServiceResponse response) { } /** - * Update container groups. - * Updates container group tags with specified values. + * Create or update container groups. + * Create or update container groups with specified configurations. * * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. + * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ContainerGroupInner object */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String containerGroupName) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -590,13 +580,16 @@ public Observable> updateWithServiceRespons if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - final Resource resource = null; - return service.update(this.client.subscriptionId(), resourceGroupName, containerGroupName, this.client.apiVersion(), resource, this.client.acceptLanguage(), this.client.userAgent()) + if (containerGroup == null) { + throw new IllegalArgumentException("Parameter containerGroup is required and cannot be null."); + } + Validator.validate(containerGroup); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, containerGroupName, this.client.apiVersion(), containerGroup, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -605,6 +598,14 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Update container groups. * Updates container group tags with specified values. @@ -678,6 +679,9 @@ public Observable> updateWithServiceRespons if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } + if (resource == null) { + throw new IllegalArgumentException("Parameter resource is required and cannot be null."); + } Validator.validate(resource); return service.update(this.client.subscriptionId(), resourceGroupName, containerGroupName, this.client.apiVersion(), resource, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerInstanceManagementClientImpl.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerInstanceManagementClientImpl.java index 40bb9c944cd..f3b6e7c453a 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerInstanceManagementClientImpl.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerInstanceManagementClientImpl.java @@ -184,6 +184,19 @@ public ContainerLogsInner containerLogs() { return this.containerLogs; } + /** + * The StartContainersInner object to access its operations. + */ + private StartContainersInner startContainers; + + /** + * Gets the StartContainersInner object to access its operations. + * @return the StartContainersInner object. + */ + public StartContainersInner startContainers() { + return this.startContainers; + } + /** * Initializes an instance of ContainerInstanceManagementClient client. * @@ -215,7 +228,7 @@ public ContainerInstanceManagementClientImpl(RestClient restClient) { } protected void initialize() { - this.apiVersion = "2018-02-01-preview"; + this.apiVersion = "2018-06-01"; this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -223,6 +236,7 @@ protected void initialize() { this.operations = new OperationsInner(restClient().retrofit(), this); this.containerGroupUsages = new ContainerGroupUsagesInner(restClient().retrofit(), this); this.containerLogs = new ContainerLogsInner(restClient().retrofit(), this); + this.startContainers = new StartContainersInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } @@ -233,6 +247,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "ContainerInstanceManagementClient", "2018-02-01-preview"); + return String.format("%s (%s, %s)", super.userAgent(), "ContainerInstanceManagementClient", "2018-06-01"); } } diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/LogsInner.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/LogsInner.java index 8141f2f3cc7..f70811116d9 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/LogsInner.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/LogsInner.java @@ -21,7 +21,7 @@ public class LogsInner { private String content; /** - * Get the content value. + * Get the content of the log. * * @return the content value */ @@ -30,7 +30,7 @@ public String content() { } /** - * Set the content value. + * Set the content of the log. * * @param content the content value to set * @return the LogsInner object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/OperationInner.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/OperationInner.java new file mode 100644 index 00000000000..e98fc1926b5 --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/OperationInner.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerinstance.implementation; + +import com.microsoft.azure.management.containerinstance.OperationDisplay; +import com.microsoft.azure.management.containerinstance.ContainerInstanceOperationsOrigin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An operation for Azure Container Instance service. + */ +public class OperationInner { + /** + * The name of the operation. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The display information of the operation. + */ + @JsonProperty(value = "display", required = true) + private OperationDisplay display; + + /** + * The intended executor of the operation. Possible values include: 'User', + * 'System'. + */ + @JsonProperty(value = "origin") + private ContainerInstanceOperationsOrigin origin; + + /** + * Get the name of the operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the operation. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display information of the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display information of the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the intended executor of the operation. Possible values include: 'User', 'System'. + * + * @return the origin value + */ + public ContainerInstanceOperationsOrigin origin() { + return this.origin; + } + + /** + * Set the intended executor of the operation. Possible values include: 'User', 'System'. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(ContainerInstanceOperationsOrigin origin) { + this.origin = origin; + return this; + } + +} diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/OperationListResultInner.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/OperationListResultInner.java index 40a2a9062be..8a08e5d602b 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/OperationListResultInner.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/OperationListResultInner.java @@ -9,7 +9,6 @@ package com.microsoft.azure.management.containerinstance.implementation; import java.util.List; -import com.microsoft.azure.management.containerinstance.Operation; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -21,7 +20,7 @@ public class OperationListResultInner { * The list of operations. */ @JsonProperty(value = "value") - private List value; + private List value; /** * The URI to fetch the next page of operations. @@ -30,27 +29,27 @@ public class OperationListResultInner { private String nextLink; /** - * Get the value value. + * Get the list of operations. * * @return the value value */ - public List value() { + public List value() { return this.value; } /** - * Set the value value. + * Set the list of operations. * * @param value the value value to set * @return the OperationListResultInner object itself. */ - public OperationListResultInner withValue(List value) { + public OperationListResultInner withValue(List value) { this.value = value; return this; } /** - * Get the nextLink value. + * Get the URI to fetch the next page of operations. * * @return the nextLink value */ @@ -59,7 +58,7 @@ public String nextLink() { } /** - * Set the nextLink value. + * Set the URI to fetch the next page of operations. * * @param nextLink the nextLink value to set * @return the OperationListResultInner object itself. diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/StartContainersInner.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/StartContainersInner.java new file mode 100644 index 00000000000..7a66407c2d2 --- /dev/null +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/StartContainersInner.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.containerinstance.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.containerinstance.ContainerExecRequest; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in StartContainers. + */ +public class StartContainersInner { + /** The Retrofit service to perform REST calls. */ + private StartContainersService service; + /** The service client containing this operation class. */ + private ContainerInstanceManagementClientImpl client; + + /** + * Initializes an instance of StartContainersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public StartContainersInner(Retrofit retrofit, ContainerInstanceManagementClientImpl client) { + this.service = retrofit.create(StartContainersService.class); + this.client = client; + } + + /** + * The interface defining all the services for StartContainers to be + * used by Retrofit to perform actually REST calls. + */ + interface StartContainersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerinstance.StartContainers launchExec" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec") + Observable> launchExec(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("containerGroupName") String containerGroupName, @Path("containerName") String containerName, @Query("api-version") String apiVersion, @Body ContainerExecRequest containerExecRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Starts the exec command for a specific container instance. + * Starts the exec command for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The request for the exec command. + * @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 ContainerExecResponseInner object if successful. + */ + public ContainerExecResponseInner launchExec(String resourceGroupName, String containerGroupName, String containerName, ContainerExecRequest containerExecRequest) { + return launchExecWithServiceResponseAsync(resourceGroupName, containerGroupName, containerName, containerExecRequest).toBlocking().single().body(); + } + + /** + * Starts the exec command for a specific container instance. + * Starts the exec command for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The request for the exec command. + * @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 launchExecAsync(String resourceGroupName, String containerGroupName, String containerName, ContainerExecRequest containerExecRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(launchExecWithServiceResponseAsync(resourceGroupName, containerGroupName, containerName, containerExecRequest), serviceCallback); + } + + /** + * Starts the exec command for a specific container instance. + * Starts the exec command for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The request for the exec command. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerExecResponseInner object + */ + public Observable launchExecAsync(String resourceGroupName, String containerGroupName, String containerName, ContainerExecRequest containerExecRequest) { + return launchExecWithServiceResponseAsync(resourceGroupName, containerGroupName, containerName, containerExecRequest).map(new Func1, ContainerExecResponseInner>() { + @Override + public ContainerExecResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the exec command for a specific container instance. + * Starts the exec command for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The request for the exec command. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerExecResponseInner object + */ + public Observable> launchExecWithServiceResponseAsync(String resourceGroupName, String containerGroupName, String containerName, ContainerExecRequest containerExecRequest) { + 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 (containerGroupName == null) { + throw new IllegalArgumentException("Parameter containerGroupName is required and cannot be null."); + } + if (containerName == null) { + throw new IllegalArgumentException("Parameter containerName 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 (containerExecRequest == null) { + throw new IllegalArgumentException("Parameter containerExecRequest is required and cannot be null."); + } + Validator.validate(containerExecRequest); + return service.launchExec(this.client.subscriptionId(), resourceGroupName, containerGroupName, containerName, this.client.apiVersion(), containerExecRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = launchExecDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse launchExecDelegate(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); + } + +}