Class PutAutoscalingPolicyRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutAutoscalingPolicyRequest.Builder>
co.elastic.clients.elasticsearch.autoscaling.PutAutoscalingPolicyRequest.Builder
- All Implemented Interfaces:
WithJson<PutAutoscalingPolicyRequest.Builder>,ObjectBuilder<PutAutoscalingPolicyRequest>
- Enclosing class:
- PutAutoscalingPolicyRequest
public static class PutAutoscalingPolicyRequest.Builder
extends RequestBase.AbstractBuilder<PutAutoscalingPolicyRequest.Builder>
implements ObjectBuilder<PutAutoscalingPolicyRequest>
Builder for
PutAutoscalingPolicyRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aPutAutoscalingPolicyRequest.masterTimeout(Time value) Period to wait for a connection to the master node.Period to wait for a connection to the master node.Required - the name of the autoscaling policypolicy(AutoscalingPolicy value) Required - Request body.Required - Request body.protected PutAutoscalingPolicyRequest.Builderself()Period to wait for a response.Period to wait for a response.withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper) Sets additional properties values on this object by reading from a JSON input.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
masterTimeout
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout -
masterTimeout
public final PutAutoscalingPolicyRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout -
name
Required - the name of the autoscaling policyAPI name:
name -
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout -
timeout
public final PutAutoscalingPolicyRequest.Builder timeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout -
policy
Required - Request body. -
policy
public final PutAutoscalingPolicyRequest.Builder policy(Function<AutoscalingPolicy.Builder, ObjectBuilder<AutoscalingPolicy>> fn) Required - Request body. -
withJson
public PutAutoscalingPolicyRequest.Builder withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper) Description copied from interface:WithJsonSets additional properties values on this object by reading from a JSON input.This is a "partial deserialization": properties that were already set keep their value if they're not present in the JSON input, and properties can also be set after having called this method, including overriding those read from the JSON input.
This low level variant of
withJsongives full control on the json parser and object mapper. Most of the time usingWithJson.withJson(Reader)andWithJson.withJson(InputStream)will be more convenient.- Specified by:
withJsonin interfaceWithJson<PutAutoscalingPolicyRequest.Builder>- Overrides:
withJsonin classWithJsonObjectBuilderBase<PutAutoscalingPolicyRequest.Builder>- Parameters:
parser- the JSONP parsermapper- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
selfin classRequestBase.AbstractBuilder<PutAutoscalingPolicyRequest.Builder>
-
build
Builds aPutAutoscalingPolicyRequest.- Specified by:
buildin interfaceObjectBuilder<PutAutoscalingPolicyRequest>- Throws:
NullPointerException- if some of the required fields are null.
-