Class: Google::Apis::DriveV3::About::StorageQuota

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

Overview

The user's storage quota limits and usage. For users that are part of an organization with pooled storage, information about the limit and usage across all services is for the organization, rather than the individual user. All fields are measured in bytes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StorageQuota

Returns a new instance of StorageQuota.



185
186
187
# File 'lib/google/apis/drive_v3/classes.rb', line 185

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

Instance Attribute Details

#limitFixnum

The usage limit, if applicable. This will not be present if the user has unlimited storage. For users that are part of an organization with pooled storage, this is the limit for the organization, rather than the individual user. Corresponds to the JSON property limit

Returns:

  • (Fixnum)


166
167
168
# File 'lib/google/apis/drive_v3/classes.rb', line 166

def limit
  @limit
end

#usageFixnum

The total usage across all services. For users that are part of an organization with pooled storage, this is the usage across all services for the organization, rather than the individual user. Corresponds to the JSON property usage

Returns:

  • (Fixnum)


173
174
175
# File 'lib/google/apis/drive_v3/classes.rb', line 173

def usage
  @usage
end

#usage_in_driveFixnum

The usage by all files in Google Drive. Corresponds to the JSON property usageInDrive

Returns:

  • (Fixnum)


178
179
180
# File 'lib/google/apis/drive_v3/classes.rb', line 178

def usage_in_drive
  @usage_in_drive
end

#usage_in_drive_trashFixnum

The usage by trashed files in Google Drive. Corresponds to the JSON property usageInDriveTrash

Returns:

  • (Fixnum)


183
184
185
# File 'lib/google/apis/drive_v3/classes.rb', line 183

def usage_in_drive_trash
  @usage_in_drive_trash
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



190
191
192
193
194
195
# File 'lib/google/apis/drive_v3/classes.rb', line 190

def update!(**args)
  @limit = args[:limit] if args.key?(:limit)
  @usage = args[:usage] if args.key?(:usage)
  @usage_in_drive = args[:usage_in_drive] if args.key?(:usage_in_drive)
  @usage_in_drive_trash = args[:usage_in_drive_trash] if args.key?(:usage_in_drive_trash)
end