Class: GCPIamAuthMethod
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GCPIamAuthMethod
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
119 120 121 122 123 124 125 |
# File 'lib/schemas.rb', line 119 def self.from_dynamic!(d) d = Types::Hash[d] new( identity_id: d.fetch("identityId"), service_account_key_file_path: d.fetch("serviceAccountKeyFilePath"), ) end |
.from_json!(json) ⇒ Object
127 128 129 |
# File 'lib/schemas.rb', line 127 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
131 132 133 134 135 136 |
# File 'lib/schemas.rb', line 131 def to_dynamic { "identityId" => identity_id, "serviceAccountKeyFilePath" => service_account_key_file_path, } end |
#to_json(options = nil) ⇒ Object
138 139 140 |
# File 'lib/schemas.rb', line 138 def to_json( = nil) JSON.generate(to_dynamic, ) end |