Class: Google::Apis::StorageV1::Folder

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

Overview

A folder. Only available in buckets with hierarchical namespace enabled.

Defined Under Namespace

Classes: PendingRenameInfo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Folder

Returns a new instance of Folder.



1909
1910
1911
# File 'lib/google/apis/storage_v1/classes.rb', line 1909

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

Instance Attribute Details

#bucketString

The name of the bucket containing this folder. Corresponds to the JSON property bucket

Returns:

  • (String)


1865
1866
1867
# File 'lib/google/apis/storage_v1/classes.rb', line 1865

def bucket
  @bucket
end

#create_timeDateTime

The creation time of the folder in RFC 3339 format. Corresponds to the JSON property createTime

Returns:

  • (DateTime)


1870
1871
1872
# File 'lib/google/apis/storage_v1/classes.rb', line 1870

def create_time
  @create_time
end

#idString

The ID of the folder, including the bucket name, folder name. Corresponds to the JSON property id

Returns:

  • (String)


1875
1876
1877
# File 'lib/google/apis/storage_v1/classes.rb', line 1875

def id
  @id
end

#kindString

The kind of item this is. For folders, this is always storage#folder. Corresponds to the JSON property kind

Returns:

  • (String)


1880
1881
1882
# File 'lib/google/apis/storage_v1/classes.rb', line 1880

def kind
  @kind
end

#metagenerationFixnum

The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata. Corresponds to the JSON property metageneration

Returns:

  • (Fixnum)


1886
1887
1888
# File 'lib/google/apis/storage_v1/classes.rb', line 1886

def metageneration
  @metageneration
end

#nameString

The name of the folder. Required if not specified by URL parameter. Corresponds to the JSON property name

Returns:

  • (String)


1891
1892
1893
# File 'lib/google/apis/storage_v1/classes.rb', line 1891

def name
  @name
end

#pending_rename_infoGoogle::Apis::StorageV1::Folder::PendingRenameInfo

Only present if the folder is part of an ongoing rename folder operation. Contains information which can be used to query the operation status. Corresponds to the JSON property pendingRenameInfo



1897
1898
1899
# File 'lib/google/apis/storage_v1/classes.rb', line 1897

def pending_rename_info
  @pending_rename_info
end

The link to this folder. Corresponds to the JSON property selfLink

Returns:

  • (String)


1902
1903
1904
# File 'lib/google/apis/storage_v1/classes.rb', line 1902

def self_link
  @self_link
end

#update_timeDateTime

The modification time of the folder metadata in RFC 3339 format. Corresponds to the JSON property updateTime

Returns:

  • (DateTime)


1907
1908
1909
# File 'lib/google/apis/storage_v1/classes.rb', line 1907

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
# File 'lib/google/apis/storage_v1/classes.rb', line 1914

def update!(**args)
  @bucket = args[:bucket] if args.key?(:bucket)
  @create_time = args[:create_time] if args.key?(:create_time)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @metageneration = args[:metageneration] if args.key?(:metageneration)
  @name = args[:name] if args.key?(:name)
  @pending_rename_info = args[:pending_rename_info] if args.key?(:pending_rename_info)
  @self_link = args[:self_link] if args.key?(:self_link)
  @update_time = args[:update_time] if args.key?(:update_time)
end