class Pinnacle::MediaPayload
def self.from_json(json_object:)
-
(Pinnacle::MediaPayload)
-
Parameters:
-
json_object
(String
) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) type = parsed_json["type"] url = parsed_json["url"] new( type: type, url: url, additional_properties: struct ) end
def self.validate_raw(obj:)
-
(Void)
-
Parameters:
-
obj
(Object
) --
def self.validate_raw(obj:) obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.") obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.") end
def initialize(type:, url:, additional_properties: nil)
-
(Pinnacle::MediaPayload)
-
Parameters:
-
additional_properties
(OpenStruct
) -- Additional properties unmapped to the current class definition -
url
(String
) -- -
type
(String
) --
def initialize(type:, url:, additional_properties: nil) @type = type @url = url @additional_properties = additional_properties @_field_set = { "type": type, "url": url } end
def to_json(*_args)
-
(String)
-
def to_json(*_args) @_field_set&.to_json end