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

com.pulumi.azurenative.compute.inputs.CopyCompletionErrorArgs 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.compute.inputs;

import com.pulumi.azurenative.compute.enums.CopyCompletionErrorReason;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;


/**
 * Indicates the error details if the background copy of a resource created via the CopyStart operation fails.
 * 
 */
public final class CopyCompletionErrorArgs extends com.pulumi.resources.ResourceArgs {

    public static final CopyCompletionErrorArgs Empty = new CopyCompletionErrorArgs();

    /**
     * Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
     * 
     */
    @Import(name="errorCode", required=true)
    private Output> errorCode;

    /**
     * @return Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
     * 
     */
    public Output> errorCode() {
        return this.errorCode;
    }

    /**
     * Indicates the error message if the background copy of a resource created via the CopyStart operation fails.
     * 
     */
    @Import(name="errorMessage", required=true)
    private Output errorMessage;

    /**
     * @return Indicates the error message if the background copy of a resource created via the CopyStart operation fails.
     * 
     */
    public Output errorMessage() {
        return this.errorMessage;
    }

    private CopyCompletionErrorArgs() {}

    private CopyCompletionErrorArgs(CopyCompletionErrorArgs $) {
        this.errorCode = $.errorCode;
        this.errorMessage = $.errorMessage;
    }

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

    public static final class Builder {
        private CopyCompletionErrorArgs $;

        public Builder() {
            $ = new CopyCompletionErrorArgs();
        }

        public Builder(CopyCompletionErrorArgs defaults) {
            $ = new CopyCompletionErrorArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param errorCode Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
         * 
         * @return builder
         * 
         */
        public Builder errorCode(Output> errorCode) {
            $.errorCode = errorCode;
            return this;
        }

        /**
         * @param errorCode Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
         * 
         * @return builder
         * 
         */
        public Builder errorCode(Either errorCode) {
            return errorCode(Output.of(errorCode));
        }

        /**
         * @param errorCode Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
         * 
         * @return builder
         * 
         */
        public Builder errorCode(String errorCode) {
            return errorCode(Either.ofLeft(errorCode));
        }

        /**
         * @param errorCode Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
         * 
         * @return builder
         * 
         */
        public Builder errorCode(CopyCompletionErrorReason errorCode) {
            return errorCode(Either.ofRight(errorCode));
        }

        /**
         * @param errorMessage Indicates the error message if the background copy of a resource created via the CopyStart operation fails.
         * 
         * @return builder
         * 
         */
        public Builder errorMessage(Output errorMessage) {
            $.errorMessage = errorMessage;
            return this;
        }

        /**
         * @param errorMessage Indicates the error message if the background copy of a resource created via the CopyStart operation fails.
         * 
         * @return builder
         * 
         */
        public Builder errorMessage(String errorMessage) {
            return errorMessage(Output.of(errorMessage));
        }

        public CopyCompletionErrorArgs build() {
            if ($.errorCode == null) {
                throw new MissingRequiredPropertyException("CopyCompletionErrorArgs", "errorCode");
            }
            if ($.errorMessage == null) {
                throw new MissingRequiredPropertyException("CopyCompletionErrorArgs", "errorMessage");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy