Class: Google::Apis::DriveV2::About

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

Overview

An item with user information and settings.

Defined Under Namespace

Classes: AdditionalRoleInfo, DriveTheme, ExportFormat, Feature, ImportFormat, MaxUploadSize, QuotaBytesByService, TeamDriveTheme

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ About

Returns a new instance of About.



184
185
186
# File 'lib/google/apis/drive_v2/classes.rb', line 184

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

Instance Attribute Details

#additional_role_infoArray<Google::Apis::DriveV2::About::AdditionalRoleInfo>

Information about supported additional roles per file type. The most specific type takes precedence. Corresponds to the JSON property additionalRoleInfo



33
34
35
# File 'lib/google/apis/drive_v2/classes.rb', line 33

def additional_role_info
  @additional_role_info
end

#can_create_drivesBoolean Also known as: can_create_drives?

Whether the user can create shared drives. Corresponds to the JSON property canCreateDrives

Returns:

  • (Boolean)


38
39
40
# File 'lib/google/apis/drive_v2/classes.rb', line 38

def can_create_drives
  @can_create_drives
end

#can_create_team_drivesBoolean Also known as: can_create_team_drives?

Deprecated: Use canCreateDrives instead. Corresponds to the JSON property canCreateTeamDrives

Returns:

  • (Boolean)


44
45
46
# File 'lib/google/apis/drive_v2/classes.rb', line 44

def can_create_team_drives
  @can_create_team_drives
end

#domain_sharing_policyString

Deprecated: Does not granularly represent allowlisted domains or Trust Rules. The domain sharing policy for the current user. Possible values are: * allowed * allowedWithWarning * incomingOnly * disallowed Note that if the user is enrolled in Trust Rules, disallowed will always be returned. If sharing is restricted to allowlisted domains, either incomingOnly or allowedWithWarning will be returned, depending on whether receiving files from outside the allowlisted domains is permitted. Corresponds to the JSON property domainSharingPolicy

Returns:

  • (String)


56
57
58
# File 'lib/google/apis/drive_v2/classes.rb', line 56

def domain_sharing_policy
  @domain_sharing_policy
end

#drive_themesArray<Google::Apis::DriveV2::About::DriveTheme>

A list of themes that are supported for shared drives. Corresponds to the JSON property driveThemes



61
62
63
# File 'lib/google/apis/drive_v2/classes.rb', line 61

def drive_themes
  @drive_themes
end

#etagString

The ETag of the item. Corresponds to the JSON property etag

Returns:

  • (String)


66
67
68
# File 'lib/google/apis/drive_v2/classes.rb', line 66

def etag
  @etag
end

#export_formatsArray<Google::Apis::DriveV2::About::ExportFormat>

The allowable export formats. Corresponds to the JSON property exportFormats



71
72
73
# File 'lib/google/apis/drive_v2/classes.rb', line 71

def export_formats
  @export_formats
end

#featuresArray<Google::Apis::DriveV2::About::Feature>

List of additional features enabled on this account. Corresponds to the JSON property features



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

def features
  @features
end

#folder_color_paletteArray<String>

The palette of allowable folder colors as RGB hex strings. Corresponds to the JSON property folderColorPalette

Returns:

  • (Array<String>)


81
82
83
# File 'lib/google/apis/drive_v2/classes.rb', line 81

def folder_color_palette
  @folder_color_palette
end

#import_formatsArray<Google::Apis::DriveV2::About::ImportFormat>

The allowable import formats. Corresponds to the JSON property importFormats



86
87
88
# File 'lib/google/apis/drive_v2/classes.rb', line 86

def import_formats
  @import_formats
end

#is_current_app_installedBoolean Also known as: is_current_app_installed?

A boolean indicating whether the authenticated app is installed by the authenticated user. Corresponds to the JSON property isCurrentAppInstalled

Returns:

  • (Boolean)


92
93
94
# File 'lib/google/apis/drive_v2/classes.rb', line 92

def is_current_app_installed
  @is_current_app_installed
end

#kindString

This is always drive#about. Corresponds to the JSON property kind

Returns:

  • (String)


98
99
100
# File 'lib/google/apis/drive_v2/classes.rb', line 98

def kind
  @kind
end

#language_codeString

The user's language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/). Corresponds to the JSON property languageCode

Returns:

  • (String)


104
105
106
# File 'lib/google/apis/drive_v2/classes.rb', line 104

def language_code
  @language_code
end

#largest_change_idFixnum

The largest change id. Corresponds to the JSON property largestChangeId

Returns:

  • (Fixnum)


109
110
111
# File 'lib/google/apis/drive_v2/classes.rb', line 109

def largest_change_id
  @largest_change_id
end

#max_upload_sizesArray<Google::Apis::DriveV2::About::MaxUploadSize>

List of max upload sizes for each file type. The most specific type takes precedence. Corresponds to the JSON property maxUploadSizes



115
116
117
# File 'lib/google/apis/drive_v2/classes.rb', line 115

def max_upload_sizes
  @max_upload_sizes
end

#nameString

The name of the current user. Corresponds to the JSON property name

Returns:

  • (String)


120
121
122
# File 'lib/google/apis/drive_v2/classes.rb', line 120

def name
  @name
end

#permission_idString

The current user's ID as visible in the permissions collection. Corresponds to the JSON property permissionId

Returns:

  • (String)


125
126
127
# File 'lib/google/apis/drive_v2/classes.rb', line 125

def permission_id
  @permission_id
end

#quota_bytes_by_serviceArray<Google::Apis::DriveV2::About::QuotaBytesByService>

The amount of storage quota used by different Google services. Corresponds to the JSON property quotaBytesByService



130
131
132
# File 'lib/google/apis/drive_v2/classes.rb', line 130

def quota_bytes_by_service
  @quota_bytes_by_service
end

#quota_bytes_totalFixnum

The total number of quota bytes. This is only relevant when quotaType is LIMITED. Corresponds to the JSON property quotaBytesTotal

Returns:

  • (Fixnum)


136
137
138
# File 'lib/google/apis/drive_v2/classes.rb', line 136

def quota_bytes_total
  @quota_bytes_total
end

#quota_bytes_usedFixnum

The number of quota bytes used by Google Drive. Corresponds to the JSON property quotaBytesUsed

Returns:

  • (Fixnum)


141
142
143
# File 'lib/google/apis/drive_v2/classes.rb', line 141

def quota_bytes_used
  @quota_bytes_used
end

#quota_bytes_used_aggregateFixnum

The number of quota bytes used by all Google apps (Drive, Picasa, etc.). Corresponds to the JSON property quotaBytesUsedAggregate

Returns:

  • (Fixnum)


146
147
148
# File 'lib/google/apis/drive_v2/classes.rb', line 146

def quota_bytes_used_aggregate
  @quota_bytes_used_aggregate
end

#quota_bytes_used_in_trashFixnum

The number of quota bytes used by trashed items. Corresponds to the JSON property quotaBytesUsedInTrash

Returns:

  • (Fixnum)


151
152
153
# File 'lib/google/apis/drive_v2/classes.rb', line 151

def quota_bytes_used_in_trash
  @quota_bytes_used_in_trash
end

#quota_typeString

The type of the user's storage quota. Possible values are: * LIMITED * UNLIMITED Corresponds to the JSON property quotaType

Returns:

  • (String)


157
158
159
# File 'lib/google/apis/drive_v2/classes.rb', line 157

def quota_type
  @quota_type
end

#remaining_change_idsFixnum

The number of remaining change ids, limited to no more than 2500. Corresponds to the JSON property remainingChangeIds

Returns:

  • (Fixnum)


162
163
164
# File 'lib/google/apis/drive_v2/classes.rb', line 162

def remaining_change_ids
  @remaining_change_ids
end

#root_folder_idString

The id of the root folder. Corresponds to the JSON property rootFolderId

Returns:

  • (String)


167
168
169
# File 'lib/google/apis/drive_v2/classes.rb', line 167

def root_folder_id
  @root_folder_id
end

A link back to this item. Corresponds to the JSON property selfLink

Returns:

  • (String)


172
173
174
# File 'lib/google/apis/drive_v2/classes.rb', line 172

def self_link
  @self_link
end

#team_drive_themesArray<Google::Apis::DriveV2::About::TeamDriveTheme>

Deprecated: Use driveThemes instead. Corresponds to the JSON property teamDriveThemes



177
178
179
# File 'lib/google/apis/drive_v2/classes.rb', line 177

def team_drive_themes
  @team_drive_themes
end

#userGoogle::Apis::DriveV2::User

Information about a Drive user. Corresponds to the JSON property user



182
183
184
# File 'lib/google/apis/drive_v2/classes.rb', line 182

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/google/apis/drive_v2/classes.rb', line 189

def update!(**args)
  @additional_role_info = args[:additional_role_info] if args.key?(:additional_role_info)
  @can_create_drives = args[:can_create_drives] if args.key?(:can_create_drives)
  @can_create_team_drives = args[:can_create_team_drives] if args.key?(:can_create_team_drives)
  @domain_sharing_policy = args[:domain_sharing_policy] if args.key?(:domain_sharing_policy)
  @drive_themes = args[:drive_themes] if args.key?(:drive_themes)
  @etag = args[:etag] if args.key?(:etag)
  @export_formats = args[:export_formats] if args.key?(:export_formats)
  @features = args[:features] if args.key?(:features)
  @folder_color_palette = args[:folder_color_palette] if args.key?(:folder_color_palette)
  @import_formats = args[:import_formats] if args.key?(:import_formats)
  @is_current_app_installed = args[:is_current_app_installed] if args.key?(:is_current_app_installed)
  @kind = args[:kind] if args.key?(:kind)
  @language_code = args[:language_code] if args.key?(:language_code)
  @largest_change_id = args[:largest_change_id] if args.key?(:largest_change_id)
  @max_upload_sizes = args[:max_upload_sizes] if args.key?(:max_upload_sizes)
  @name = args[:name] if args.key?(:name)
  @permission_id = args[:permission_id] if args.key?(:permission_id)
  @quota_bytes_by_service = args[:quota_bytes_by_service] if args.key?(:quota_bytes_by_service)
  @quota_bytes_total = args[:quota_bytes_total] if args.key?(:quota_bytes_total)
  @quota_bytes_used = args[:quota_bytes_used] if args.key?(:quota_bytes_used)
  @quota_bytes_used_aggregate = args[:quota_bytes_used_aggregate] if args.key?(:quota_bytes_used_aggregate)
  @quota_bytes_used_in_trash = args[:quota_bytes_used_in_trash] if args.key?(:quota_bytes_used_in_trash)
  @quota_type = args[:quota_type] if args.key?(:quota_type)
  @remaining_change_ids = args[:remaining_change_ids] if args.key?(:remaining_change_ids)
  @root_folder_id = args[:root_folder_id] if args.key?(:root_folder_id)
  @self_link = args[:self_link] if args.key?(:self_link)
  @team_drive_themes = args[:team_drive_themes] if args.key?(:team_drive_themes)
  @user = args[:user] if args.key?(:user)
end