Class: Google::Apis::StorageV1beta1::Bucket

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

Overview

A bucket.

Defined Under Namespace

Classes: Owner, Website

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

Returns a new instance of Bucket



80
81
82
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 80

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

Instance Attribute Details

#aclArray<Google::Apis::StorageV1beta1::BucketAccessControl>

Access controls on the bucket. Corresponds to the JSON property acl



32
33
34
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 32

def acl
  @acl
end

#default_object_aclArray<Google::Apis::StorageV1beta1::ObjectAccessControl>

Default access controls to apply to new objects when no ACL is provided. Corresponds to the JSON property defaultObjectAcl



37
38
39
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 37

def default_object_acl
  @default_object_acl
end

#idString

The name of the bucket. Corresponds to the JSON property id

Returns:

  • (String)


42
43
44
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 42

def id
  @id
end

#kindString

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

Returns:

  • (String)


47
48
49
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 47

def kind
  @kind
end

#locationString

The location of the bucket. Object data for objects in the bucket resides in physical storage in this location. Can be US or EU. Defaults to US. Corresponds to the JSON property location

Returns:

  • (String)


53
54
55
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 53

def location
  @location
end

#ownerGoogle::Apis::StorageV1beta1::Bucket::Owner

The owner of the bucket. This will always be the project team's owner group. Corresponds to the JSON property owner



58
59
60
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 58

def owner
  @owner
end

#project_idFixnum

The project the bucket belongs to. Corresponds to the JSON property projectId

Returns:

  • (Fixnum)


63
64
65
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 63

def project_id
  @project_id
end

The URI of this bucket. Corresponds to the JSON property selfLink

Returns:

  • (String)


68
69
70
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 68

def self_link
  @self_link
end

#time_createdDateTime

Creation time of the bucket in RFC 3339 format. Corresponds to the JSON property timeCreated

Returns:

  • (DateTime)


73
74
75
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 73

def time_created
  @time_created
end

#websiteGoogle::Apis::StorageV1beta1::Bucket::Website

The bucket's website configuration. Corresponds to the JSON property website



78
79
80
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 78

def website
  @website
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



85
86
87
88
89
90
91
92
93
94
95
96
# File 'generated/google/apis/storage_v1beta1/classes.rb', line 85

def update!(**args)
  @acl = args[:acl] if args.key?(:acl)
  @default_object_acl = args[:default_object_acl] if args.key?(:default_object_acl)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @location = args[:location] if args.key?(:location)
  @owner = args[:owner] if args.key?(:owner)
  @project_id = args[:project_id] if args.key?(:project_id)
  @self_link = args[:self_link] if args.key?(:self_link)
  @time_created = args[:time_created] if args.key?(:time_created)
  @website = args[:website] if args.key?(:website)
end