Class: Google::Apis::YoutubePartnerV1::Policy

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) ⇒ Policy

Returns a new instance of Policy



2803
2804
2805
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2803

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

Instance Attribute Details

#descriptionString

The policy's description. Corresponds to the JSON property description

Returns:

  • (String)


2775
2776
2777
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2775

def description
  @description
end

#idString

A value that YouTube assigns and uses to uniquely identify the policy. Corresponds to the JSON property id

Returns:

  • (String)


2780
2781
2782
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2780

def id
  @id
end

#kindString

Identifies this as a policy. Value: "youtubePartner#policy" Corresponds to the JSON property kind

Returns:

  • (String)


2785
2786
2787
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2785

def kind
  @kind
end

#nameString

The policy's name. Corresponds to the JSON property name

Returns:

  • (String)


2790
2791
2792
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2790

def name
  @name
end

#rulesArray<Google::Apis::YoutubePartnerV1::PolicyRule>

A list of rules that specify the action that YouTube should take and may optionally specify the conditions under which that action is enforced. Corresponds to the JSON property rules



2796
2797
2798
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2796

def rules
  @rules
end

#time_updatedDateTime

The time the policy was updated. Corresponds to the JSON property timeUpdated

Returns:

  • (DateTime)


2801
2802
2803
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2801

def time_updated
  @time_updated
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2808
2809
2810
2811
2812
2813
2814
2815
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2808

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @rules = args[:rules] if args.key?(:rules)
  @time_updated = args[:time_updated] if args.key?(:time_updated)
end