All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplatePowerShellValidatorResponse Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.virtualmachineimages.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ImageTemplatePowerShellValidatorResponse {
    /**
     * @return Array of PowerShell commands to execute
     * 
     */
    private @Nullable List inline;
    /**
     * @return Friendly Name to provide context on what this validation step does
     * 
     */
    private @Nullable String name;
    /**
     * @return If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true.
     * 
     */
    private @Nullable Boolean runAsSystem;
    /**
     * @return If specified, the PowerShell script will be run with elevated privileges
     * 
     */
    private @Nullable Boolean runElevated;
    /**
     * @return URI of the PowerShell script to be run for validation. It can be a github link, Azure Storage URI, etc
     * 
     */
    private @Nullable String scriptUri;
    /**
     * @return SHA256 checksum of the power shell script provided in the scriptUri field above
     * 
     */
    private @Nullable String sha256Checksum;
    /**
     * @return The type of validation you want to use on the Image. For example, "Shell" can be shell validation
     * Expected value is 'PowerShell'.
     * 
     */
    private String type;
    /**
     * @return Valid exit codes for the PowerShell script. [Default: 0]
     * 
     */
    private @Nullable List validExitCodes;

    private ImageTemplatePowerShellValidatorResponse() {}
    /**
     * @return Array of PowerShell commands to execute
     * 
     */
    public List inline() {
        return this.inline == null ? List.of() : this.inline;
    }
    /**
     * @return Friendly Name to provide context on what this validation step does
     * 
     */
    public Optional name() {
        return Optional.ofNullable(this.name);
    }
    /**
     * @return If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true.
     * 
     */
    public Optional runAsSystem() {
        return Optional.ofNullable(this.runAsSystem);
    }
    /**
     * @return If specified, the PowerShell script will be run with elevated privileges
     * 
     */
    public Optional runElevated() {
        return Optional.ofNullable(this.runElevated);
    }
    /**
     * @return URI of the PowerShell script to be run for validation. It can be a github link, Azure Storage URI, etc
     * 
     */
    public Optional scriptUri() {
        return Optional.ofNullable(this.scriptUri);
    }
    /**
     * @return SHA256 checksum of the power shell script provided in the scriptUri field above
     * 
     */
    public Optional sha256Checksum() {
        return Optional.ofNullable(this.sha256Checksum);
    }
    /**
     * @return The type of validation you want to use on the Image. For example, "Shell" can be shell validation
     * Expected value is 'PowerShell'.
     * 
     */
    public String type() {
        return this.type;
    }
    /**
     * @return Valid exit codes for the PowerShell script. [Default: 0]
     * 
     */
    public List validExitCodes() {
        return this.validExitCodes == null ? List.of() : this.validExitCodes;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(ImageTemplatePowerShellValidatorResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List inline;
        private @Nullable String name;
        private @Nullable Boolean runAsSystem;
        private @Nullable Boolean runElevated;
        private @Nullable String scriptUri;
        private @Nullable String sha256Checksum;
        private String type;
        private @Nullable List validExitCodes;
        public Builder() {}
        public Builder(ImageTemplatePowerShellValidatorResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.inline = defaults.inline;
    	      this.name = defaults.name;
    	      this.runAsSystem = defaults.runAsSystem;
    	      this.runElevated = defaults.runElevated;
    	      this.scriptUri = defaults.scriptUri;
    	      this.sha256Checksum = defaults.sha256Checksum;
    	      this.type = defaults.type;
    	      this.validExitCodes = defaults.validExitCodes;
        }

        @CustomType.Setter
        public Builder inline(@Nullable List inline) {

            this.inline = inline;
            return this;
        }
        public Builder inline(String... inline) {
            return inline(List.of(inline));
        }
        @CustomType.Setter
        public Builder name(@Nullable String name) {

            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder runAsSystem(@Nullable Boolean runAsSystem) {

            this.runAsSystem = runAsSystem;
            return this;
        }
        @CustomType.Setter
        public Builder runElevated(@Nullable Boolean runElevated) {

            this.runElevated = runElevated;
            return this;
        }
        @CustomType.Setter
        public Builder scriptUri(@Nullable String scriptUri) {

            this.scriptUri = scriptUri;
            return this;
        }
        @CustomType.Setter
        public Builder sha256Checksum(@Nullable String sha256Checksum) {

            this.sha256Checksum = sha256Checksum;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("ImageTemplatePowerShellValidatorResponse", "type");
            }
            this.type = type;
            return this;
        }
        @CustomType.Setter
        public Builder validExitCodes(@Nullable List validExitCodes) {

            this.validExitCodes = validExitCodes;
            return this;
        }
        public Builder validExitCodes(Integer... validExitCodes) {
            return validExitCodes(List.of(validExitCodes));
        }
        public ImageTemplatePowerShellValidatorResponse build() {
            final var _resultValue = new ImageTemplatePowerShellValidatorResponse();
            _resultValue.inline = inline;
            _resultValue.name = name;
            _resultValue.runAsSystem = runAsSystem;
            _resultValue.runElevated = runElevated;
            _resultValue.scriptUri = scriptUri;
            _resultValue.sha256Checksum = sha256Checksum;
            _resultValue.type = type;
            _resultValue.validExitCodes = validExitCodes;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy