
com.pulumi.azurenative.dataprotection.outputs.UserFacingErrorResponse 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.dataprotection.outputs;
import com.pulumi.azurenative.dataprotection.outputs.InnerErrorResponse;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class UserFacingErrorResponse {
/**
* @return Unique code for this error
*
*/
private @Nullable String code;
/**
* @return Additional related Errors
*
*/
private @Nullable List details;
/**
* @return Inner Error
*
*/
private @Nullable InnerErrorResponse innerError;
/**
* @return Whether the operation will be retryable or not
*
*/
private @Nullable Boolean isRetryable;
/**
* @return Whether the operation is due to a user error or service error
*
*/
private @Nullable Boolean isUserError;
private @Nullable String message;
/**
* @return Any key value pairs that can be injected inside error object
*
*/
private @Nullable Map properties;
/**
* @return RecommendedAction � localized.
*
*/
private @Nullable List recommendedAction;
/**
* @return Target of the error.
*
*/
private @Nullable String target;
private UserFacingErrorResponse() {}
/**
* @return Unique code for this error
*
*/
public Optional code() {
return Optional.ofNullable(this.code);
}
/**
* @return Additional related Errors
*
*/
public List details() {
return this.details == null ? List.of() : this.details;
}
/**
* @return Inner Error
*
*/
public Optional innerError() {
return Optional.ofNullable(this.innerError);
}
/**
* @return Whether the operation will be retryable or not
*
*/
public Optional isRetryable() {
return Optional.ofNullable(this.isRetryable);
}
/**
* @return Whether the operation is due to a user error or service error
*
*/
public Optional isUserError() {
return Optional.ofNullable(this.isUserError);
}
public Optional message() {
return Optional.ofNullable(this.message);
}
/**
* @return Any key value pairs that can be injected inside error object
*
*/
public Map properties() {
return this.properties == null ? Map.of() : this.properties;
}
/**
* @return RecommendedAction � localized.
*
*/
public List recommendedAction() {
return this.recommendedAction == null ? List.of() : this.recommendedAction;
}
/**
* @return Target of the error.
*
*/
public Optional target() {
return Optional.ofNullable(this.target);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(UserFacingErrorResponse 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 Boolean isRetryable;
private @Nullable Boolean isUserError;
private @Nullable String message;
private @Nullable Map properties;
private @Nullable List recommendedAction;
private @Nullable String target;
public Builder() {}
public Builder(UserFacingErrorResponse defaults) {
Objects.requireNonNull(defaults);
this.code = defaults.code;
this.details = defaults.details;
this.innerError = defaults.innerError;
this.isRetryable = defaults.isRetryable;
this.isUserError = defaults.isUserError;
this.message = defaults.message;
this.properties = defaults.properties;
this.recommendedAction = defaults.recommendedAction;
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(UserFacingErrorResponse... details) {
return details(List.of(details));
}
@CustomType.Setter
public Builder innerError(@Nullable InnerErrorResponse innerError) {
this.innerError = innerError;
return this;
}
@CustomType.Setter
public Builder isRetryable(@Nullable Boolean isRetryable) {
this.isRetryable = isRetryable;
return this;
}
@CustomType.Setter
public Builder isUserError(@Nullable Boolean isUserError) {
this.isUserError = isUserError;
return this;
}
@CustomType.Setter
public Builder message(@Nullable String message) {
this.message = message;
return this;
}
@CustomType.Setter
public Builder properties(@Nullable Map properties) {
this.properties = properties;
return this;
}
@CustomType.Setter
public Builder recommendedAction(@Nullable List recommendedAction) {
this.recommendedAction = recommendedAction;
return this;
}
public Builder recommendedAction(String... recommendedAction) {
return recommendedAction(List.of(recommendedAction));
}
@CustomType.Setter
public Builder target(@Nullable String target) {
this.target = target;
return this;
}
public UserFacingErrorResponse build() {
final var _resultValue = new UserFacingErrorResponse();
_resultValue.code = code;
_resultValue.details = details;
_resultValue.innerError = innerError;
_resultValue.isRetryable = isRetryable;
_resultValue.isUserError = isUserError;
_resultValue.message = message;
_resultValue.properties = properties;
_resultValue.recommendedAction = recommendedAction;
_resultValue.target = target;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy