Class ChatCompletionsRequest.Builder (3.84.0)

public static final class ChatCompletionsRequest.Builder extends GeneratedMessage.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

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/{endpoint}

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

Returns
Type Description
ChatCompletionsRequest.Builder

This builder for chaining.

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

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/{endpoint}

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/{endpoint}

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 GeneratedMessage.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

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/{endpoint}

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/{endpoint}

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.

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