Class Generator.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
com.google.cloud.dialogflow.cx.v3beta1.Generator.Builder
All Implemented Interfaces:
GeneratorOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Generator

public static final class Generator.Builder extends com.google.protobuf.GeneratedMessage.Builder<Generator.Builder> implements GeneratorOrBuilder
 Generators contain prompt to be sent to the LLM model to generate text. The
 prompt can contain parameters which will be resolved before calling the
 model. It can optionally contain banned phrases to ensure the model responses
 are safe.
 
Protobuf type google.cloud.dialogflow.cx.v3beta1.Generator
  • 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.Builder<Generator.Builder>
    • clear

      public Generator.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
    • getDefaultInstanceForType

      public Generator getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Generator build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Generator buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Generator.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Generator.Builder>
    • mergeFrom

      public Generator.Builder mergeFrom(Generator other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
    • mergeFrom

      public Generator.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Generator.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The unique identifier of the generator.
       Must be set for the
       [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
       method. [Generators.CreateGenerate][] populates the name automatically.
       Format:
       `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
       
      string name = 1;
      Specified by:
      getName in interface GeneratorOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The unique identifier of the generator.
       Must be set for the
       [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
       method. [Generators.CreateGenerate][] populates the name automatically.
       Format:
       `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
       
      string name = 1;
      Specified by:
      getNameBytes in interface GeneratorOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Generator.Builder setName(String value)
       The unique identifier of the generator.
       Must be set for the
       [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
       method. [Generators.CreateGenerate][] populates the name automatically.
       Format:
       `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Generator.Builder clearName()
       The unique identifier of the generator.
       Must be set for the
       [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
       method. [Generators.CreateGenerate][] populates the name automatically.
       Format:
       `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Generator.Builder setNameBytes(com.google.protobuf.ByteString value)
       The unique identifier of the generator.
       Must be set for the
       [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]
       method. [Generators.CreateGenerate][] populates the name automatically.
       Format:
       `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Required. The human-readable name of the generator, unique within the
       agent. The prompt contains pre-defined parameters such as $conversation,
       $last-user-utterance, etc. populated by Dialogflow. It can also contain
       custom placeholders which will be resolved during fulfillment.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface GeneratorOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. The human-readable name of the generator, unique within the
       agent. The prompt contains pre-defined parameters such as $conversation,
       $last-user-utterance, etc. populated by Dialogflow. It can also contain
       custom placeholders which will be resolved during fulfillment.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayNameBytes in interface GeneratorOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Generator.Builder setDisplayName(String value)
       Required. The human-readable name of the generator, unique within the
       agent. The prompt contains pre-defined parameters such as $conversation,
       $last-user-utterance, etc. populated by Dialogflow. It can also contain
       custom placeholders which will be resolved during fulfillment.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public Generator.Builder clearDisplayName()
       Required. The human-readable name of the generator, unique within the
       agent. The prompt contains pre-defined parameters such as $conversation,
       $last-user-utterance, etc. populated by Dialogflow. It can also contain
       custom placeholders which will be resolved during fulfillment.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public Generator.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. The human-readable name of the generator, unique within the
       agent. The prompt contains pre-defined parameters such as $conversation,
       $last-user-utterance, etc. populated by Dialogflow. It can also contain
       custom placeholders which will be resolved during fulfillment.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • hasPromptText

      public boolean hasPromptText()
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasPromptText in interface GeneratorOrBuilder
      Returns:
      Whether the promptText field is set.
    • getPromptText

      public Phrase getPromptText()
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPromptText in interface GeneratorOrBuilder
      Returns:
      The promptText.
    • setPromptText

      public Generator.Builder setPromptText(Phrase value)
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
    • setPromptText

      public Generator.Builder setPromptText(Phrase.Builder builderForValue)
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
    • mergePromptText

      public Generator.Builder mergePromptText(Phrase value)
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
    • clearPromptText

      public Generator.Builder clearPromptText()
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
    • getPromptTextBuilder

      public Phrase.Builder getPromptTextBuilder()
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
    • getPromptTextOrBuilder

      public PhraseOrBuilder getPromptTextOrBuilder()
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPromptTextOrBuilder in interface GeneratorOrBuilder
    • getPlaceholdersList

      public List<Generator.Placeholder> getPlaceholdersList()
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPlaceholdersList in interface GeneratorOrBuilder
    • getPlaceholdersCount

      public int getPlaceholdersCount()
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPlaceholdersCount in interface GeneratorOrBuilder
    • getPlaceholders

      public Generator.Placeholder getPlaceholders(int index)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPlaceholders in interface GeneratorOrBuilder
    • setPlaceholders

      public Generator.Builder setPlaceholders(int index, Generator.Placeholder value)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • setPlaceholders

      public Generator.Builder setPlaceholders(int index, Generator.Placeholder.Builder builderForValue)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • addPlaceholders

      public Generator.Builder addPlaceholders(Generator.Placeholder value)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • addPlaceholders

      public Generator.Builder addPlaceholders(int index, Generator.Placeholder value)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • addPlaceholders

      public Generator.Builder addPlaceholders(Generator.Placeholder.Builder builderForValue)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • addPlaceholders

      public Generator.Builder addPlaceholders(int index, Generator.Placeholder.Builder builderForValue)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • addAllPlaceholders

      public Generator.Builder addAllPlaceholders(Iterable<? extends Generator.Placeholder> values)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • clearPlaceholders

      public Generator.Builder clearPlaceholders()
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • removePlaceholders

      public Generator.Builder removePlaceholders(int index)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getPlaceholdersBuilder

      public Generator.Placeholder.Builder getPlaceholdersBuilder(int index)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getPlaceholdersOrBuilder

      public Generator.PlaceholderOrBuilder getPlaceholdersOrBuilder(int index)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPlaceholdersOrBuilder in interface GeneratorOrBuilder
    • getPlaceholdersOrBuilderList

      public List<? extends Generator.PlaceholderOrBuilder> getPlaceholdersOrBuilderList()
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPlaceholdersOrBuilderList in interface GeneratorOrBuilder
    • addPlaceholdersBuilder

      public Generator.Placeholder.Builder addPlaceholdersBuilder()
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • addPlaceholdersBuilder

      public Generator.Placeholder.Builder addPlaceholdersBuilder(int index)
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getPlaceholdersBuilderList

      public List<Generator.Placeholder.Builder> getPlaceholdersBuilderList()
       Optional. List of custom placeholders in the prompt text.
       
      repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
    • hasLlmModelSettings

      public boolean hasLlmModelSettings()
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
      Specified by:
      hasLlmModelSettings in interface GeneratorOrBuilder
      Returns:
      Whether the llmModelSettings field is set.
    • getLlmModelSettings

      public LlmModelSettings getLlmModelSettings()
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
      Specified by:
      getLlmModelSettings in interface GeneratorOrBuilder
      Returns:
      The llmModelSettings.
    • setLlmModelSettings

      public Generator.Builder setLlmModelSettings(LlmModelSettings value)
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
    • setLlmModelSettings

      public Generator.Builder setLlmModelSettings(LlmModelSettings.Builder builderForValue)
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
    • mergeLlmModelSettings

      public Generator.Builder mergeLlmModelSettings(LlmModelSettings value)
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
    • clearLlmModelSettings

      public Generator.Builder clearLlmModelSettings()
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
    • getLlmModelSettingsBuilder

      public LlmModelSettings.Builder getLlmModelSettingsBuilder()
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
    • getLlmModelSettingsOrBuilder

      public LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder()
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
      Specified by:
      getLlmModelSettingsOrBuilder in interface GeneratorOrBuilder
    • hasModelParameter

      public boolean hasModelParameter()
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
      Specified by:
      hasModelParameter in interface GeneratorOrBuilder
      Returns:
      Whether the modelParameter field is set.
    • getModelParameter

      public Generator.ModelParameter getModelParameter()
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
      Specified by:
      getModelParameter in interface GeneratorOrBuilder
      Returns:
      The modelParameter.
    • setModelParameter

      public Generator.Builder setModelParameter(Generator.ModelParameter value)
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
    • setModelParameter

      public Generator.Builder setModelParameter(Generator.ModelParameter.Builder builderForValue)
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
    • mergeModelParameter

      public Generator.Builder mergeModelParameter(Generator.ModelParameter value)
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
    • clearModelParameter

      public Generator.Builder clearModelParameter()
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
    • getModelParameterBuilder

      public Generator.ModelParameter.Builder getModelParameterBuilder()
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
    • getModelParameterOrBuilder

      public Generator.ModelParameterOrBuilder getModelParameterOrBuilder()
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
      Specified by:
      getModelParameterOrBuilder in interface GeneratorOrBuilder