Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.styra.opa.openapi.models.shared.BatchMixedResults Maven / Gradle / Ivy
Go to download
SDK enabling Java developers to easily integrate with the Styra API.
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package com.styra.opa.openapi.models.shared;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.styra.opa.openapi.utils.Utils;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
/**
* BatchMixedResults - Mixed success and failures.
*/
public class BatchMixedResults {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("batch_decision_id")
private Optional batchDecisionId;
/**
* If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("metrics")
private Optional extends Map> metrics;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("responses")
private Optional extends Map> responses;
@JsonCreator
public BatchMixedResults(
@JsonProperty("batch_decision_id") Optional batchDecisionId,
@JsonProperty("metrics") Optional extends Map> metrics,
@JsonProperty("responses") Optional extends Map> responses) {
Utils.checkNotNull(batchDecisionId, "batchDecisionId");
Utils.checkNotNull(metrics, "metrics");
Utils.checkNotNull(responses, "responses");
this.batchDecisionId = batchDecisionId;
this.metrics = metrics;
this.responses = responses;
}
public BatchMixedResults() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional batchDecisionId() {
return batchDecisionId;
}
/**
* If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional> metrics() {
return (Optional>) metrics;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional> responses() {
return (Optional>) responses;
}
public final static Builder builder() {
return new Builder();
}
public BatchMixedResults withBatchDecisionId(String batchDecisionId) {
Utils.checkNotNull(batchDecisionId, "batchDecisionId");
this.batchDecisionId = Optional.ofNullable(batchDecisionId);
return this;
}
public BatchMixedResults withBatchDecisionId(Optional batchDecisionId) {
Utils.checkNotNull(batchDecisionId, "batchDecisionId");
this.batchDecisionId = batchDecisionId;
return this;
}
/**
* If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
*/
public BatchMixedResults withMetrics(Map metrics) {
Utils.checkNotNull(metrics, "metrics");
this.metrics = Optional.ofNullable(metrics);
return this;
}
/**
* If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
*/
public BatchMixedResults withMetrics(Optional extends Map> metrics) {
Utils.checkNotNull(metrics, "metrics");
this.metrics = metrics;
return this;
}
public BatchMixedResults withResponses(Map responses) {
Utils.checkNotNull(responses, "responses");
this.responses = Optional.ofNullable(responses);
return this;
}
public BatchMixedResults withResponses(Optional extends Map> responses) {
Utils.checkNotNull(responses, "responses");
this.responses = responses;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BatchMixedResults other = (BatchMixedResults) o;
return
Objects.deepEquals(this.batchDecisionId, other.batchDecisionId) &&
Objects.deepEquals(this.metrics, other.metrics) &&
Objects.deepEquals(this.responses, other.responses);
}
@Override
public int hashCode() {
return Objects.hash(
batchDecisionId,
metrics,
responses);
}
@Override
public String toString() {
return Utils.toString(BatchMixedResults.class,
"batchDecisionId", batchDecisionId,
"metrics", metrics,
"responses", responses);
}
public final static class Builder {
private Optional batchDecisionId = Optional.empty();
private Optional extends Map> metrics = Optional.empty();
private Optional extends Map> responses = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder batchDecisionId(String batchDecisionId) {
Utils.checkNotNull(batchDecisionId, "batchDecisionId");
this.batchDecisionId = Optional.ofNullable(batchDecisionId);
return this;
}
public Builder batchDecisionId(Optional batchDecisionId) {
Utils.checkNotNull(batchDecisionId, "batchDecisionId");
this.batchDecisionId = batchDecisionId;
return this;
}
/**
* If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
*/
public Builder metrics(Map metrics) {
Utils.checkNotNull(metrics, "metrics");
this.metrics = Optional.ofNullable(metrics);
return this;
}
/**
* If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
*/
public Builder metrics(Optional extends Map> metrics) {
Utils.checkNotNull(metrics, "metrics");
this.metrics = metrics;
return this;
}
public Builder responses(Map responses) {
Utils.checkNotNull(responses, "responses");
this.responses = Optional.ofNullable(responses);
return this;
}
public Builder responses(Optional extends Map> responses) {
Utils.checkNotNull(responses, "responses");
this.responses = responses;
return this;
}
public BatchMixedResults build() {
return new BatchMixedResults(
batchDecisionId,
metrics,
responses);
}
}
}