Class: PostDetectedSecretsQueriesResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostDetectedSecretsQueriesResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
22866 22867 22868 22869 22870 22871 22872 |
# File 'lib/schemas.rb', line 22866 def self.from_dynamic!(d) d = Types::Hash[d] new( data: d["data"]&.map { |x| PostDetectedSecretsQueriesResponseDataItem.from_dynamic!(x) }, post_detected_secrets_queries_response_meta: d["meta"] ? PostDetectedSecretsQueriesResponseMeta.from_dynamic!(d["meta"]) : nil, ) end |
.from_json!(json) ⇒ Object
22874 22875 22876 |
# File 'lib/schemas.rb', line 22874 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
22878 22879 22880 22881 22882 22883 |
# File 'lib/schemas.rb', line 22878 def to_dynamic { "data" => data&.map { |x| x.to_dynamic }, "meta" => &.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
22885 22886 22887 |
# File 'lib/schemas.rb', line 22885 def to_json( = nil) JSON.generate(to_dynamic, ) end |