Class AnalysisRule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AnalysisRule.Builder>
com.google.cloud.contactcenterinsights.v1.AnalysisRule.Builder
All Implemented Interfaces:
AnalysisRuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AnalysisRule

public static final class AnalysisRule.Builder extends com.google.protobuf.GeneratedMessage.Builder<AnalysisRule.Builder> implements AnalysisRuleOrBuilder
 The CCAI Insights project wide analysis rule. This rule will be applied to
 all conversations that match the filter defined in the rule. For a
 conversation matches the filter, the annotators specified in the rule will be
 run. If a conversation matches multiple rules, a union of all the annotators
 will be run. One project can have multiple analysis rules.
 
Protobuf type google.cloud.contactcenterinsights.v1.AnalysisRule
  • 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<AnalysisRule.Builder>
    • clear

      public AnalysisRule.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<AnalysisRule.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<AnalysisRule.Builder>
    • getDefaultInstanceForType

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

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

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

      public AnalysisRule.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<AnalysisRule.Builder>
    • mergeFrom

      public AnalysisRule.Builder mergeFrom(AnalysisRule other)
    • isInitialized

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

      public AnalysisRule.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<AnalysisRule.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Identifier. The resource name of the analysis rule.
       Format:
       projects/{project}/locations/{location}/analysisRules/{analysis_rule}
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface AnalysisRuleOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. The resource name of the analysis rule.
       Format:
       projects/{project}/locations/{location}/analysisRules/{analysis_rule}
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface AnalysisRuleOrBuilder
      Returns:
      The bytes for name.
    • setName

      public AnalysisRule.Builder setName(String value)
       Identifier. The resource name of the analysis rule.
       Format:
       projects/{project}/locations/{location}/analysisRules/{analysis_rule}
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public AnalysisRule.Builder clearName()
       Identifier. The resource name of the analysis rule.
       Format:
       projects/{project}/locations/{location}/analysisRules/{analysis_rule}
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public AnalysisRule.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. The resource name of the analysis rule.
       Format:
       projects/{project}/locations/{location}/analysisRules/{analysis_rule}
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time at which this analysis rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface AnalysisRuleOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time at which this analysis rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface AnalysisRuleOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public AnalysisRule.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. The time at which this analysis rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public AnalysisRule.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The time at which this analysis rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public AnalysisRule.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. The time at which this analysis rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public AnalysisRule.Builder clearCreateTime()
       Output only. The time at which this analysis rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. The time at which this analysis rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time at which this analysis rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface AnalysisRuleOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The most recent time at which this analysis rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface AnalysisRuleOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The most recent time at which this analysis rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface AnalysisRuleOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public AnalysisRule.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The most recent time at which this analysis rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public AnalysisRule.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The most recent time at which this analysis rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public AnalysisRule.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The most recent time at which this analysis rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public AnalysisRule.Builder clearUpdateTime()
       Output only. The most recent time at which this analysis rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. The most recent time at which this analysis rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The most recent time at which this analysis rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface AnalysisRuleOrBuilder
    • hasDisplayName

      public boolean hasDisplayName()
       Display Name of the analysis rule.
       
      optional string display_name = 4;
      Specified by:
      hasDisplayName in interface AnalysisRuleOrBuilder
      Returns:
      Whether the displayName field is set.
    • getDisplayName

      public String getDisplayName()
       Display Name of the analysis rule.
       
      optional string display_name = 4;
      Specified by:
      getDisplayName in interface AnalysisRuleOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Display Name of the analysis rule.
       
      optional string display_name = 4;
      Specified by:
      getDisplayNameBytes in interface AnalysisRuleOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public AnalysisRule.Builder setDisplayName(String value)
       Display Name of the analysis rule.
       
      optional string display_name = 4;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public AnalysisRule.Builder clearDisplayName()
       Display Name of the analysis rule.
       
      optional string display_name = 4;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public AnalysisRule.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Display Name of the analysis rule.
       
      optional string display_name = 4;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getConversationFilter

      public String getConversationFilter()
       Filter for the conversations that should apply this analysis
       rule. An empty filter means this analysis rule applies to all
       conversations.
       
      string conversation_filter = 5;
      Specified by:
      getConversationFilter in interface AnalysisRuleOrBuilder
      Returns:
      The conversationFilter.
    • getConversationFilterBytes

      public com.google.protobuf.ByteString getConversationFilterBytes()
       Filter for the conversations that should apply this analysis
       rule. An empty filter means this analysis rule applies to all
       conversations.
       
      string conversation_filter = 5;
      Specified by:
      getConversationFilterBytes in interface AnalysisRuleOrBuilder
      Returns:
      The bytes for conversationFilter.
    • setConversationFilter

      public AnalysisRule.Builder setConversationFilter(String value)
       Filter for the conversations that should apply this analysis
       rule. An empty filter means this analysis rule applies to all
       conversations.
       
      string conversation_filter = 5;
      Parameters:
      value - The conversationFilter to set.
      Returns:
      This builder for chaining.
    • clearConversationFilter

      public AnalysisRule.Builder clearConversationFilter()
       Filter for the conversations that should apply this analysis
       rule. An empty filter means this analysis rule applies to all
       conversations.
       
      string conversation_filter = 5;
      Returns:
      This builder for chaining.
    • setConversationFilterBytes

      public AnalysisRule.Builder setConversationFilterBytes(com.google.protobuf.ByteString value)
       Filter for the conversations that should apply this analysis
       rule. An empty filter means this analysis rule applies to all
       conversations.
       
      string conversation_filter = 5;
      Parameters:
      value - The bytes for conversationFilter to set.
      Returns:
      This builder for chaining.
    • hasAnnotatorSelector

      public boolean hasAnnotatorSelector()
       Selector of annotators to run and the phrase matchers to use for
       conversations that matches the conversation_filter. If not specified, NO
       annotators will be run.
       
      .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 6;
      Specified by:
      hasAnnotatorSelector in interface AnalysisRuleOrBuilder
      Returns:
      Whether the annotatorSelector field is set.
    • getAnnotatorSelector

      public AnnotatorSelector getAnnotatorSelector()
       Selector of annotators to run and the phrase matchers to use for
       conversations that matches the conversation_filter. If not specified, NO
       annotators will be run.
       
      .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 6;
      Specified by:
      getAnnotatorSelector in interface AnalysisRuleOrBuilder
      Returns:
      The annotatorSelector.
    • setAnnotatorSelector

      public AnalysisRule.Builder setAnnotatorSelector(AnnotatorSelector value)
       Selector of annotators to run and the phrase matchers to use for
       conversations that matches the conversation_filter. If not specified, NO
       annotators will be run.
       
      .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 6;
    • setAnnotatorSelector

      public AnalysisRule.Builder setAnnotatorSelector(AnnotatorSelector.Builder builderForValue)
       Selector of annotators to run and the phrase matchers to use for
       conversations that matches the conversation_filter. If not specified, NO
       annotators will be run.
       
      .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 6;
    • mergeAnnotatorSelector

      public AnalysisRule.Builder mergeAnnotatorSelector(AnnotatorSelector value)
       Selector of annotators to run and the phrase matchers to use for
       conversations that matches the conversation_filter. If not specified, NO
       annotators will be run.
       
      .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 6;
    • clearAnnotatorSelector

      public AnalysisRule.Builder clearAnnotatorSelector()
       Selector of annotators to run and the phrase matchers to use for
       conversations that matches the conversation_filter. If not specified, NO
       annotators will be run.
       
      .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 6;
    • getAnnotatorSelectorBuilder

      public AnnotatorSelector.Builder getAnnotatorSelectorBuilder()
       Selector of annotators to run and the phrase matchers to use for
       conversations that matches the conversation_filter. If not specified, NO
       annotators will be run.
       
      .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 6;
    • getAnnotatorSelectorOrBuilder

      public AnnotatorSelectorOrBuilder getAnnotatorSelectorOrBuilder()
       Selector of annotators to run and the phrase matchers to use for
       conversations that matches the conversation_filter. If not specified, NO
       annotators will be run.
       
      .google.cloud.contactcenterinsights.v1.AnnotatorSelector annotator_selector = 6;
      Specified by:
      getAnnotatorSelectorOrBuilder in interface AnalysisRuleOrBuilder
    • getAnalysisPercentage

      public double getAnalysisPercentage()
       Percentage of conversations that we should apply this analysis setting
       automatically, between [0, 1]. For example, 0.1 means 10%. Conversations
       are sampled in a determenestic way. The original runtime_percentage &
       upload percentage will be replaced by defining filters on the conversation.
       
      double analysis_percentage = 7;
      Specified by:
      getAnalysisPercentage in interface AnalysisRuleOrBuilder
      Returns:
      The analysisPercentage.
    • setAnalysisPercentage

      public AnalysisRule.Builder setAnalysisPercentage(double value)
       Percentage of conversations that we should apply this analysis setting
       automatically, between [0, 1]. For example, 0.1 means 10%. Conversations
       are sampled in a determenestic way. The original runtime_percentage &
       upload percentage will be replaced by defining filters on the conversation.
       
      double analysis_percentage = 7;
      Parameters:
      value - The analysisPercentage to set.
      Returns:
      This builder for chaining.
    • clearAnalysisPercentage

      public AnalysisRule.Builder clearAnalysisPercentage()
       Percentage of conversations that we should apply this analysis setting
       automatically, between [0, 1]. For example, 0.1 means 10%. Conversations
       are sampled in a determenestic way. The original runtime_percentage &
       upload percentage will be replaced by defining filters on the conversation.
       
      double analysis_percentage = 7;
      Returns:
      This builder for chaining.
    • getActive

      public boolean getActive()
       If true, apply this rule to conversations. Otherwise, this rule is
       inactive and saved as a draft.
       
      bool active = 8;
      Specified by:
      getActive in interface AnalysisRuleOrBuilder
      Returns:
      The active.
    • setActive

      public AnalysisRule.Builder setActive(boolean value)
       If true, apply this rule to conversations. Otherwise, this rule is
       inactive and saved as a draft.
       
      bool active = 8;
      Parameters:
      value - The active to set.
      Returns:
      This builder for chaining.
    • clearActive

      public AnalysisRule.Builder clearActive()
       If true, apply this rule to conversations. Otherwise, this rule is
       inactive and saved as a draft.
       
      bool active = 8;
      Returns:
      This builder for chaining.