Class: Google::Storage::Data::DefaultObjectACLProjectTeam
- Inherits:
-
Object
- Object
- Google::Storage::Data::DefaultObjectACLProjectTeam
- Includes:
- Comparable
- Defined in:
- lib/google/storage/property/defaultobjectacl_project_team.rb
Overview
A class to manage data for ProjectTeam for default_object_acl.
Direct Known Subclasses
DefaultObjectACLProjectTeamApi, DefaultObjectACLProjectTeamCatalog
Instance Attribute Summary collapse
-
#project_number ⇒ Object
readonly
Returns the value of attribute project_number.
-
#team ⇒ Object
readonly
Returns the value of attribute team.
Instance Method Summary collapse
Instance Attribute Details
#project_number ⇒ Object (readonly)
Returns the value of attribute project_number.
37 38 39 |
# File 'lib/google/storage/property/defaultobjectacl_project_team.rb', line 37 def project_number @project_number end |
#team ⇒ Object (readonly)
Returns the value of attribute team.
38 39 40 |
# File 'lib/google/storage/property/defaultobjectacl_project_team.rb', line 38 def team @team end |
Instance Method Details
#<=>(other) ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'lib/google/storage/property/defaultobjectacl_project_team.rb', line 63 def <=>(other) return false unless other.is_a? DefaultObjectACLProjectTeam 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
54 55 56 57 58 59 60 61 |
# File 'lib/google/storage/property/defaultobjectacl_project_team.rb', line 54 def ==(other) return false unless other.is_a? DefaultObjectACLProjectTeam 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
40 41 42 43 44 45 |
# File 'lib/google/storage/property/defaultobjectacl_project_team.rb', line 40 def to_json(_arg = nil) { 'projectNumber' => project_number, 'team' => team }.reject { |_k, v| v.nil? }.to_json end |
#to_s ⇒ Object
47 48 49 50 51 52 |
# File 'lib/google/storage/property/defaultobjectacl_project_team.rb', line 47 def to_s { project_number: project_number, team: team }.reject { |_k, v| v.nil? }.map { |k, v| "#{k}: #{v}" }.join(', ') end |