Class: Google::Apis::DriveV3::Revision

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 metadata for a revision to a file. Some resource methods (such as revisions.update) require a revisionId. Use the revisions.list method to retrieve the ID for a revision.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Revision

Returns a new instance of Revision.



3042
3043
3044
# File 'lib/google/apis/drive_v3/classes.rb', line 3042

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

Instance Attribute Details

Output only. Links for exporting Docs Editors files to specific formats. Corresponds to the JSON property exportLinks

Returns:

  • (Hash<String,String>)


2960
2961
2962
# File 'lib/google/apis/drive_v3/classes.rb', line 2960

def export_links
  @export_links
end

#idString

Output only. The ID of the revision. Corresponds to the JSON property id

Returns:

  • (String)


2965
2966
2967
# File 'lib/google/apis/drive_v3/classes.rb', line 2965

def id
  @id
end

#keep_foreverBoolean Also known as: keep_forever?

Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file. This field is only applicable to files with binary content in Drive. Corresponds to the JSON property keepForever

Returns:

  • (Boolean)


2973
2974
2975
# File 'lib/google/apis/drive_v3/classes.rb', line 2973

def keep_forever
  @keep_forever
end

#kindString

Output only. Identifies what kind of resource this is. Value: the fixed string "drive#revision". Corresponds to the JSON property kind

Returns:

  • (String)


2980
2981
2982
# File 'lib/google/apis/drive_v3/classes.rb', line 2980

def kind
  @kind
end

#last_modifying_userGoogle::Apis::DriveV3::User

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



2985
2986
2987
# File 'lib/google/apis/drive_v3/classes.rb', line 2985

def last_modifying_user
  @last_modifying_user
end

#md5_checksumString

Output only. The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive. Corresponds to the JSON property md5Checksum

Returns:

  • (String)


2991
2992
2993
# File 'lib/google/apis/drive_v3/classes.rb', line 2991

def md5_checksum
  @md5_checksum
end

#mime_typeString

Output only. The MIME type of the revision. Corresponds to the JSON property mimeType

Returns:

  • (String)


2996
2997
2998
# File 'lib/google/apis/drive_v3/classes.rb', line 2996

def mime_type
  @mime_type
end

#modified_timeDateTime

The last time the revision was modified (RFC 3339 date-time). Corresponds to the JSON property modifiedTime

Returns:

  • (DateTime)


3001
3002
3003
# File 'lib/google/apis/drive_v3/classes.rb', line 3001

def modified_time
  @modified_time
end

#original_filenameString

Output only. The original filename used to create this revision. This is only applicable to files with binary content in Drive. Corresponds to the JSON property originalFilename

Returns:

  • (String)


3007
3008
3009
# File 'lib/google/apis/drive_v3/classes.rb', line 3007

def original_filename
  @original_filename
end

#publish_autoBoolean Also known as: publish_auto?

Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files. Corresponds to the JSON property publishAuto

Returns:

  • (Boolean)


3013
3014
3015
# File 'lib/google/apis/drive_v3/classes.rb', line 3013

def publish_auto
  @publish_auto
end

#publishedBoolean Also known as: published?

Whether this revision is published. This is only applicable to Docs Editors files. Corresponds to the JSON property published

Returns:

  • (Boolean)


3020
3021
3022
# File 'lib/google/apis/drive_v3/classes.rb', line 3020

def published
  @published
end

Output only. A link to the published revision. This is only populated for Google Sites files. Corresponds to the JSON property publishedLink

Returns:

  • (String)


3027
3028
3029
# File 'lib/google/apis/drive_v3/classes.rb', line 3027

def published_link
  @published_link
end

#published_outside_domainBoolean Also known as: published_outside_domain?

Whether this revision is published outside the domain. This is only applicable to Docs Editors files. Corresponds to the JSON property publishedOutsideDomain

Returns:

  • (Boolean)


3033
3034
3035
# File 'lib/google/apis/drive_v3/classes.rb', line 3033

def published_outside_domain
  @published_outside_domain
end

#sizeFixnum

Output only. The size of the revision's content in bytes. This is only applicable to files with binary content in Drive. Corresponds to the JSON property size

Returns:

  • (Fixnum)


3040
3041
3042
# File 'lib/google/apis/drive_v3/classes.rb', line 3040

def size
  @size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
# File 'lib/google/apis/drive_v3/classes.rb', line 3047

def update!(**args)
  @export_links = args[:export_links] if args.key?(:export_links)
  @id = args[:id] if args.key?(:id)
  @keep_forever = args[:keep_forever] if args.key?(:keep_forever)
  @kind = args[:kind] if args.key?(:kind)
  @last_modifying_user = args[:last_modifying_user] if args.key?(:last_modifying_user)
  @md5_checksum = args[:md5_checksum] if args.key?(:md5_checksum)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
  @modified_time = args[:modified_time] if args.key?(:modified_time)
  @original_filename = args[:original_filename] if args.key?(:original_filename)
  @publish_auto = args[:publish_auto] if args.key?(:publish_auto)
  @published = args[:published] if args.key?(:published)
  @published_link = args[:published_link] if args.key?(:published_link)
  @published_outside_domain = args[:published_outside_domain] if args.key?(:published_outside_domain)
  @size = args[:size] if args.key?(:size)
end