Class: Google::Storage::Data::BucketDefaultObjectAcl
- Inherits:
-
Object
- Object
- Google::Storage::Data::BucketDefaultObjectAcl
- Includes:
- Comparable
- Defined in:
- lib/google/storage/property/bucket_default_object_acl.rb
Overview
A class to manage data for DefaultObjectAcl for bucket.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#entity ⇒ Object
readonly
Returns the value of attribute entity.
-
#entity_id ⇒ Object
readonly
Returns the value of attribute entity_id.
-
#generation ⇒ Object
readonly
Returns the value of attribute generation.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#project_team ⇒ Object
readonly
Returns the value of attribute project_team.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Instance Method Summary collapse
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
38 39 40 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 38 def bucket @bucket end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
39 40 41 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 39 def domain @domain end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
40 41 42 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 40 def email @email end |
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
41 42 43 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 41 def entity @entity end |
#entity_id ⇒ Object (readonly)
Returns the value of attribute entity_id.
42 43 44 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 42 def entity_id @entity_id end |
#generation ⇒ Object (readonly)
Returns the value of attribute generation.
43 44 45 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 43 def generation @generation end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
44 45 46 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 44 def id @id end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
45 46 47 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 45 def object @object end |
#project_team ⇒ Object (readonly)
Returns the value of attribute project_team.
46 47 48 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 46 def project_team @project_team end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
47 48 49 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 47 def role @role end |
Instance Method Details
#<=>(other) ⇒ Object
88 89 90 91 92 93 94 95 96 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 88 def <=>(other) return false unless other.is_a? BucketDefaultObjectAcl compare_fields(other).each do |compare| next if compare[:self].nil? || compare[:other].nil? result = compare[:self] <=> compare[:other] return result unless result.zero? end 0 end |
#==(other) ⇒ Object
79 80 81 82 83 84 85 86 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 79 def ==(other) return false unless other.is_a? BucketDefaultObjectAcl compare_fields(other).each do |compare| next if compare[:self].nil? || compare[:other].nil? return false if compare[:self] != compare[:other] end true end |
#to_json(_arg = nil) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 49 def to_json(_arg = nil) { 'bucket' => bucket, 'domain' => domain, 'email' => email, 'entity' => entity, 'entityId' => entity_id, 'generation' => generation, 'id' => id, 'object' => object, 'projectTeam' => project_team, 'role' => role }.reject { |_k, v| v.nil? }.to_json end |
#to_s ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/google/storage/property/bucket_default_object_acl.rb', line 64 def to_s { bucket: bucket, domain: domain, email: email, entity: entity, entity_id: entity_id, generation: generation, id: id, object: object, project_team: project_team, role: role }.reject { |_k, v| v.nil? }.map { |k, v| "#{k}: #{v}" }.join(', ') end |