Class: Google::Apis::AnalyticsadminV1alpha::GoogleAnalyticsAdminV1alphaAccessBinding

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

Overview

A binding of a user to a set of roles.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAnalyticsAdminV1alphaAccessBinding

Returns a new instance of GoogleAnalyticsAdminV1alphaAccessBinding.



76
77
78
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 76

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

Instance Attribute Details

#nameString

Output only. Resource name of this binding. Format: accounts/account/ accessBindings/access_binding or properties/property/accessBindings/ access_binding Example: "accounts/100/accessBindings/200" Corresponds to the JSON property name

Returns:

  • (String)


59
60
61
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 59

def name
  @name
end

#rolesArray<String>

A list of roles for to grant to the parent resource. Valid values: predefinedRoles/viewer predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin predefinedRoles/no-cost-data predefinedRoles/no-revenue- data For users, if an empty list of roles is set, this AccessBinding will be deleted. Corresponds to the JSON property roles

Returns:

  • (Array<String>)


68
69
70
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 68

def roles
  @roles
end

#userString

If set, the email address of the user to set roles for. Format: "someuser@ gmail.com" Corresponds to the JSON property user

Returns:

  • (String)


74
75
76
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 74

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



81
82
83
84
85
# File 'lib/google/apis/analyticsadmin_v1alpha/classes.rb', line 81

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @roles = args[:roles] if args.key?(:roles)
  @user = args[:user] if args.key?(:user)
end