Class ComputeTokensRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.aiplatform.v1.ComputeTokensRequest
All Implemented Interfaces:
ComputeTokensRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class ComputeTokensRequest extends com.google.protobuf.GeneratedMessage implements ComputeTokensRequestOrBuilder
 Request message for ComputeTokens RPC call.
 
Protobuf type google.cloud.aiplatform.v1.ComputeTokensRequest
See Also:
  • Field Details

  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getEndpoint

      public String getEndpoint()
       Required. The name of the Endpoint requested to get lists of tokens and
       token ids.
       
      string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getEndpoint in interface ComputeTokensRequestOrBuilder
      Returns:
      The endpoint.
    • getEndpointBytes

      public com.google.protobuf.ByteString getEndpointBytes()
       Required. The name of the Endpoint requested to get lists of tokens and
       token ids.
       
      string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getEndpointBytes in interface ComputeTokensRequestOrBuilder
      Returns:
      The bytes for endpoint.
    • getInstancesList

      public List<com.google.protobuf.Value> getInstancesList()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstancesList in interface ComputeTokensRequestOrBuilder
    • getInstancesOrBuilderList

      public List<? extends com.google.protobuf.ValueOrBuilder> getInstancesOrBuilderList()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstancesOrBuilderList in interface ComputeTokensRequestOrBuilder
    • getInstancesCount

      public int getInstancesCount()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstancesCount in interface ComputeTokensRequestOrBuilder
    • getInstances

      public com.google.protobuf.Value getInstances(int index)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstances in interface ComputeTokensRequestOrBuilder
    • getInstancesOrBuilder

      public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstancesOrBuilder in interface ComputeTokensRequestOrBuilder
    • getModel

      public String getModel()
       Optional. The name of the publisher model requested to serve the
       prediction. Format:
       projects/{project}/locations/{location}/publishers/*/models/*
       
      string model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModel in interface ComputeTokensRequestOrBuilder
      Returns:
      The model.
    • getModelBytes

      public com.google.protobuf.ByteString getModelBytes()
       Optional. The name of the publisher model requested to serve the
       prediction. Format:
       projects/{project}/locations/{location}/publishers/*/models/*
       
      string model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModelBytes in interface ComputeTokensRequestOrBuilder
      Returns:
      The bytes for model.
    • getContentsList

      public List<Content> getContentsList()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContentsList in interface ComputeTokensRequestOrBuilder
    • getContentsOrBuilderList

      public List<? extends ContentOrBuilder> getContentsOrBuilderList()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContentsOrBuilderList in interface ComputeTokensRequestOrBuilder
    • getContentsCount

      public int getContentsCount()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContentsCount in interface ComputeTokensRequestOrBuilder
    • getContents

      public Content getContents(int index)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContents in interface ComputeTokensRequestOrBuilder
    • getContentsOrBuilder

      public ContentOrBuilder getContentsOrBuilder(int index)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContentsOrBuilder in interface ComputeTokensRequestOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ComputeTokensRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ComputeTokensRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ComputeTokensRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ComputeTokensRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ComputeTokensRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ComputeTokensRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ComputeTokensRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ComputeTokensRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ComputeTokensRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ComputeTokensRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ComputeTokensRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ComputeTokensRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public ComputeTokensRequest.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static ComputeTokensRequest.Builder newBuilder()
    • newBuilder

      public static ComputeTokensRequest.Builder newBuilder(ComputeTokensRequest prototype)
    • toBuilder

      public ComputeTokensRequest.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ComputeTokensRequest.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static ComputeTokensRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ComputeTokensRequest> parser()
    • getParserForType

      public com.google.protobuf.Parser<ComputeTokensRequest> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public ComputeTokensRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder