Class Rule (0.14.0)

public final class Rule extends GeneratedMessageV3 implements RuleOrBuilder

Represents the rule for a content warehouse trigger.

Protobuf type google.cloud.contentwarehouse.v1.Rule

Implements

RuleOrBuilder

Static Fields

ACTIONS_FIELD_NUMBER

public static final int ACTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

CONDITION_FIELD_NUMBER

public static final int CONDITION_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

RULE_ID_FIELD_NUMBER

public static final int RULE_ID_FIELD_NUMBER
Field Value
TypeDescription
int

TRIGGER_TYPE_FIELD_NUMBER

public static final int TRIGGER_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Rule getDefaultInstance()
Returns
TypeDescription
Rule

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Rule.Builder newBuilder()
Returns
TypeDescription
Rule.Builder

newBuilder(Rule prototype)

public static Rule.Builder newBuilder(Rule prototype)
Parameter
NameDescription
prototypeRule
Returns
TypeDescription
Rule.Builder

parseDelimitedFrom(InputStream input)

public static Rule parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Rule
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Rule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Rule parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Rule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Rule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Rule parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Rule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Rule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Rule parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Rule
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Rule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Rule parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Rule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Rule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Rule parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Rule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Rule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Rule
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Rule> parser()
Returns
TypeDescription
Parser<Rule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getActions(int index)

public Action getActions(int index)

List of actions that are executed when the rule is satisfied.

repeated .google.cloud.contentwarehouse.v1.Action actions = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
Action

getActionsCount()

public int getActionsCount()

List of actions that are executed when the rule is satisfied.

repeated .google.cloud.contentwarehouse.v1.Action actions = 5;

Returns
TypeDescription
int

getActionsList()

public List<Action> getActionsList()

List of actions that are executed when the rule is satisfied.

repeated .google.cloud.contentwarehouse.v1.Action actions = 5;

Returns
TypeDescription
List<Action>

getActionsOrBuilder(int index)

public ActionOrBuilder getActionsOrBuilder(int index)

List of actions that are executed when the rule is satisfied.

repeated .google.cloud.contentwarehouse.v1.Action actions = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
ActionOrBuilder

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;

Returns
TypeDescription
List<? extends com.google.cloud.contentwarehouse.v1.ActionOrBuilder>

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;

Returns
TypeDescription
String

The condition.

getConditionBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for condition.

getDefaultInstanceForType()

public Rule getDefaultInstanceForType()
Returns
TypeDescription
Rule

getDescription()

public String getDescription()

Short description of the rule and its context.

string description = 1;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Short description of the rule and its context.

string description = 1;

Returns
TypeDescription
ByteString

The bytes for description.

getParserForType()

public Parser<Rule> getParserForType()
Returns
TypeDescription
Parser<Rule>
Overrides

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;

Returns
TypeDescription
String

The ruleId.

getRuleIdBytes()

public ByteString getRuleIdBytes()

ID of the rule. It has to be unique across all the examples. This is managed internally.

string rule_id = 2;

Returns
TypeDescription
ByteString

The bytes for ruleId.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTriggerType()

public Rule.TriggerType getTriggerType()

Identifies the trigger type for running the policy.

.google.cloud.contentwarehouse.v1.Rule.TriggerType trigger_type = 3;

Returns
TypeDescription
Rule.TriggerType

The triggerType.

getTriggerTypeValue()

public int getTriggerTypeValue()

Identifies the trigger type for running the policy.

.google.cloud.contentwarehouse.v1.Rule.TriggerType trigger_type = 3;

Returns
TypeDescription
int

The enum numeric value on the wire for triggerType.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Rule.Builder newBuilderForType()
Returns
TypeDescription
Rule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Rule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Rule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Rule.Builder toBuilder()
Returns
TypeDescription
Rule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException