com.pulumi.azurenative.workloads.outputs.ErrorResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.workloads.outputs;
import com.pulumi.azurenative.workloads.outputs.ErrorResponseInnerError;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
@CustomType
public final class ErrorResponse {
/**
* @return Server-defined set of error codes.
*
*/
private String code;
/**
* @return Array of details about specific errors that led to this reported error.
*
*/
private List details;
/**
* @return Object containing more specific information than the current object about the error.
*
*/
private ErrorResponseInnerError innerError;
/**
* @return Human-readable representation of the error.
*
*/
private String message;
/**
* @return Target of the error.
*
*/
private String target;
private ErrorResponse() {}
/**
* @return Server-defined set of error codes.
*
*/
public String code() {
return this.code;
}
/**
* @return Array of details about specific errors that led to this reported error.
*
*/
public List details() {
return this.details;
}
/**
* @return Object containing more specific information than the current object about the error.
*
*/
public ErrorResponseInnerError innerError() {
return this.innerError;
}
/**
* @return Human-readable representation of the error.
*
*/
public String message() {
return this.message;
}
/**
* @return Target of the error.
*
*/
public String target() {
return this.target;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ErrorResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String code;
private List details;
private ErrorResponseInnerError innerError;
private String message;
private String target;
public Builder() {}
public Builder(ErrorResponse 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(String code) {
if (code == null) {
throw new MissingRequiredPropertyException("ErrorResponse", "code");
}
this.code = code;
return this;
}
@CustomType.Setter
public Builder details(List details) {
if (details == null) {
throw new MissingRequiredPropertyException("ErrorResponse", "details");
}
this.details = details;
return this;
}
public Builder details(ErrorResponse... details) {
return details(List.of(details));
}
@CustomType.Setter
public Builder innerError(ErrorResponseInnerError innerError) {
if (innerError == null) {
throw new MissingRequiredPropertyException("ErrorResponse", "innerError");
}
this.innerError = innerError;
return this;
}
@CustomType.Setter
public Builder message(String message) {
if (message == null) {
throw new MissingRequiredPropertyException("ErrorResponse", "message");
}
this.message = message;
return this;
}
@CustomType.Setter
public Builder target(String target) {
if (target == null) {
throw new MissingRequiredPropertyException("ErrorResponse", "target");
}
this.target = target;
return this;
}
public ErrorResponse build() {
final var _resultValue = new ErrorResponse();
_resultValue.code = code;
_resultValue.details = details;
_resultValue.innerError = innerError;
_resultValue.message = message;
_resultValue.target = target;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy