Class ChatCompletionsRequest.Builder (3.43.0)

public static final class ChatCompletionsRequest.Builder extends GeneratedMessageV3.Builder<ChatCompletionsRequest.Builder> implements ChatCompletionsRequestOrBuilder

Request message for [PredictionService.ChatCompletions]

Protobuf type google.cloud.aiplatform.v1beta1.ChatCompletionsRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ChatCompletionsRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

build()

public ChatCompletionsRequest build()
Returns
Type Description
ChatCompletionsRequest

buildPartial()

public ChatCompletionsRequest buildPartial()
Returns
Type Description
ChatCompletionsRequest

clear()

public ChatCompletionsRequest.Builder clear()
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

clearEndpoint()

public ChatCompletionsRequest.Builder clearEndpoint()

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/openapi

string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ChatCompletionsRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ChatCompletionsRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

clearHttpBody()

public ChatCompletionsRequest.Builder clearHttpBody()

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

.google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatCompletionsRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public ChatCompletionsRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

clone()

public ChatCompletionsRequest.Builder clone()
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

getDefaultInstanceForType()

public ChatCompletionsRequest getDefaultInstanceForType()
Returns
Type Description
ChatCompletionsRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEndpoint()

public String getEndpoint()

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/openapi

string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The endpoint.

getEndpointBytes()

public ByteString getEndpointBytes()

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/openapi

string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for endpoint.

getHttpBody()

public HttpBody getHttpBody()

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

.google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.api.HttpBody

The httpBody.

getHttpBodyBuilder()

public HttpBody.Builder getHttpBodyBuilder()

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

.google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.api.HttpBody.Builder

getHttpBodyOrBuilder()

public HttpBodyOrBuilder getHttpBodyOrBuilder()

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

.google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.api.HttpBodyOrBuilder

hasHttpBody()

public boolean hasHttpBody()

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

.google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the httpBody field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ChatCompletionsRequest other)

public ChatCompletionsRequest.Builder mergeFrom(ChatCompletionsRequest other)
Parameter
Name Description
other ChatCompletionsRequest
Returns
Type Description
ChatCompletionsRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ChatCompletionsRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ChatCompletionsRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

mergeHttpBody(HttpBody value)

public ChatCompletionsRequest.Builder mergeHttpBody(HttpBody value)

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

.google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.api.HttpBody
Returns
Type Description
ChatCompletionsRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ChatCompletionsRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

setEndpoint(String value)

public ChatCompletionsRequest.Builder setEndpoint(String value)

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/openapi

string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The endpoint to set.

Returns
Type Description
ChatCompletionsRequest.Builder

This builder for chaining.

setEndpointBytes(ByteString value)

public ChatCompletionsRequest.Builder setEndpointBytes(ByteString value)

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/openapi

string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for endpoint to set.

Returns
Type Description
ChatCompletionsRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ChatCompletionsRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

setHttpBody(HttpBody value)

public ChatCompletionsRequest.Builder setHttpBody(HttpBody value)

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

.google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value com.google.api.HttpBody
Returns
Type Description
ChatCompletionsRequest.Builder

setHttpBody(HttpBody.Builder builderForValue)

public ChatCompletionsRequest.Builder setHttpBody(HttpBody.Builder builderForValue)

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

.google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.api.HttpBody.Builder
Returns
Type Description
ChatCompletionsRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ChatCompletionsRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ChatCompletionsRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ChatCompletionsRequest.Builder
Overrides