Class: Google::Apis::YoutubePartnerV1::PolicyRule
- Inherits:
-
Object
- Object
- Google::Apis::YoutubePartnerV1::PolicyRule
- 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
-
#action ⇒ String
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.
-
#conditions ⇒ Google::Apis::YoutubePartnerV1::Conditions
A set of conditions that must be met for the rule's action (and subactions) to be enforced.
-
#subaction ⇒ Array<String>
A list of additional actions that YouTube should take if the conditions in the rule are met.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PolicyRule
constructor
A new instance of PolicyRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PolicyRule
Returns a new instance of PolicyRule.
3213 3214 3215 |
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 3213 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ String
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
3199 3200 3201 |
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 3199 def action @action end |
#conditions ⇒ Google::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
3205 3206 3207 |
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 3205 def conditions @conditions end |
#subaction ⇒ Array<String>
A list of additional actions that YouTube should take if the conditions in the
rule are met.
Corresponds to the JSON property subaction
3211 3212 3213 |
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 3211 def subaction @subaction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3218 3219 3220 3221 3222 |
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 3218 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 |