Class: GetScimV2GroupsGroupIDResponse

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
# File 'lib/schemas.rb', line 14206

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    external_id:                               d["externalId"],
    id:                                        d["id"],
    members:                                   d["members"] ? GetScimV2GroupsGroupIDResponseMembers.from_dynamic!(d["members"]) : nil,
    get_scim_v2_groups_group_id_response_meta: d["meta"] ? GetScimV2GroupsGroupIDResponseMeta.from_dynamic!(d["meta"]) : nil,
    schemas:                                   d["schemas"],
    user_name:                                 d["userName"],
  )
end

.from_json!(json) ⇒ Object



14218
14219
14220
# File 'lib/schemas.rb', line 14218

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
# File 'lib/schemas.rb', line 14222

def to_dynamic
  {
    "externalId" => external_id,
    "id"         => id,
    "members"    => members&.to_dynamic,
    "meta"       => get_scim_v2_groups_group_id_response_meta&.to_dynamic,
    "schemas"    => schemas,
    "userName"   => user_name,
  }
end

#to_json(options = nil) ⇒ Object



14233
14234
14235
# File 'lib/schemas.rb', line 14233

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end