Class: Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelPermission

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

Overview

The permission that applies to a principal (user, group, audience) on a label.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsDriveLabelsV2LabelPermission

Returns a new instance of GoogleAppsDriveLabelsV2LabelPermission.



2641
2642
2643
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 2641

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

Instance Attribute Details

#audienceString

Audience to grant a role to. The magic value of audiences/default may be used to apply the role to the default audience in the context of the organization that owns the label. Corresponds to the JSON property audience

Returns:

  • (String)


2611
2612
2613
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 2611

def audience
  @audience
end

#emailString

Specifies the email address for a user or group principal. Not populated for audience principals. User and group permissions may only be inserted using an email address. On update requests, if email address is specified, no principal should be specified. Corresponds to the JSON property email

Returns:

  • (String)


2619
2620
2621
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 2619

def email
  @email
end

#groupString

Group resource name. Corresponds to the JSON property group

Returns:

  • (String)


2624
2625
2626
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 2624

def group
  @group
end

#nameString

Resource name of this permission. Corresponds to the JSON property name

Returns:

  • (String)


2629
2630
2631
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 2629

def name
  @name
end

#personString

Person resource name. Corresponds to the JSON property person

Returns:

  • (String)


2634
2635
2636
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 2634

def person
  @person
end

#roleString

The role the principal should have. Corresponds to the JSON property role

Returns:

  • (String)


2639
2640
2641
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 2639

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2646
2647
2648
2649
2650
2651
2652
2653
# File 'lib/google/apis/drivelabels_v2/classes.rb', line 2646

def update!(**args)
  @audience = args[:audience] if args.key?(:audience)
  @email = args[:email] if args.key?(:email)
  @group = args[:group] if args.key?(:group)
  @name = args[:name] if args.key?(:name)
  @person = args[:person] if args.key?(:person)
  @role = args[:role] if args.key?(:role)
end