com.oracle.bmc.datalabelingservicedataplane.requests.SummarizeAnnotationAnalyticsRequest Maven / Gradle / Ivy
Show all versions of oci-java-sdk-datalabelingservicedataplane Show documentation
/**
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/
package com.oracle.bmc.datalabelingservicedataplane.requests;
import com.oracle.bmc.datalabelingservicedataplane.model.*;
/**
* Example: Click here to see how to use
* SummarizeAnnotationAnalyticsRequest.
*/
@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20211001")
public class SummarizeAnnotationAnalyticsRequest
extends com.oracle.bmc.requests.BmcRequest {
/** The ID of the compartment in which to list resources. */
private String compartmentId;
/** The ID of the compartment in which to list resources. */
public String getCompartmentId() {
return compartmentId;
}
/** Filter the results by the OCID of the dataset. */
private String datasetId;
/** Filter the results by the OCID of the dataset. */
public String getDatasetId() {
return datasetId;
}
/** A filter to return only resources whose lifecycleState matches the given lifecycleState. */
private com.oracle.bmc.datalabelingservicedataplane.model.Annotation.LifecycleState
lifecycleState;
/** A filter to return only resources whose lifecycleState matches the given lifecycleState. */
public com.oracle.bmc.datalabelingservicedataplane.model.Annotation.LifecycleState
getLifecycleState() {
return lifecycleState;
}
/** It summarizes annotations with the specified label. */
private String label;
/** It summarizes annotations with the specified label. */
public String getLabel() {
return label;
}
/** The maximum number of items to return. */
private Integer limit;
/** The maximum number of items to return. */
public Integer getLimit() {
return limit;
}
/**
* The page token representing the page at which to start retrieving results. This is usually
* retrieved from a previous list call.
*/
private String page;
/**
* The page token representing the page at which to start retrieving results. This is usually
* retrieved from a previous list call.
*/
public String getPage() {
return page;
}
/** The sort order to use, either 'asc' or 'desc'. */
private com.oracle.bmc.datalabelingservicedataplane.model.SortOrders sortOrder;
/** The sort order to use, either 'asc' or 'desc'. */
public com.oracle.bmc.datalabelingservicedataplane.model.SortOrders getSortOrder() {
return sortOrder;
}
/**
* The field to sort by. Only one sort order may be provided. The default order is descending.
* If no value is specified, updatedBy is used by default.
*/
private SortBy sortBy;
/**
* The field to sort by. Only one sort order may be provided. The default order is descending.
* If no value is specified, updatedBy is used by default.
*/
public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum {
Count("count"),
Label("label"),
UpdatedBy("updatedBy"),
;
private final String value;
private static java.util.Map map;
static {
map = new java.util.HashMap<>();
for (SortBy v : SortBy.values()) {
map.put(v.getValue(), v);
}
}
SortBy(String value) {
this.value = value;
}
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() {
return value;
}
@com.fasterxml.jackson.annotation.JsonCreator
public static SortBy create(String key) {
if (map.containsKey(key)) {
return map.get(key);
}
throw new IllegalArgumentException("Invalid SortBy: " + key);
}
};
/**
* The field to sort by. Only one sort order may be provided. The default order is descending.
* If no value is specified, updatedBy is used by default.
*/
public SortBy getSortBy() {
return sortBy;
}
/** The field to group by. If no value is specified, updatedBy is used by default. */
private AnnotationGroupBy annotationGroupBy;
/** The field to group by. If no value is specified, updatedBy is used by default. */
public enum AnnotationGroupBy implements com.oracle.bmc.http.internal.BmcEnum {
UpdatedBy("updatedBy"),
Label("label"),
;
private final String value;
private static java.util.Map map;
static {
map = new java.util.HashMap<>();
for (AnnotationGroupBy v : AnnotationGroupBy.values()) {
map.put(v.getValue(), v);
}
}
AnnotationGroupBy(String value) {
this.value = value;
}
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() {
return value;
}
@com.fasterxml.jackson.annotation.JsonCreator
public static AnnotationGroupBy create(String key) {
if (map.containsKey(key)) {
return map.get(key);
}
throw new IllegalArgumentException("Invalid AnnotationGroupBy: " + key);
}
};
/** The field to group by. If no value is specified, updatedBy is used by default. */
public AnnotationGroupBy getAnnotationGroupBy() {
return annotationGroupBy;
}
/** The client request ID for tracing. */
private String opcRequestId;
/** The client request ID for tracing. */
public String getOpcRequestId() {
return opcRequestId;
}
public static class Builder
implements com.oracle.bmc.requests.BmcRequest.Builder<
SummarizeAnnotationAnalyticsRequest, java.lang.Void> {
private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null;
private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null;
/** The ID of the compartment in which to list resources. */
private String compartmentId = null;
/**
* The ID of the compartment in which to list resources.
*
* @param compartmentId the value to set
* @return this builder instance
*/
public Builder compartmentId(String compartmentId) {
this.compartmentId = compartmentId;
return this;
}
/** Filter the results by the OCID of the dataset. */
private String datasetId = null;
/**
* Filter the results by the OCID of the dataset.
*
* @param datasetId the value to set
* @return this builder instance
*/
public Builder datasetId(String datasetId) {
this.datasetId = datasetId;
return this;
}
/**
* A filter to return only resources whose lifecycleState matches the given lifecycleState.
*/
private com.oracle.bmc.datalabelingservicedataplane.model.Annotation.LifecycleState
lifecycleState = null;
/**
* A filter to return only resources whose lifecycleState matches the given lifecycleState.
*
* @param lifecycleState the value to set
* @return this builder instance
*/
public Builder lifecycleState(
com.oracle.bmc.datalabelingservicedataplane.model.Annotation.LifecycleState
lifecycleState) {
this.lifecycleState = lifecycleState;
return this;
}
/** It summarizes annotations with the specified label. */
private String label = null;
/**
* It summarizes annotations with the specified label.
*
* @param label the value to set
* @return this builder instance
*/
public Builder label(String label) {
this.label = label;
return this;
}
/** The maximum number of items to return. */
private Integer limit = null;
/**
* The maximum number of items to return.
*
* @param limit the value to set
* @return this builder instance
*/
public Builder limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* The page token representing the page at which to start retrieving results. This is
* usually retrieved from a previous list call.
*/
private String page = null;
/**
* The page token representing the page at which to start retrieving results. This is
* usually retrieved from a previous list call.
*
* @param page the value to set
* @return this builder instance
*/
public Builder page(String page) {
this.page = page;
return this;
}
/** The sort order to use, either 'asc' or 'desc'. */
private com.oracle.bmc.datalabelingservicedataplane.model.SortOrders sortOrder = null;
/**
* The sort order to use, either 'asc' or 'desc'.
*
* @param sortOrder the value to set
* @return this builder instance
*/
public Builder sortOrder(
com.oracle.bmc.datalabelingservicedataplane.model.SortOrders sortOrder) {
this.sortOrder = sortOrder;
return this;
}
/**
* The field to sort by. Only one sort order may be provided. The default order is
* descending. If no value is specified, updatedBy is used by default.
*/
private SortBy sortBy = null;
/**
* The field to sort by. Only one sort order may be provided. The default order is
* descending. If no value is specified, updatedBy is used by default.
*
* @param sortBy the value to set
* @return this builder instance
*/
public Builder sortBy(SortBy sortBy) {
this.sortBy = sortBy;
return this;
}
/** The field to group by. If no value is specified, updatedBy is used by default. */
private AnnotationGroupBy annotationGroupBy = null;
/**
* The field to group by. If no value is specified, updatedBy is used by default.
*
* @param annotationGroupBy the value to set
* @return this builder instance
*/
public Builder annotationGroupBy(AnnotationGroupBy annotationGroupBy) {
this.annotationGroupBy = annotationGroupBy;
return this;
}
/** The client request ID for tracing. */
private String opcRequestId = null;
/**
* The client request ID for tracing.
*
* @param opcRequestId the value to set
* @return this builder instance
*/
public Builder opcRequestId(String opcRequestId) {
this.opcRequestId = opcRequestId;
return this;
}
/**
* Set the invocation callback for the request to be built.
*
* @param invocationCallback the invocation callback to be set for the request
* @return this builder instance
*/
public Builder invocationCallback(
com.oracle.bmc.http.client.RequestInterceptor invocationCallback) {
this.invocationCallback = invocationCallback;
return this;
}
/**
* Set the retry configuration for the request to be built.
*
* @param retryConfiguration the retry configuration to be used for the request
* @return this builder instance
*/
public Builder retryConfiguration(
com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) {
this.retryConfiguration = retryConfiguration;
return this;
}
/**
* Copy method to populate the builder with values from the given instance.
*
* @return this builder instance
*/
public Builder copy(SummarizeAnnotationAnalyticsRequest o) {
compartmentId(o.getCompartmentId());
datasetId(o.getDatasetId());
lifecycleState(o.getLifecycleState());
label(o.getLabel());
limit(o.getLimit());
page(o.getPage());
sortOrder(o.getSortOrder());
sortBy(o.getSortBy());
annotationGroupBy(o.getAnnotationGroupBy());
opcRequestId(o.getOpcRequestId());
invocationCallback(o.getInvocationCallback());
retryConfiguration(o.getRetryConfiguration());
return this;
}
/**
* Build the instance of SummarizeAnnotationAnalyticsRequest as configured by this builder
*
* Note that this method takes calls to {@link
* Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account,
* while the method {@link Builder#buildWithoutInvocationCallback} does not.
*
*
This is the preferred method to build an instance.
*
* @return instance of SummarizeAnnotationAnalyticsRequest
*/
public SummarizeAnnotationAnalyticsRequest build() {
SummarizeAnnotationAnalyticsRequest request = buildWithoutInvocationCallback();
request.setInvocationCallback(invocationCallback);
request.setRetryConfiguration(retryConfiguration);
return request;
}
/**
* Build the instance of SummarizeAnnotationAnalyticsRequest as configured by this builder
*
*
Note that this method does not take calls to {@link
* Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account,
* while the method {@link Builder#build} does
*
* @return instance of SummarizeAnnotationAnalyticsRequest
*/
public SummarizeAnnotationAnalyticsRequest buildWithoutInvocationCallback() {
SummarizeAnnotationAnalyticsRequest request = new SummarizeAnnotationAnalyticsRequest();
request.compartmentId = compartmentId;
request.datasetId = datasetId;
request.lifecycleState = lifecycleState;
request.label = label;
request.limit = limit;
request.page = page;
request.sortOrder = sortOrder;
request.sortBy = sortBy;
request.annotationGroupBy = annotationGroupBy;
request.opcRequestId = opcRequestId;
return request;
// new SummarizeAnnotationAnalyticsRequest(compartmentId, datasetId, lifecycleState,
// label, limit, page, sortOrder, sortBy, annotationGroupBy, opcRequestId);
}
}
/**
* Return an instance of {@link Builder} that allows you to modify request properties.
*
* @return instance of {@link Builder} that allows you to modify request properties.
*/
public Builder toBuilder() {
return new Builder()
.compartmentId(compartmentId)
.datasetId(datasetId)
.lifecycleState(lifecycleState)
.label(label)
.limit(limit)
.page(page)
.sortOrder(sortOrder)
.sortBy(sortBy)
.annotationGroupBy(annotationGroupBy)
.opcRequestId(opcRequestId);
}
/**
* Return a new builder for this request object.
*
* @return builder for the request object
*/
public static Builder builder() {
return new Builder();
}
@Override
public String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
sb.append("(");
sb.append("super=").append(super.toString());
sb.append(",compartmentId=").append(String.valueOf(this.compartmentId));
sb.append(",datasetId=").append(String.valueOf(this.datasetId));
sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState));
sb.append(",label=").append(String.valueOf(this.label));
sb.append(",limit=").append(String.valueOf(this.limit));
sb.append(",page=").append(String.valueOf(this.page));
sb.append(",sortOrder=").append(String.valueOf(this.sortOrder));
sb.append(",sortBy=").append(String.valueOf(this.sortBy));
sb.append(",annotationGroupBy=").append(String.valueOf(this.annotationGroupBy));
sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId));
sb.append(")");
return sb.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof SummarizeAnnotationAnalyticsRequest)) {
return false;
}
SummarizeAnnotationAnalyticsRequest other = (SummarizeAnnotationAnalyticsRequest) o;
return super.equals(o)
&& java.util.Objects.equals(this.compartmentId, other.compartmentId)
&& java.util.Objects.equals(this.datasetId, other.datasetId)
&& java.util.Objects.equals(this.lifecycleState, other.lifecycleState)
&& java.util.Objects.equals(this.label, other.label)
&& java.util.Objects.equals(this.limit, other.limit)
&& java.util.Objects.equals(this.page, other.page)
&& java.util.Objects.equals(this.sortOrder, other.sortOrder)
&& java.util.Objects.equals(this.sortBy, other.sortBy)
&& java.util.Objects.equals(this.annotationGroupBy, other.annotationGroupBy)
&& java.util.Objects.equals(this.opcRequestId, other.opcRequestId);
}
@Override
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
result =
(result * PRIME)
+ (this.compartmentId == null ? 43 : this.compartmentId.hashCode());
result = (result * PRIME) + (this.datasetId == null ? 43 : this.datasetId.hashCode());
result =
(result * PRIME)
+ (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode());
result = (result * PRIME) + (this.label == null ? 43 : this.label.hashCode());
result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode());
result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode());
result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode());
result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode());
result =
(result * PRIME)
+ (this.annotationGroupBy == null ? 43 : this.annotationGroupBy.hashCode());
result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode());
return result;
}
}