From 49f82ae9aac948583d5fb37170ace09f97704499 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 29 Mar 2019 22:38:45 +0000 Subject: [PATCH] Generated from 344f1d705ebc1f9424a78a3d78411437322b72bf Fix bug: "artifactLocation" -> "artifactUri" --- .../ImageTemplatePowerShellCustomizer.java | 35 ++++++++++++++++--- .../ImageTemplateShellCustomizer.java | 31 +++++++++++++++- .../v2019_02_01_preview/RunOutput.java | 4 +-- .../implementation/RunOutputImpl.java | 4 +-- .../implementation/RunOutputInner.java | 22 ++++++------ 5 files changed, 76 insertions(+), 20 deletions(-) diff --git a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/ImageTemplatePowerShellCustomizer.java b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/ImageTemplatePowerShellCustomizer.java index a3ca55e48f07..98dca4223f3f 100644 --- a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/ImageTemplatePowerShellCustomizer.java +++ b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/ImageTemplatePowerShellCustomizer.java @@ -15,7 +15,8 @@ /** * Runs the specified PowerShell on the VM (Windows). Corresponds to Packer - * powershell provisioner. + * powershell provisioner. Exactly one of 'script' or 'inline' can be + * specified. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("PowerShell") @@ -28,7 +29,13 @@ public class ImageTemplatePowerShellCustomizer extends ImageTemplateCustomizer { private String script; /** - * The validExitCodes property. + * Array of PowerShell commands to execute. + */ + @JsonProperty(value = "inline") + private List inline; + + /** + * Valid exit codes for the PowerShell script. [Default: 0]. */ @JsonProperty(value = "validExitCodes") private List validExitCodes; @@ -54,7 +61,27 @@ public ImageTemplatePowerShellCustomizer withScript(String script) { } /** - * Get the validExitCodes value. + * Get array of PowerShell commands to execute. + * + * @return the inline value + */ + public List inline() { + return this.inline; + } + + /** + * Set array of PowerShell commands to execute. + * + * @param inline the inline value to set + * @return the ImageTemplatePowerShellCustomizer object itself. + */ + public ImageTemplatePowerShellCustomizer withInline(List inline) { + this.inline = inline; + return this; + } + + /** + * Get valid exit codes for the PowerShell script. [Default: 0]. * * @return the validExitCodes value */ @@ -63,7 +90,7 @@ public List validExitCodes() { } /** - * Set the validExitCodes value. + * Set valid exit codes for the PowerShell script. [Default: 0]. * * @param validExitCodes the validExitCodes value to set * @return the ImageTemplatePowerShellCustomizer object itself. diff --git a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/ImageTemplateShellCustomizer.java b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/ImageTemplateShellCustomizer.java index b0218f3abc1c..7b727998deef 100644 --- a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/ImageTemplateShellCustomizer.java +++ b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/ImageTemplateShellCustomizer.java @@ -8,12 +8,15 @@ package com.microsoft.azure.management.imagebuilder.v2019_02_01_preview; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** - * Runs a shell script during the customization phase (Linux). + * Runs a shell script during the customization phase (Linux). Corresponds to + * Packer shell provisioner. Exactly one of 'script' or 'inline' can be + * specified. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Shell") @@ -25,6 +28,12 @@ public class ImageTemplateShellCustomizer extends ImageTemplateCustomizer { @JsonProperty(value = "script") private String script; + /** + * Array of shell commands to execute. + */ + @JsonProperty(value = "inline") + private List inline; + /** * Get the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc. * @@ -45,4 +54,24 @@ public ImageTemplateShellCustomizer withScript(String script) { return this; } + /** + * Get array of shell commands to execute. + * + * @return the inline value + */ + public List inline() { + return this.inline; + } + + /** + * Set array of shell commands to execute. + * + * @param inline the inline value to set + * @return the ImageTemplateShellCustomizer object itself. + */ + public ImageTemplateShellCustomizer withInline(List inline) { + this.inline = inline; + return this; + } + } diff --git a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/RunOutput.java b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/RunOutput.java index a86315f72a8a..571adb7cd1e1 100644 --- a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/RunOutput.java +++ b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/RunOutput.java @@ -25,9 +25,9 @@ public interface RunOutput extends HasInner, Indexable, Refresha String artifactId(); /** - * @return the artifactLocation value. + * @return the artifactUri value. */ - String artifactLocation(); + String artifactUri(); /** * @return the id value. diff --git a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/implementation/RunOutputImpl.java b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/implementation/RunOutputImpl.java index 08209f112bae..36c78a77d2ee 100644 --- a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/implementation/RunOutputImpl.java +++ b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/implementation/RunOutputImpl.java @@ -46,8 +46,8 @@ public String artifactId() { } @Override - public String artifactLocation() { - return this.inner().artifactLocation(); + public String artifactUri() { + return this.inner().artifactUri(); } @Override diff --git a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/implementation/RunOutputInner.java b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/implementation/RunOutputInner.java index 2246f9fade23..2dd861ed04d5 100644 --- a/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/implementation/RunOutputInner.java +++ b/imagebuilder/resource-manager/v2019_02_01_preview/src/main/java/com/microsoft/azure/management/imagebuilder/v2019_02_01_preview/implementation/RunOutputInner.java @@ -24,10 +24,10 @@ public class RunOutputInner extends SubResource { private String artifactId; /** - * The URL location of the artifact. + * The location URI of the artifact. */ - @JsonProperty(value = "properties.artifactLocation") - private String artifactLocation; + @JsonProperty(value = "properties.artifactUri") + private String artifactUri; /** * Provisioning state of the resource. Possible values include: 'Creating', @@ -69,22 +69,22 @@ public RunOutputInner withArtifactId(String artifactId) { } /** - * Get the URL location of the artifact. + * Get the location URI of the artifact. * - * @return the artifactLocation value + * @return the artifactUri value */ - public String artifactLocation() { - return this.artifactLocation; + public String artifactUri() { + return this.artifactUri; } /** - * Set the URL location of the artifact. + * Set the location URI of the artifact. * - * @param artifactLocation the artifactLocation value to set + * @param artifactUri the artifactUri value to set * @return the RunOutputInner object itself. */ - public RunOutputInner withArtifactLocation(String artifactLocation) { - this.artifactLocation = artifactLocation; + public RunOutputInner withArtifactUri(String artifactUri) { + this.artifactUri = artifactUri; return this; }