com.pulumi.azurenative.databox.outputs.CloudErrorResponse 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.databox.outputs;
import com.pulumi.azurenative.databox.outputs.AdditionalErrorInfoResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class CloudErrorResponse {
/**
* @return Gets or sets additional error info.
*
*/
private List additionalInfo;
/**
* @return Error code.
*
*/
private @Nullable String code;
/**
* @return Gets or sets details for the error.
*
*/
private List details;
/**
* @return The error message parsed from the body of the http error response.
*
*/
private @Nullable String message;
/**
* @return Gets or sets the target of the error.
*
*/
private @Nullable String target;
private CloudErrorResponse() {}
/**
* @return Gets or sets additional error info.
*
*/
public List additionalInfo() {
return this.additionalInfo;
}
/**
* @return Error code.
*
*/
public Optional code() {
return Optional.ofNullable(this.code);
}
/**
* @return Gets or sets details for the error.
*
*/
public List details() {
return this.details;
}
/**
* @return The error message parsed from the body of the http error response.
*
*/
public Optional message() {
return Optional.ofNullable(this.message);
}
/**
* @return Gets or sets the target of the error.
*
*/
public Optional target() {
return Optional.ofNullable(this.target);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(CloudErrorResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private List additionalInfo;
private @Nullable String code;
private List details;
private @Nullable String message;
private @Nullable String target;
public Builder() {}
public Builder(CloudErrorResponse defaults) {
Objects.requireNonNull(defaults);
this.additionalInfo = defaults.additionalInfo;
this.code = defaults.code;
this.details = defaults.details;
this.message = defaults.message;
this.target = defaults.target;
}
@CustomType.Setter
public Builder additionalInfo(List additionalInfo) {
if (additionalInfo == null) {
throw new MissingRequiredPropertyException("CloudErrorResponse", "additionalInfo");
}
this.additionalInfo = additionalInfo;
return this;
}
public Builder additionalInfo(AdditionalErrorInfoResponse... additionalInfo) {
return additionalInfo(List.of(additionalInfo));
}
@CustomType.Setter
public Builder code(@Nullable String code) {
this.code = code;
return this;
}
@CustomType.Setter
public Builder details(List details) {
if (details == null) {
throw new MissingRequiredPropertyException("CloudErrorResponse", "details");
}
this.details = details;
return this;
}
public Builder details(CloudErrorResponse... details) {
return details(List.of(details));
}
@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 CloudErrorResponse build() {
final var _resultValue = new CloudErrorResponse();
_resultValue.additionalInfo = additionalInfo;
_resultValue.code = code;
_resultValue.details = details;
_resultValue.message = message;
_resultValue.target = target;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy