Class: GetAuditLogsResponseTrailsItemData
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetAuditLogsResponseTrailsItemData
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
7021 7022 7023 7024 7025 7026 7027 7028 7029 |
# File 'lib/schemas.rb', line 7021 def self.from_dynamic!(d) d = Types::Hash[d] new( actor: d["actor"] ? GetAuditLogsResponseTrailsItemDataActor.from_dynamic!(d["actor"]) : nil, team: d["team"] ? GetAuditLogsResponseTrailsItemDataTeam.from_dynamic!(d["team"]) : nil, user: d["user"] ? GetAuditLogsResponseTrailsItemDataUser.from_dynamic!(d["user"]) : nil, variables: d["variables"], ) end |
.from_json!(json) ⇒ Object
7031 7032 7033 |
# File 'lib/schemas.rb', line 7031 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
7035 7036 7037 7038 7039 7040 7041 7042 |
# File 'lib/schemas.rb', line 7035 def to_dynamic { "actor" => actor&.to_dynamic, "team" => team&.to_dynamic, "user" => user&.to_dynamic, "variables" => variables, } end |
#to_json(options = nil) ⇒ Object
7044 7045 7046 |
# File 'lib/schemas.rb', line 7044 def to_json( = nil) JSON.generate(to_dynamic, ) end |