Class: Google::Apis::AppsactivityV1::Permission
- Inherits:
-
Object
- Object
- Google::Apis::AppsactivityV1::Permission
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/appsactivity_v1/classes.rb,
generated/google/apis/appsactivity_v1/representations.rb,
generated/google/apis/appsactivity_v1/representations.rb
Overview
Contains information about the permissions and type of access allowed with regards to a Google Drive object. This is a subset of the fields contained in a corresponding Drive Permissions object.
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the user or group the permission applies to.
-
#permission_id ⇒ String
The ID for this permission.
-
#role ⇒ String
Indicates the Google Drive permissions role.
-
#type ⇒ String
Indicates how widely permissions are granted.
-
#user ⇒ Google::Apis::AppsactivityV1::User
A representation of a user.
-
#with_link ⇒ Boolean
(also: #with_link?)
Whether the permission requires a link to the file.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Permission
constructor
A new instance of Permission.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Permission
Returns a new instance of Permission.
248 249 250 |
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 248 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
The name of the user or group the permission applies to.
Corresponds to the JSON property name
218 219 220 |
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 218 def name @name end |
#permission_id ⇒ String
The ID for this permission. Corresponds to the Drive API's permission ID
returned as part of the Drive Permissions resource.
Corresponds to the JSON property permissionId
224 225 226 |
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 224 def @permission_id end |
#role ⇒ String
Indicates the Google Drive permissions role. The role determines a user's
ability to read, write, or comment on the file.
Corresponds to the JSON property role
230 231 232 |
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 230 def role @role end |
#type ⇒ String
Indicates how widely permissions are granted.
Corresponds to the JSON property type
235 236 237 |
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 235 def type @type end |
#user ⇒ Google::Apis::AppsactivityV1::User
A representation of a user.
Corresponds to the JSON property user
240 241 242 |
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 240 def user @user end |
#with_link ⇒ Boolean Also known as: with_link?
Whether the permission requires a link to the file.
Corresponds to the JSON property withLink
245 246 247 |
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 245 def with_link @with_link end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
253 254 255 256 257 258 259 260 |
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 253 def update!(**args) @name = args[:name] if args.key?(:name) @permission_id = args[:permission_id] if args.key?(:permission_id) @role = args[:role] if args.key?(:role) @type = args[:type] if args.key?(:type) @user = args[:user] if args.key?(:user) @with_link = args[:with_link] if args.key?(:with_link) end |