
io.apicurio.registry.rest.client.models.ProblemDetails Maven / Gradle / Ivy
package io.apicurio.registry.rest.client.models;
import com.microsoft.kiota.ApiException;
import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* All error responses, whether `4xx` or `5xx` will include one of these as the responsebody.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class ProblemDetails extends ApiException implements AdditionalDataHolder, Parsable {
/**
* Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
*/
private Map additionalData;
/**
* A human-readable explanation specific to this occurrence of the problem.
*/
private String detail;
/**
* A URI reference that identifies the specific occurrence of the problem.
*/
private String instance;
/**
* The name of the error (typically a server exception class name).
*/
private String name;
/**
* The HTTP status code.
*/
private Integer status;
/**
* A short, human-readable summary of the problem type.
*/
private String title;
/**
* A URI reference [RFC3986] that identifies the problem type.
*/
private String type;
/**
* Instantiates a new {@link ProblemDetails} and sets the default values.
*/
public ProblemDetails() {
this.setAdditionalData(new HashMap<>());
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link ProblemDetails}
*/
@jakarta.annotation.Nonnull
public static ProblemDetails createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new ProblemDetails();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a {@link Map}
*/
@jakarta.annotation.Nonnull
public Map getAdditionalData() {
return this.additionalData;
}
/**
* Gets the detail property value. A human-readable explanation specific to this occurrence of the problem.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDetail() {
return this.detail;
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(6);
deserializerMap.put("detail", (n) -> { this.setDetail(n.getStringValue()); });
deserializerMap.put("instance", (n) -> { this.setInstance(n.getStringValue()); });
deserializerMap.put("name", (n) -> { this.setName(n.getStringValue()); });
deserializerMap.put("status", (n) -> { this.setStatus(n.getIntegerValue()); });
deserializerMap.put("title", (n) -> { this.setTitle(n.getStringValue()); });
deserializerMap.put("type", (n) -> { this.setType(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the instance property value. A URI reference that identifies the specific occurrence of the problem.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getInstance() {
return this.instance;
}
/**
* The primary error message.
* @return a {@link String}
*/
@jakarta.annotation.Nonnull
@Override
public String getMessage() {
return super.getMessage();
}
/**
* Gets the name property value. The name of the error (typically a server exception class name).
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getName() {
return this.name;
}
/**
* Gets the status property value. The HTTP status code.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getStatus() {
return this.status;
}
/**
* Gets the title property value. A short, human-readable summary of the problem type.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getTitle() {
return this.title;
}
/**
* Gets the type property value. A URI reference [RFC3986] that identifies the problem type.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getType() {
return this.type;
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("detail", this.getDetail());
writer.writeStringValue("instance", this.getInstance());
writer.writeStringValue("name", this.getName());
writer.writeIntegerValue("status", this.getStatus());
writer.writeStringValue("title", this.getTitle());
writer.writeStringValue("type", this.getType());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
*/
public void setAdditionalData(@jakarta.annotation.Nullable final Map value) {
this.additionalData = value;
}
/**
* Sets the detail property value. A human-readable explanation specific to this occurrence of the problem.
* @param value Value to set for the detail property.
*/
public void setDetail(@jakarta.annotation.Nullable final String value) {
this.detail = value;
}
/**
* Sets the instance property value. A URI reference that identifies the specific occurrence of the problem.
* @param value Value to set for the instance property.
*/
public void setInstance(@jakarta.annotation.Nullable final String value) {
this.instance = value;
}
/**
* Sets the name property value. The name of the error (typically a server exception class name).
* @param value Value to set for the name property.
*/
public void setName(@jakarta.annotation.Nullable final String value) {
this.name = value;
}
/**
* Sets the status property value. The HTTP status code.
* @param value Value to set for the status property.
*/
public void setStatus(@jakarta.annotation.Nullable final Integer value) {
this.status = value;
}
/**
* Sets the title property value. A short, human-readable summary of the problem type.
* @param value Value to set for the title property.
*/
public void setTitle(@jakarta.annotation.Nullable final String value) {
this.title = value;
}
/**
* Sets the type property value. A URI reference [RFC3986] that identifies the problem type.
* @param value Value to set for the type property.
*/
public void setType(@jakarta.annotation.Nullable final String value) {
this.type = value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy