Class: Google::Apis::YoutubePartnerV1::PolicyRule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_partner_v1/classes.rb,
generated/google/apis/youtube_partner_v1/representations.rb,
generated/google/apis/youtube_partner_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PolicyRule

Returns a new instance of PolicyRule



2741
2742
2743
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2741

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

Instance Attribute Details

#actionString

The policy that YouTube should enforce if the rule's conditions are all valid for an asset or for an attempt to view that asset on YouTube. Corresponds to the JSON property action

Returns:

  • (String)


2727
2728
2729
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2727

def action
  @action
end

#conditionsGoogle::Apis::YoutubePartnerV1::Conditions

A set of conditions that must be met for the rule's action (and subactions) to be enforced. For a rule to be valid, all of its conditions must be met. Corresponds to the JSON property conditions



2733
2734
2735
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2733

def conditions
  @conditions
end

#subactionArray<String>

A list of additional actions that YouTube should take if the conditions in the rule are met. Corresponds to the JSON property subaction

Returns:

  • (Array<String>)


2739
2740
2741
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2739

def subaction
  @subaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2746
2747
2748
2749
2750
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2746

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @conditions = args[:conditions] if args.key?(:conditions)
  @subaction = args[:subaction] if args.key?(:subaction)
end