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

com.pulumi.azurenative.compute.outputs.ApiErrorResponse Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.outputs;

import com.pulumi.azurenative.compute.outputs.ApiErrorBaseResponse;
import com.pulumi.azurenative.compute.outputs.InnerErrorResponse;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ApiErrorResponse {
    /**
     * @return The error code.
     * 
     */
    private @Nullable String code;
    /**
     * @return The Api error details
     * 
     */
    private @Nullable List details;
    /**
     * @return The Api inner error
     * 
     */
    private @Nullable InnerErrorResponse innererror;
    /**
     * @return The error message.
     * 
     */
    private @Nullable String message;
    /**
     * @return The target of the particular error.
     * 
     */
    private @Nullable String target;

    private ApiErrorResponse() {}
    /**
     * @return The error code.
     * 
     */
    public Optional code() {
        return Optional.ofNullable(this.code);
    }
    /**
     * @return The Api error details
     * 
     */
    public List details() {
        return this.details == null ? List.of() : this.details;
    }
    /**
     * @return The Api inner error
     * 
     */
    public Optional innererror() {
        return Optional.ofNullable(this.innererror);
    }
    /**
     * @return The error message.
     * 
     */
    public Optional message() {
        return Optional.ofNullable(this.message);
    }
    /**
     * @return The target of the particular error.
     * 
     */
    public Optional target() {
        return Optional.ofNullable(this.target);
    }

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

    public static Builder builder(ApiErrorResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String code;
        private @Nullable List details;
        private @Nullable InnerErrorResponse innererror;
        private @Nullable String message;
        private @Nullable String target;
        public Builder() {}
        public Builder(ApiErrorResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.code = defaults.code;
    	      this.details = defaults.details;
    	      this.innererror = defaults.innererror;
    	      this.message = defaults.message;
    	      this.target = defaults.target;
        }

        @CustomType.Setter
        public Builder code(@Nullable String code) {

            this.code = code;
            return this;
        }
        @CustomType.Setter
        public Builder details(@Nullable List details) {

            this.details = details;
            return this;
        }
        public Builder details(ApiErrorBaseResponse... details) {
            return details(List.of(details));
        }
        @CustomType.Setter
        public Builder innererror(@Nullable InnerErrorResponse innererror) {

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

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

            this.target = target;
            return this;
        }
        public ApiErrorResponse build() {
            final var _resultValue = new ApiErrorResponse();
            _resultValue.code = code;
            _resultValue.details = details;
            _resultValue.innererror = innererror;
            _resultValue.message = message;
            _resultValue.target = target;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy