Class: Google::Apis::DfareportingV3_4::UserRole

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

Overview

Contains properties of auser role, which is used to manage user access.

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

Returns a new instance of UserRole.



12397
12398
12399
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12397

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

Instance Attribute Details

#account_idFixnum

Account ID of this user role. This is a read-only field that can be left blank. Corresponds to the JSON property accountId

Returns:

  • (Fixnum)


12350
12351
12352
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12350

def 
  @account_id
end

#default_user_roleBoolean Also known as: default_user_role?

Whether this is a default user role. Default user roles are created by the system for the account/subaccount and cannot be modified or deleted. Each default user role comes with a basic set of preassigned permissions. Corresponds to the JSON property defaultUserRole

Returns:

  • (Boolean)


12357
12358
12359
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12357

def default_user_role
  @default_user_role
end

#idFixnum

ID of this user role. This is a read-only, auto-generated field. Corresponds to the JSON property id

Returns:

  • (Fixnum)


12363
12364
12365
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12363

def id
  @id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string " dfareporting#userRole". Corresponds to the JSON property kind

Returns:

  • (String)


12369
12370
12371
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12369

def kind
  @kind
end

#nameString

Name of this user role. This is a required field. Must be less than 256 characters long. If this user role is under a subaccount, the name must be unique among sites of the same subaccount. Otherwise, this user role is a top- level user role, and the name must be unique among top-level user roles of the same account. Corresponds to the JSON property name

Returns:

  • (String)


12378
12379
12380
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12378

def name
  @name
end

#parent_user_role_idFixnum

ID of the user role that this user role is based on or copied from. This is a required field. Corresponds to the JSON property parentUserRoleId

Returns:

  • (Fixnum)


12384
12385
12386
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12384

def parent_user_role_id
  @parent_user_role_id
end

#permissionsArray<Google::Apis::DfareportingV3_4::UserRolePermission>

List of permissions associated with this user role. Corresponds to the JSON property permissions



12389
12390
12391
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12389

def permissions
  @permissions
end

#subaccount_idFixnum

Subaccount ID of this user role. This is a read-only field that can be left blank. Corresponds to the JSON property subaccountId

Returns:

  • (Fixnum)


12395
12396
12397
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12395

def subaccount_id
  @subaccount_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
# File 'generated/google/apis/dfareporting_v3_4/classes.rb', line 12402

def update!(**args)
  @account_id = args[:account_id] if args.key?(:account_id)
  @default_user_role = args[:default_user_role] if args.key?(:default_user_role)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @parent_user_role_id = args[:parent_user_role_id] if args.key?(:parent_user_role_id)
  @permissions = args[:permissions] if args.key?(:permissions)
  @subaccount_id = args[:subaccount_id] if args.key?(:subaccount_id)
end