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

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

Overview

The user's storage quota limits and usage. All fields are measured in bytes.

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

Returns a new instance of StorageQuota



131
132
133
# File 'generated/google/apis/drive_v3/classes.rb', line 131

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. Corresponds to the JSON property limit

Returns:

  • (Fixnum)


114
115
116
# File 'generated/google/apis/drive_v3/classes.rb', line 114

def limit
  @limit
end

#usageFixnum

The total usage across all services. Corresponds to the JSON property usage

Returns:

  • (Fixnum)


119
120
121
# File 'generated/google/apis/drive_v3/classes.rb', line 119

def usage
  @usage
end

#usage_in_driveFixnum

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

Returns:

  • (Fixnum)


124
125
126
# File 'generated/google/apis/drive_v3/classes.rb', line 124

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)


129
130
131
# File 'generated/google/apis/drive_v3/classes.rb', line 129

def usage_in_drive_trash
  @usage_in_drive_trash
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



136
137
138
139
140
141
# File 'generated/google/apis/drive_v3/classes.rb', line 136

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