com.oracle.bmc.nosql.requests.QueryRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oci-java-sdk-nosql Show documentation
Show all versions of oci-java-sdk-nosql Show documentation
This project contains the SDK used for Oracle Cloud Infrastructure Nosql
/**
* Copyright (c) 2016, 2020, 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.nosql.requests;
import com.oracle.bmc.nosql.model.*;
@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190828")
@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback")
@lombok.Getter
public class QueryRequest extends com.oracle.bmc.requests.BmcRequest {
/**
* SQL query statement and ancillary information.
*/
private QueryDetails queryDetails;
/**
* The maximum number of items to return.
*/
private Integer 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 client request ID for tracing.
*/
private String opcRequestId;
/**
* Alternative accessor for the body parameter.
* @return body parameter
*/
@Override
@com.oracle.bmc.InternalSdk
public QueryDetails getBody$() {
return queryDetails;
}
public static class Builder
implements com.oracle.bmc.requests.BmcRequest.Builder {
private com.oracle.bmc.util.internal.Consumer
invocationCallback = null;
private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null;
/**
* 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.util.internal.Consumer
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(QueryRequest o) {
queryDetails(o.getQueryDetails());
limit(o.getLimit());
page(o.getPage());
opcRequestId(o.getOpcRequestId());
invocationCallback(o.getInvocationCallback());
retryConfiguration(o.getRetryConfiguration());
return this;
}
/**
* Build the instance of QueryRequest as configured by this builder
*
* Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account,
* while the method {@link Builder#buildWithoutInvocationCallback} does not.
*
* This is the preferred method to build an instance.
*
* @return instance of QueryRequest
*/
public QueryRequest build() {
QueryRequest request = buildWithoutInvocationCallback();
request.setInvocationCallback(invocationCallback);
request.setRetryConfiguration(retryConfiguration);
return request;
}
/**
* Alternative setter for the body parameter.
* @param body the body parameter
* @return this builder instance
*/
@com.oracle.bmc.InternalSdk
public Builder body$(QueryDetails body) {
queryDetails(body);
return this;
}
}
}