Class Rule.Builder

  • All Implemented Interfaces:
    RuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Rule

    public static final class Rule.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
    implements RuleOrBuilder
     Represents the rule for a content warehouse trigger.
     
    Protobuf type google.cloud.contentwarehouse.v1.Rule
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
      • clear

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

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

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

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

        public Rule.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
      • setField

        public Rule.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
      • clearField

        public Rule.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
      • clearOneof

        public Rule.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
      • setRepeatedField

        public Rule.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             int index,
                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
      • addRepeatedField

        public Rule.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
      • mergeFrom

        public Rule.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<Rule.Builder>
      • isInitialized

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

        public Rule.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<Rule.Builder>
        Throws:
        IOException
      • getDescription

        public String getDescription()
         Short description of the rule and its context.
         
        string description = 1;
        Specified by:
        getDescription in interface RuleOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Short description of the rule and its context.
         
        string description = 1;
        Specified by:
        getDescriptionBytes in interface RuleOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public Rule.Builder setDescription​(String value)
         Short description of the rule and its context.
         
        string description = 1;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public Rule.Builder clearDescription()
         Short description of the rule and its context.
         
        string description = 1;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public Rule.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         Short description of the rule and its context.
         
        string description = 1;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getRuleId

        public String getRuleId()
         ID of the rule. It has to be unique across all the examples.
         This is managed internally.
         
        string rule_id = 2;
        Specified by:
        getRuleId in interface RuleOrBuilder
        Returns:
        The ruleId.
      • getRuleIdBytes

        public com.google.protobuf.ByteString getRuleIdBytes()
         ID of the rule. It has to be unique across all the examples.
         This is managed internally.
         
        string rule_id = 2;
        Specified by:
        getRuleIdBytes in interface RuleOrBuilder
        Returns:
        The bytes for ruleId.
      • setRuleId

        public Rule.Builder setRuleId​(String value)
         ID of the rule. It has to be unique across all the examples.
         This is managed internally.
         
        string rule_id = 2;
        Parameters:
        value - The ruleId to set.
        Returns:
        This builder for chaining.
      • clearRuleId

        public Rule.Builder clearRuleId()
         ID of the rule. It has to be unique across all the examples.
         This is managed internally.
         
        string rule_id = 2;
        Returns:
        This builder for chaining.
      • setRuleIdBytes

        public Rule.Builder setRuleIdBytes​(com.google.protobuf.ByteString value)
         ID of the rule. It has to be unique across all the examples.
         This is managed internally.
         
        string rule_id = 2;
        Parameters:
        value - The bytes for ruleId to set.
        Returns:
        This builder for chaining.
      • getTriggerTypeValue

        public int getTriggerTypeValue()
         Identifies the trigger type for running the policy.
         
        .google.cloud.contentwarehouse.v1.Rule.TriggerType trigger_type = 3;
        Specified by:
        getTriggerTypeValue in interface RuleOrBuilder
        Returns:
        The enum numeric value on the wire for triggerType.
      • setTriggerTypeValue

        public Rule.Builder setTriggerTypeValue​(int value)
         Identifies the trigger type for running the policy.
         
        .google.cloud.contentwarehouse.v1.Rule.TriggerType trigger_type = 3;
        Parameters:
        value - The enum numeric value on the wire for triggerType to set.
        Returns:
        This builder for chaining.
      • getTriggerType

        public Rule.TriggerType getTriggerType()
         Identifies the trigger type for running the policy.
         
        .google.cloud.contentwarehouse.v1.Rule.TriggerType trigger_type = 3;
        Specified by:
        getTriggerType in interface RuleOrBuilder
        Returns:
        The triggerType.
      • setTriggerType

        public Rule.Builder setTriggerType​(Rule.TriggerType value)
         Identifies the trigger type for running the policy.
         
        .google.cloud.contentwarehouse.v1.Rule.TriggerType trigger_type = 3;
        Parameters:
        value - The triggerType to set.
        Returns:
        This builder for chaining.
      • clearTriggerType

        public Rule.Builder clearTriggerType()
         Identifies the trigger type for running the policy.
         
        .google.cloud.contentwarehouse.v1.Rule.TriggerType trigger_type = 3;
        Returns:
        This builder for chaining.
      • getCondition

        public String getCondition()
         Represents the conditional expression to be evaluated.
         Expression should evaluate to a boolean result.
         When the condition is true actions are executed.
         Example: user_role = "hsbc_role_1" AND doc.salary > 20000
         
        string condition = 4;
        Specified by:
        getCondition in interface RuleOrBuilder
        Returns:
        The condition.
      • getConditionBytes

        public com.google.protobuf.ByteString getConditionBytes()
         Represents the conditional expression to be evaluated.
         Expression should evaluate to a boolean result.
         When the condition is true actions are executed.
         Example: user_role = "hsbc_role_1" AND doc.salary > 20000
         
        string condition = 4;
        Specified by:
        getConditionBytes in interface RuleOrBuilder
        Returns:
        The bytes for condition.
      • setCondition

        public Rule.Builder setCondition​(String value)
         Represents the conditional expression to be evaluated.
         Expression should evaluate to a boolean result.
         When the condition is true actions are executed.
         Example: user_role = "hsbc_role_1" AND doc.salary > 20000
         
        string condition = 4;
        Parameters:
        value - The condition to set.
        Returns:
        This builder for chaining.
      • clearCondition

        public Rule.Builder clearCondition()
         Represents the conditional expression to be evaluated.
         Expression should evaluate to a boolean result.
         When the condition is true actions are executed.
         Example: user_role = "hsbc_role_1" AND doc.salary > 20000
         
        string condition = 4;
        Returns:
        This builder for chaining.
      • setConditionBytes

        public Rule.Builder setConditionBytes​(com.google.protobuf.ByteString value)
         Represents the conditional expression to be evaluated.
         Expression should evaluate to a boolean result.
         When the condition is true actions are executed.
         Example: user_role = "hsbc_role_1" AND doc.salary > 20000
         
        string condition = 4;
        Parameters:
        value - The bytes for condition to set.
        Returns:
        This builder for chaining.
      • getActionsList

        public List<Action> getActionsList()
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
        Specified by:
        getActionsList in interface RuleOrBuilder
      • getActionsCount

        public int getActionsCount()
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
        Specified by:
        getActionsCount in interface RuleOrBuilder
      • getActions

        public Action getActions​(int index)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
        Specified by:
        getActions in interface RuleOrBuilder
      • setActions

        public Rule.Builder setActions​(int index,
                                       Action value)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • setActions

        public Rule.Builder setActions​(int index,
                                       Action.Builder builderForValue)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • addActions

        public Rule.Builder addActions​(Action value)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • addActions

        public Rule.Builder addActions​(int index,
                                       Action value)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • addActions

        public Rule.Builder addActions​(Action.Builder builderForValue)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • addActions

        public Rule.Builder addActions​(int index,
                                       Action.Builder builderForValue)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • addAllActions

        public Rule.Builder addAllActions​(Iterable<? extends Action> values)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • clearActions

        public Rule.Builder clearActions()
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • removeActions

        public Rule.Builder removeActions​(int index)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • getActionsBuilder

        public Action.Builder getActionsBuilder​(int index)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • getActionsOrBuilder

        public ActionOrBuilder getActionsOrBuilder​(int index)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
        Specified by:
        getActionsOrBuilder in interface RuleOrBuilder
      • getActionsOrBuilderList

        public List<? extends ActionOrBuilder> getActionsOrBuilderList()
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
        Specified by:
        getActionsOrBuilderList in interface RuleOrBuilder
      • addActionsBuilder

        public Action.Builder addActionsBuilder()
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • addActionsBuilder

        public Action.Builder addActionsBuilder​(int index)
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • getActionsBuilderList

        public List<Action.Builder> getActionsBuilderList()
         List of actions that are executed when the rule is satisfied.
         
        repeated .google.cloud.contentwarehouse.v1.Action actions = 5;
      • setUnknownFields

        public final Rule.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>
      • mergeUnknownFields

        public final Rule.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Rule.Builder>