Class: Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Rule

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/contentwarehouse_v1/classes.rb,
lib/google/apis/contentwarehouse_v1/representations.rb,
lib/google/apis/contentwarehouse_v1/representations.rb

Overview

Represents the rule for a content warehouse trigger.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudContentwarehouseV1Rule

Returns a new instance of GoogleCloudContentwarehouseV1Rule.



3093
3094
3095
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3093

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#actionsArray<Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Action>

List of actions that are executed when the rule is satisfied. Corresponds to the JSON property actions



3068
3069
3070
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3068

def actions
  @actions
end

#conditionString

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 Corresponds to the JSON property condition

Returns:

  • (String)


3075
3076
3077
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3075

def condition
  @condition
end

#descriptionString

Short description of the rule and its context. Corresponds to the JSON property description

Returns:

  • (String)


3080
3081
3082
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3080

def description
  @description
end

#rule_idString

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

Returns:

  • (String)


3086
3087
3088
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3086

def rule_id
  @rule_id
end

#trigger_typeString

Identifies the trigger type for running the policy. Corresponds to the JSON property triggerType

Returns:

  • (String)


3091
3092
3093
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3091

def trigger_type
  @trigger_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3098
3099
3100
3101
3102
3103
3104
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3098

def update!(**args)
  @actions = args[:actions] if args.key?(:actions)
  @condition = args[:condition] if args.key?(:condition)
  @description = args[:description] if args.key?(:description)
  @rule_id = args[:rule_id] if args.key?(:rule_id)
  @trigger_type = args[:trigger_type] if args.key?(:trigger_type)
end