=begin #Mux API #Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. The version of the OpenAPI document: v1 Contact: devex@mux.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.0.1 =end require 'date' require 'time' module MuxRuby class VideoView attr_accessor :view_total_upscaling attr_accessor :preroll_ad_asset_hostname attr_accessor :player_source_domain attr_accessor :region attr_accessor :viewer_user_agent attr_accessor :preroll_requested attr_accessor :page_type attr_accessor :startup_score attr_accessor :view_seek_duration attr_accessor :country_name attr_accessor :player_source_height attr_accessor :longitude attr_accessor :buffering_count attr_accessor :video_duration attr_accessor :player_source_type attr_accessor :city attr_accessor :view_id attr_accessor :platform_description attr_accessor :video_startup_preroll_request_time attr_accessor :viewer_device_name attr_accessor :video_series attr_accessor :viewer_application_name attr_accessor :updated_at attr_accessor :view_total_content_playback_time attr_accessor :cdn attr_accessor :player_instance_id attr_accessor :video_language attr_accessor :player_source_width attr_accessor :player_error_message attr_accessor :player_mux_plugin_version attr_accessor :watched attr_accessor :playback_score attr_accessor :page_url attr_accessor :metro attr_accessor :view_max_request_latency attr_accessor :requests_for_first_preroll attr_accessor :view_total_downscaling attr_accessor :latitude attr_accessor :player_source_host_name attr_accessor :inserted_at attr_accessor :view_end attr_accessor :mux_embed_version attr_accessor :player_language attr_accessor :page_load_time attr_accessor :viewer_device_category attr_accessor :video_startup_preroll_load_time attr_accessor :player_version attr_accessor :watch_time attr_accessor :player_source_stream_type attr_accessor :preroll_ad_tag_hostname attr_accessor :viewer_device_manufacturer attr_accessor :rebuffering_score attr_accessor :experiment_name attr_accessor :viewer_os_version attr_accessor :player_preload attr_accessor :buffering_duration attr_accessor :player_view_count attr_accessor :player_software attr_accessor :player_load_time attr_accessor :platform_summary attr_accessor :video_encoding_variant attr_accessor :player_width attr_accessor :view_seek_count attr_accessor :viewer_experience_score attr_accessor :view_error_id attr_accessor :video_variant_name attr_accessor :preroll_played attr_accessor :viewer_application_engine attr_accessor :viewer_os_architecture attr_accessor :player_error_code attr_accessor :buffering_rate attr_accessor :events attr_accessor :player_name attr_accessor :view_start attr_accessor :view_average_request_throughput attr_accessor :video_producer attr_accessor :error_type_id attr_accessor :mux_viewer_id attr_accessor :video_id attr_accessor :continent_code attr_accessor :session_id attr_accessor :exit_before_video_start attr_accessor :video_content_type attr_accessor :viewer_os_family attr_accessor :player_poster attr_accessor :view_average_request_latency attr_accessor :video_variant_id attr_accessor :player_source_duration attr_accessor :player_source_url attr_accessor :mux_api_version attr_accessor :video_title attr_accessor :id attr_accessor :short_time attr_accessor :rebuffer_percentage attr_accessor :time_to_first_frame attr_accessor :viewer_user_id attr_accessor :video_stream_type attr_accessor :player_startup_time attr_accessor :viewer_application_version attr_accessor :view_max_downscale_percentage attr_accessor :view_max_upscale_percentage attr_accessor :country_code attr_accessor :used_fullscreen attr_accessor :isp attr_accessor :property_id attr_accessor :player_autoplay attr_accessor :player_height attr_accessor :asn attr_accessor :asn_name attr_accessor :quality_score attr_accessor :player_software_version attr_accessor :player_mux_plugin_name attr_accessor :sub_property_id attr_accessor :player_remote_played attr_accessor :view_max_playhead_position attr_accessor :view_playing_time attr_accessor :view_session_id attr_accessor :viewer_connection_type attr_accessor :viewer_device_model attr_accessor :weighted_average_bitrate attr_accessor :custom_1 attr_accessor :custom_2 attr_accessor :custom_3 attr_accessor :custom_4 attr_accessor :custom_5 attr_accessor :custom_6 attr_accessor :custom_7 attr_accessor :custom_8 attr_accessor :custom_9 attr_accessor :custom_10 attr_accessor :live_stream_latency attr_accessor :asset_id attr_accessor :environment_id attr_accessor :live_stream_id attr_accessor :mux_embed attr_accessor :playback_id attr_accessor :player_error_context attr_accessor :view_drm_type attr_accessor :view_dropped_frame_count attr_accessor :view_has_ad attr_accessor :video_startup_failure # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'view_total_upscaling' => :'view_total_upscaling', :'preroll_ad_asset_hostname' => :'preroll_ad_asset_hostname', :'player_source_domain' => :'player_source_domain', :'region' => :'region', :'viewer_user_agent' => :'viewer_user_agent', :'preroll_requested' => :'preroll_requested', :'page_type' => :'page_type', :'startup_score' => :'startup_score', :'view_seek_duration' => :'view_seek_duration', :'country_name' => :'country_name', :'player_source_height' => :'player_source_height', :'longitude' => :'longitude', :'buffering_count' => :'buffering_count', :'video_duration' => :'video_duration', :'player_source_type' => :'player_source_type', :'city' => :'city', :'view_id' => :'view_id', :'platform_description' => :'platform_description', :'video_startup_preroll_request_time' => :'video_startup_preroll_request_time', :'viewer_device_name' => :'viewer_device_name', :'video_series' => :'video_series', :'viewer_application_name' => :'viewer_application_name', :'updated_at' => :'updated_at', :'view_total_content_playback_time' => :'view_total_content_playback_time', :'cdn' => :'cdn', :'player_instance_id' => :'player_instance_id', :'video_language' => :'video_language', :'player_source_width' => :'player_source_width', :'player_error_message' => :'player_error_message', :'player_mux_plugin_version' => :'player_mux_plugin_version', :'watched' => :'watched', :'playback_score' => :'playback_score', :'page_url' => :'page_url', :'metro' => :'metro', :'view_max_request_latency' => :'view_max_request_latency', :'requests_for_first_preroll' => :'requests_for_first_preroll', :'view_total_downscaling' => :'view_total_downscaling', :'latitude' => :'latitude', :'player_source_host_name' => :'player_source_host_name', :'inserted_at' => :'inserted_at', :'view_end' => :'view_end', :'mux_embed_version' => :'mux_embed_version', :'player_language' => :'player_language', :'page_load_time' => :'page_load_time', :'viewer_device_category' => :'viewer_device_category', :'video_startup_preroll_load_time' => :'video_startup_preroll_load_time', :'player_version' => :'player_version', :'watch_time' => :'watch_time', :'player_source_stream_type' => :'player_source_stream_type', :'preroll_ad_tag_hostname' => :'preroll_ad_tag_hostname', :'viewer_device_manufacturer' => :'viewer_device_manufacturer', :'rebuffering_score' => :'rebuffering_score', :'experiment_name' => :'experiment_name', :'viewer_os_version' => :'viewer_os_version', :'player_preload' => :'player_preload', :'buffering_duration' => :'buffering_duration', :'player_view_count' => :'player_view_count', :'player_software' => :'player_software', :'player_load_time' => :'player_load_time', :'platform_summary' => :'platform_summary', :'video_encoding_variant' => :'video_encoding_variant', :'player_width' => :'player_width', :'view_seek_count' => :'view_seek_count', :'viewer_experience_score' => :'viewer_experience_score', :'view_error_id' => :'view_error_id', :'video_variant_name' => :'video_variant_name', :'preroll_played' => :'preroll_played', :'viewer_application_engine' => :'viewer_application_engine', :'viewer_os_architecture' => :'viewer_os_architecture', :'player_error_code' => :'player_error_code', :'buffering_rate' => :'buffering_rate', :'events' => :'events', :'player_name' => :'player_name', :'view_start' => :'view_start', :'view_average_request_throughput' => :'view_average_request_throughput', :'video_producer' => :'video_producer', :'error_type_id' => :'error_type_id', :'mux_viewer_id' => :'mux_viewer_id', :'video_id' => :'video_id', :'continent_code' => :'continent_code', :'session_id' => :'session_id', :'exit_before_video_start' => :'exit_before_video_start', :'video_content_type' => :'video_content_type', :'viewer_os_family' => :'viewer_os_family', :'player_poster' => :'player_poster', :'view_average_request_latency' => :'view_average_request_latency', :'video_variant_id' => :'video_variant_id', :'player_source_duration' => :'player_source_duration', :'player_source_url' => :'player_source_url', :'mux_api_version' => :'mux_api_version', :'video_title' => :'video_title', :'id' => :'id', :'short_time' => :'short_time', :'rebuffer_percentage' => :'rebuffer_percentage', :'time_to_first_frame' => :'time_to_first_frame', :'viewer_user_id' => :'viewer_user_id', :'video_stream_type' => :'video_stream_type', :'player_startup_time' => :'player_startup_time', :'viewer_application_version' => :'viewer_application_version', :'view_max_downscale_percentage' => :'view_max_downscale_percentage', :'view_max_upscale_percentage' => :'view_max_upscale_percentage', :'country_code' => :'country_code', :'used_fullscreen' => :'used_fullscreen', :'isp' => :'isp', :'property_id' => :'property_id', :'player_autoplay' => :'player_autoplay', :'player_height' => :'player_height', :'asn' => :'asn', :'asn_name' => :'asn_name', :'quality_score' => :'quality_score', :'player_software_version' => :'player_software_version', :'player_mux_plugin_name' => :'player_mux_plugin_name', :'sub_property_id' => :'sub_property_id', :'player_remote_played' => :'player_remote_played', :'view_max_playhead_position' => :'view_max_playhead_position', :'view_playing_time' => :'view_playing_time', :'view_session_id' => :'view_session_id', :'viewer_connection_type' => :'viewer_connection_type', :'viewer_device_model' => :'viewer_device_model', :'weighted_average_bitrate' => :'weighted_average_bitrate', :'custom_1' => :'custom_1', :'custom_2' => :'custom_2', :'custom_3' => :'custom_3', :'custom_4' => :'custom_4', :'custom_5' => :'custom_5', :'custom_6' => :'custom_6', :'custom_7' => :'custom_7', :'custom_8' => :'custom_8', :'custom_9' => :'custom_9', :'custom_10' => :'custom_10', :'live_stream_latency' => :'live_stream_latency', :'asset_id' => :'asset_id', :'environment_id' => :'environment_id', :'live_stream_id' => :'live_stream_id', :'mux_embed' => :'mux_embed', :'playback_id' => :'playback_id', :'player_error_context' => :'player_error_context', :'view_drm_type' => :'view_drm_type', :'view_dropped_frame_count' => :'view_dropped_frame_count', :'view_has_ad' => :'view_has_ad', :'video_startup_failure' => :'video_startup_failure' } end # Returns all the JSON keys this model knows about def self.acceptable_attributes attribute_map.values end # Attribute type mapping. def self.openapi_types { :'view_total_upscaling' => :'String', :'preroll_ad_asset_hostname' => :'String', :'player_source_domain' => :'String', :'region' => :'String', :'viewer_user_agent' => :'String', :'preroll_requested' => :'Boolean', :'page_type' => :'String', :'startup_score' => :'String', :'view_seek_duration' => :'Integer', :'country_name' => :'String', :'player_source_height' => :'Integer', :'longitude' => :'String', :'buffering_count' => :'Integer', :'video_duration' => :'Integer', :'player_source_type' => :'String', :'city' => :'String', :'view_id' => :'String', :'platform_description' => :'String', :'video_startup_preroll_request_time' => :'Integer', :'viewer_device_name' => :'String', :'video_series' => :'String', :'viewer_application_name' => :'String', :'updated_at' => :'String', :'view_total_content_playback_time' => :'Integer', :'cdn' => :'String', :'player_instance_id' => :'String', :'video_language' => :'String', :'player_source_width' => :'Integer', :'player_error_message' => :'String', :'player_mux_plugin_version' => :'String', :'watched' => :'Boolean', :'playback_score' => :'String', :'page_url' => :'String', :'metro' => :'String', :'view_max_request_latency' => :'Integer', :'requests_for_first_preroll' => :'Integer', :'view_total_downscaling' => :'String', :'latitude' => :'String', :'player_source_host_name' => :'String', :'inserted_at' => :'String', :'view_end' => :'String', :'mux_embed_version' => :'String', :'player_language' => :'String', :'page_load_time' => :'Integer', :'viewer_device_category' => :'String', :'video_startup_preroll_load_time' => :'Integer', :'player_version' => :'String', :'watch_time' => :'Integer', :'player_source_stream_type' => :'String', :'preroll_ad_tag_hostname' => :'String', :'viewer_device_manufacturer' => :'String', :'rebuffering_score' => :'String', :'experiment_name' => :'String', :'viewer_os_version' => :'String', :'player_preload' => :'Boolean', :'buffering_duration' => :'Integer', :'player_view_count' => :'Integer', :'player_software' => :'String', :'player_load_time' => :'Integer', :'platform_summary' => :'String', :'video_encoding_variant' => :'String', :'player_width' => :'Integer', :'view_seek_count' => :'Integer', :'viewer_experience_score' => :'String', :'view_error_id' => :'Integer', :'video_variant_name' => :'String', :'preroll_played' => :'Boolean', :'viewer_application_engine' => :'String', :'viewer_os_architecture' => :'String', :'player_error_code' => :'String', :'buffering_rate' => :'String', :'events' => :'Array', :'player_name' => :'String', :'view_start' => :'String', :'view_average_request_throughput' => :'Integer', :'video_producer' => :'String', :'error_type_id' => :'Integer', :'mux_viewer_id' => :'String', :'video_id' => :'String', :'continent_code' => :'String', :'session_id' => :'String', :'exit_before_video_start' => :'Boolean', :'video_content_type' => :'String', :'viewer_os_family' => :'String', :'player_poster' => :'String', :'view_average_request_latency' => :'Integer', :'video_variant_id' => :'String', :'player_source_duration' => :'Integer', :'player_source_url' => :'String', :'mux_api_version' => :'String', :'video_title' => :'String', :'id' => :'String', :'short_time' => :'String', :'rebuffer_percentage' => :'String', :'time_to_first_frame' => :'Integer', :'viewer_user_id' => :'String', :'video_stream_type' => :'String', :'player_startup_time' => :'Integer', :'viewer_application_version' => :'String', :'view_max_downscale_percentage' => :'String', :'view_max_upscale_percentage' => :'String', :'country_code' => :'String', :'used_fullscreen' => :'Boolean', :'isp' => :'String', :'property_id' => :'Integer', :'player_autoplay' => :'Boolean', :'player_height' => :'Integer', :'asn' => :'Integer', :'asn_name' => :'String', :'quality_score' => :'String', :'player_software_version' => :'String', :'player_mux_plugin_name' => :'String', :'sub_property_id' => :'String', :'player_remote_played' => :'Boolean', :'view_max_playhead_position' => :'String', :'view_playing_time' => :'String', :'view_session_id' => :'String', :'viewer_connection_type' => :'String', :'viewer_device_model' => :'String', :'weighted_average_bitrate' => :'Integer', :'custom_1' => :'String', :'custom_2' => :'String', :'custom_3' => :'String', :'custom_4' => :'String', :'custom_5' => :'String', :'custom_6' => :'String', :'custom_7' => :'String', :'custom_8' => :'String', :'custom_9' => :'String', :'custom_10' => :'String', :'live_stream_latency' => :'Integer', :'asset_id' => :'String', :'environment_id' => :'String', :'live_stream_id' => :'String', :'mux_embed' => :'String', :'playback_id' => :'String', :'player_error_context' => :'String', :'view_drm_type' => :'String', :'view_dropped_frame_count' => :'Integer', :'view_has_ad' => :'Boolean', :'video_startup_failure' => :'Boolean' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ :'view_total_upscaling', :'preroll_ad_asset_hostname', :'player_source_domain', :'region', :'viewer_user_agent', :'preroll_requested', :'page_type', :'startup_score', :'view_seek_duration', :'country_name', :'player_source_height', :'longitude', :'buffering_count', :'video_duration', :'player_source_type', :'city', :'platform_description', :'video_startup_preroll_request_time', :'viewer_device_name', :'video_series', :'viewer_application_name', :'view_total_content_playback_time', :'cdn', :'player_instance_id', :'video_language', :'player_source_width', :'player_error_message', :'player_mux_plugin_version', :'playback_score', :'page_url', :'metro', :'view_max_request_latency', :'requests_for_first_preroll', :'view_total_downscaling', :'latitude', :'player_source_host_name', :'mux_embed_version', :'player_language', :'page_load_time', :'viewer_device_category', :'video_startup_preroll_load_time', :'player_version', :'watch_time', :'player_source_stream_type', :'preroll_ad_tag_hostname', :'viewer_device_manufacturer', :'rebuffering_score', :'experiment_name', :'viewer_os_version', :'buffering_duration', :'player_view_count', :'player_software', :'player_load_time', :'platform_summary', :'video_encoding_variant', :'player_width', :'view_seek_count', :'viewer_experience_score', :'view_error_id', :'video_variant_name', :'preroll_played', :'viewer_application_engine', :'viewer_os_architecture', :'player_error_code', :'buffering_rate', :'player_name', :'view_average_request_throughput', :'video_producer', :'error_type_id', :'video_id', :'continent_code', :'video_content_type', :'viewer_os_family', :'player_poster', :'view_average_request_latency', :'video_variant_id', :'player_source_duration', :'player_source_url', :'video_title', :'rebuffer_percentage', :'time_to_first_frame', :'viewer_user_id', :'video_stream_type', :'player_startup_time', :'viewer_application_version', :'view_max_downscale_percentage', :'view_max_upscale_percentage', :'country_code', :'isp', :'player_height', :'asn', :'asn_name', :'quality_score', :'player_software_version', :'player_mux_plugin_name', :'sub_property_id', :'player_remote_played', :'view_max_playhead_position', :'view_playing_time', :'view_session_id', :'viewer_connection_type', :'viewer_device_model', :'weighted_average_bitrate', :'custom_1', :'custom_2', :'custom_3', :'custom_4', :'custom_5', :'custom_6', :'custom_7', :'custom_8', :'custom_9', :'custom_10', :'live_stream_latency', :'asset_id', :'live_stream_id', :'mux_embed', :'playback_id', :'player_error_context', :'view_drm_type', :'view_dropped_frame_count', ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::VideoView` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::VideoView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'view_total_upscaling') self.view_total_upscaling = attributes[:'view_total_upscaling'] end if attributes.key?(:'preroll_ad_asset_hostname') self.preroll_ad_asset_hostname = attributes[:'preroll_ad_asset_hostname'] end if attributes.key?(:'player_source_domain') self.player_source_domain = attributes[:'player_source_domain'] end if attributes.key?(:'region') self.region = attributes[:'region'] end if attributes.key?(:'viewer_user_agent') self.viewer_user_agent = attributes[:'viewer_user_agent'] end if attributes.key?(:'preroll_requested') self.preroll_requested = attributes[:'preroll_requested'] end if attributes.key?(:'page_type') self.page_type = attributes[:'page_type'] end if attributes.key?(:'startup_score') self.startup_score = attributes[:'startup_score'] end if attributes.key?(:'view_seek_duration') self.view_seek_duration = attributes[:'view_seek_duration'] end if attributes.key?(:'country_name') self.country_name = attributes[:'country_name'] end if attributes.key?(:'player_source_height') self.player_source_height = attributes[:'player_source_height'] end if attributes.key?(:'longitude') self.longitude = attributes[:'longitude'] end if attributes.key?(:'buffering_count') self.buffering_count = attributes[:'buffering_count'] end if attributes.key?(:'video_duration') self.video_duration = attributes[:'video_duration'] end if attributes.key?(:'player_source_type') self.player_source_type = attributes[:'player_source_type'] end if attributes.key?(:'city') self.city = attributes[:'city'] end if attributes.key?(:'view_id') self.view_id = attributes[:'view_id'] end if attributes.key?(:'platform_description') self.platform_description = attributes[:'platform_description'] end if attributes.key?(:'video_startup_preroll_request_time') self.video_startup_preroll_request_time = attributes[:'video_startup_preroll_request_time'] end if attributes.key?(:'viewer_device_name') self.viewer_device_name = attributes[:'viewer_device_name'] end if attributes.key?(:'video_series') self.video_series = attributes[:'video_series'] end if attributes.key?(:'viewer_application_name') self.viewer_application_name = attributes[:'viewer_application_name'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.key?(:'view_total_content_playback_time') self.view_total_content_playback_time = attributes[:'view_total_content_playback_time'] end if attributes.key?(:'cdn') self.cdn = attributes[:'cdn'] end if attributes.key?(:'player_instance_id') self.player_instance_id = attributes[:'player_instance_id'] end if attributes.key?(:'video_language') self.video_language = attributes[:'video_language'] end if attributes.key?(:'player_source_width') self.player_source_width = attributes[:'player_source_width'] end if attributes.key?(:'player_error_message') self.player_error_message = attributes[:'player_error_message'] end if attributes.key?(:'player_mux_plugin_version') self.player_mux_plugin_version = attributes[:'player_mux_plugin_version'] end if attributes.key?(:'watched') self.watched = attributes[:'watched'] end if attributes.key?(:'playback_score') self.playback_score = attributes[:'playback_score'] end if attributes.key?(:'page_url') self.page_url = attributes[:'page_url'] end if attributes.key?(:'metro') self.metro = attributes[:'metro'] end if attributes.key?(:'view_max_request_latency') self.view_max_request_latency = attributes[:'view_max_request_latency'] end if attributes.key?(:'requests_for_first_preroll') self.requests_for_first_preroll = attributes[:'requests_for_first_preroll'] end if attributes.key?(:'view_total_downscaling') self.view_total_downscaling = attributes[:'view_total_downscaling'] end if attributes.key?(:'latitude') self.latitude = attributes[:'latitude'] end if attributes.key?(:'player_source_host_name') self.player_source_host_name = attributes[:'player_source_host_name'] end if attributes.key?(:'inserted_at') self.inserted_at = attributes[:'inserted_at'] end if attributes.key?(:'view_end') self.view_end = attributes[:'view_end'] end if attributes.key?(:'mux_embed_version') self.mux_embed_version = attributes[:'mux_embed_version'] end if attributes.key?(:'player_language') self.player_language = attributes[:'player_language'] end if attributes.key?(:'page_load_time') self.page_load_time = attributes[:'page_load_time'] end if attributes.key?(:'viewer_device_category') self.viewer_device_category = attributes[:'viewer_device_category'] end if attributes.key?(:'video_startup_preroll_load_time') self.video_startup_preroll_load_time = attributes[:'video_startup_preroll_load_time'] end if attributes.key?(:'player_version') self.player_version = attributes[:'player_version'] end if attributes.key?(:'watch_time') self.watch_time = attributes[:'watch_time'] end if attributes.key?(:'player_source_stream_type') self.player_source_stream_type = attributes[:'player_source_stream_type'] end if attributes.key?(:'preroll_ad_tag_hostname') self.preroll_ad_tag_hostname = attributes[:'preroll_ad_tag_hostname'] end if attributes.key?(:'viewer_device_manufacturer') self.viewer_device_manufacturer = attributes[:'viewer_device_manufacturer'] end if attributes.key?(:'rebuffering_score') self.rebuffering_score = attributes[:'rebuffering_score'] end if attributes.key?(:'experiment_name') self.experiment_name = attributes[:'experiment_name'] end if attributes.key?(:'viewer_os_version') self.viewer_os_version = attributes[:'viewer_os_version'] end if attributes.key?(:'player_preload') self.player_preload = attributes[:'player_preload'] end if attributes.key?(:'buffering_duration') self.buffering_duration = attributes[:'buffering_duration'] end if attributes.key?(:'player_view_count') self.player_view_count = attributes[:'player_view_count'] end if attributes.key?(:'player_software') self.player_software = attributes[:'player_software'] end if attributes.key?(:'player_load_time') self.player_load_time = attributes[:'player_load_time'] end if attributes.key?(:'platform_summary') self.platform_summary = attributes[:'platform_summary'] end if attributes.key?(:'video_encoding_variant') self.video_encoding_variant = attributes[:'video_encoding_variant'] end if attributes.key?(:'player_width') self.player_width = attributes[:'player_width'] end if attributes.key?(:'view_seek_count') self.view_seek_count = attributes[:'view_seek_count'] end if attributes.key?(:'viewer_experience_score') self.viewer_experience_score = attributes[:'viewer_experience_score'] end if attributes.key?(:'view_error_id') self.view_error_id = attributes[:'view_error_id'] end if attributes.key?(:'video_variant_name') self.video_variant_name = attributes[:'video_variant_name'] end if attributes.key?(:'preroll_played') self.preroll_played = attributes[:'preroll_played'] end if attributes.key?(:'viewer_application_engine') self.viewer_application_engine = attributes[:'viewer_application_engine'] end if attributes.key?(:'viewer_os_architecture') self.viewer_os_architecture = attributes[:'viewer_os_architecture'] end if attributes.key?(:'player_error_code') self.player_error_code = attributes[:'player_error_code'] end if attributes.key?(:'buffering_rate') self.buffering_rate = attributes[:'buffering_rate'] end if attributes.key?(:'events') if (value = attributes[:'events']).is_a?(Array) self.events = value end end if attributes.key?(:'player_name') self.player_name = attributes[:'player_name'] end if attributes.key?(:'view_start') self.view_start = attributes[:'view_start'] end if attributes.key?(:'view_average_request_throughput') self.view_average_request_throughput = attributes[:'view_average_request_throughput'] end if attributes.key?(:'video_producer') self.video_producer = attributes[:'video_producer'] end if attributes.key?(:'error_type_id') self.error_type_id = attributes[:'error_type_id'] end if attributes.key?(:'mux_viewer_id') self.mux_viewer_id = attributes[:'mux_viewer_id'] end if attributes.key?(:'video_id') self.video_id = attributes[:'video_id'] end if attributes.key?(:'continent_code') self.continent_code = attributes[:'continent_code'] end if attributes.key?(:'session_id') self.session_id = attributes[:'session_id'] end if attributes.key?(:'exit_before_video_start') self.exit_before_video_start = attributes[:'exit_before_video_start'] end if attributes.key?(:'video_content_type') self.video_content_type = attributes[:'video_content_type'] end if attributes.key?(:'viewer_os_family') self.viewer_os_family = attributes[:'viewer_os_family'] end if attributes.key?(:'player_poster') self.player_poster = attributes[:'player_poster'] end if attributes.key?(:'view_average_request_latency') self.view_average_request_latency = attributes[:'view_average_request_latency'] end if attributes.key?(:'video_variant_id') self.video_variant_id = attributes[:'video_variant_id'] end if attributes.key?(:'player_source_duration') self.player_source_duration = attributes[:'player_source_duration'] end if attributes.key?(:'player_source_url') self.player_source_url = attributes[:'player_source_url'] end if attributes.key?(:'mux_api_version') self.mux_api_version = attributes[:'mux_api_version'] end if attributes.key?(:'video_title') self.video_title = attributes[:'video_title'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'short_time') self.short_time = attributes[:'short_time'] end if attributes.key?(:'rebuffer_percentage') self.rebuffer_percentage = attributes[:'rebuffer_percentage'] end if attributes.key?(:'time_to_first_frame') self.time_to_first_frame = attributes[:'time_to_first_frame'] end if attributes.key?(:'viewer_user_id') self.viewer_user_id = attributes[:'viewer_user_id'] end if attributes.key?(:'video_stream_type') self.video_stream_type = attributes[:'video_stream_type'] end if attributes.key?(:'player_startup_time') self.player_startup_time = attributes[:'player_startup_time'] end if attributes.key?(:'viewer_application_version') self.viewer_application_version = attributes[:'viewer_application_version'] end if attributes.key?(:'view_max_downscale_percentage') self.view_max_downscale_percentage = attributes[:'view_max_downscale_percentage'] end if attributes.key?(:'view_max_upscale_percentage') self.view_max_upscale_percentage = attributes[:'view_max_upscale_percentage'] end if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] end if attributes.key?(:'used_fullscreen') self.used_fullscreen = attributes[:'used_fullscreen'] end if attributes.key?(:'isp') self.isp = attributes[:'isp'] end if attributes.key?(:'property_id') self.property_id = attributes[:'property_id'] end if attributes.key?(:'player_autoplay') self.player_autoplay = attributes[:'player_autoplay'] end if attributes.key?(:'player_height') self.player_height = attributes[:'player_height'] end if attributes.key?(:'asn') self.asn = attributes[:'asn'] end if attributes.key?(:'asn_name') self.asn_name = attributes[:'asn_name'] end if attributes.key?(:'quality_score') self.quality_score = attributes[:'quality_score'] end if attributes.key?(:'player_software_version') self.player_software_version = attributes[:'player_software_version'] end if attributes.key?(:'player_mux_plugin_name') self.player_mux_plugin_name = attributes[:'player_mux_plugin_name'] end if attributes.key?(:'sub_property_id') self.sub_property_id = attributes[:'sub_property_id'] end if attributes.key?(:'player_remote_played') self.player_remote_played = attributes[:'player_remote_played'] end if attributes.key?(:'view_max_playhead_position') self.view_max_playhead_position = attributes[:'view_max_playhead_position'] end if attributes.key?(:'view_playing_time') self.view_playing_time = attributes[:'view_playing_time'] end if attributes.key?(:'view_session_id') self.view_session_id = attributes[:'view_session_id'] end if attributes.key?(:'viewer_connection_type') self.viewer_connection_type = attributes[:'viewer_connection_type'] end if attributes.key?(:'viewer_device_model') self.viewer_device_model = attributes[:'viewer_device_model'] end if attributes.key?(:'weighted_average_bitrate') self.weighted_average_bitrate = attributes[:'weighted_average_bitrate'] end if attributes.key?(:'custom_1') self.custom_1 = attributes[:'custom_1'] end if attributes.key?(:'custom_2') self.custom_2 = attributes[:'custom_2'] end if attributes.key?(:'custom_3') self.custom_3 = attributes[:'custom_3'] end if attributes.key?(:'custom_4') self.custom_4 = attributes[:'custom_4'] end if attributes.key?(:'custom_5') self.custom_5 = attributes[:'custom_5'] end if attributes.key?(:'custom_6') self.custom_6 = attributes[:'custom_6'] end if attributes.key?(:'custom_7') self.custom_7 = attributes[:'custom_7'] end if attributes.key?(:'custom_8') self.custom_8 = attributes[:'custom_8'] end if attributes.key?(:'custom_9') self.custom_9 = attributes[:'custom_9'] end if attributes.key?(:'custom_10') self.custom_10 = attributes[:'custom_10'] end if attributes.key?(:'live_stream_latency') self.live_stream_latency = attributes[:'live_stream_latency'] end if attributes.key?(:'asset_id') self.asset_id = attributes[:'asset_id'] end if attributes.key?(:'environment_id') self.environment_id = attributes[:'environment_id'] end if attributes.key?(:'live_stream_id') self.live_stream_id = attributes[:'live_stream_id'] end if attributes.key?(:'mux_embed') self.mux_embed = attributes[:'mux_embed'] end if attributes.key?(:'playback_id') self.playback_id = attributes[:'playback_id'] end if attributes.key?(:'player_error_context') self.player_error_context = attributes[:'player_error_context'] end if attributes.key?(:'view_drm_type') self.view_drm_type = attributes[:'view_drm_type'] end if attributes.key?(:'view_dropped_frame_count') self.view_dropped_frame_count = attributes[:'view_dropped_frame_count'] end if attributes.key?(:'view_has_ad') self.view_has_ad = attributes[:'view_has_ad'] end if attributes.key?(:'video_startup_failure') self.video_startup_failure = attributes[:'video_startup_failure'] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && view_total_upscaling == o.view_total_upscaling && preroll_ad_asset_hostname == o.preroll_ad_asset_hostname && player_source_domain == o.player_source_domain && region == o.region && viewer_user_agent == o.viewer_user_agent && preroll_requested == o.preroll_requested && page_type == o.page_type && startup_score == o.startup_score && view_seek_duration == o.view_seek_duration && country_name == o.country_name && player_source_height == o.player_source_height && longitude == o.longitude && buffering_count == o.buffering_count && video_duration == o.video_duration && player_source_type == o.player_source_type && city == o.city && view_id == o.view_id && platform_description == o.platform_description && video_startup_preroll_request_time == o.video_startup_preroll_request_time && viewer_device_name == o.viewer_device_name && video_series == o.video_series && viewer_application_name == o.viewer_application_name && updated_at == o.updated_at && view_total_content_playback_time == o.view_total_content_playback_time && cdn == o.cdn && player_instance_id == o.player_instance_id && video_language == o.video_language && player_source_width == o.player_source_width && player_error_message == o.player_error_message && player_mux_plugin_version == o.player_mux_plugin_version && watched == o.watched && playback_score == o.playback_score && page_url == o.page_url && metro == o.metro && view_max_request_latency == o.view_max_request_latency && requests_for_first_preroll == o.requests_for_first_preroll && view_total_downscaling == o.view_total_downscaling && latitude == o.latitude && player_source_host_name == o.player_source_host_name && inserted_at == o.inserted_at && view_end == o.view_end && mux_embed_version == o.mux_embed_version && player_language == o.player_language && page_load_time == o.page_load_time && viewer_device_category == o.viewer_device_category && video_startup_preroll_load_time == o.video_startup_preroll_load_time && player_version == o.player_version && watch_time == o.watch_time && player_source_stream_type == o.player_source_stream_type && preroll_ad_tag_hostname == o.preroll_ad_tag_hostname && viewer_device_manufacturer == o.viewer_device_manufacturer && rebuffering_score == o.rebuffering_score && experiment_name == o.experiment_name && viewer_os_version == o.viewer_os_version && player_preload == o.player_preload && buffering_duration == o.buffering_duration && player_view_count == o.player_view_count && player_software == o.player_software && player_load_time == o.player_load_time && platform_summary == o.platform_summary && video_encoding_variant == o.video_encoding_variant && player_width == o.player_width && view_seek_count == o.view_seek_count && viewer_experience_score == o.viewer_experience_score && view_error_id == o.view_error_id && video_variant_name == o.video_variant_name && preroll_played == o.preroll_played && viewer_application_engine == o.viewer_application_engine && viewer_os_architecture == o.viewer_os_architecture && player_error_code == o.player_error_code && buffering_rate == o.buffering_rate && events == o.events && player_name == o.player_name && view_start == o.view_start && view_average_request_throughput == o.view_average_request_throughput && video_producer == o.video_producer && error_type_id == o.error_type_id && mux_viewer_id == o.mux_viewer_id && video_id == o.video_id && continent_code == o.continent_code && session_id == o.session_id && exit_before_video_start == o.exit_before_video_start && video_content_type == o.video_content_type && viewer_os_family == o.viewer_os_family && player_poster == o.player_poster && view_average_request_latency == o.view_average_request_latency && video_variant_id == o.video_variant_id && player_source_duration == o.player_source_duration && player_source_url == o.player_source_url && mux_api_version == o.mux_api_version && video_title == o.video_title && id == o.id && short_time == o.short_time && rebuffer_percentage == o.rebuffer_percentage && time_to_first_frame == o.time_to_first_frame && viewer_user_id == o.viewer_user_id && video_stream_type == o.video_stream_type && player_startup_time == o.player_startup_time && viewer_application_version == o.viewer_application_version && view_max_downscale_percentage == o.view_max_downscale_percentage && view_max_upscale_percentage == o.view_max_upscale_percentage && country_code == o.country_code && used_fullscreen == o.used_fullscreen && isp == o.isp && property_id == o.property_id && player_autoplay == o.player_autoplay && player_height == o.player_height && asn == o.asn && asn_name == o.asn_name && quality_score == o.quality_score && player_software_version == o.player_software_version && player_mux_plugin_name == o.player_mux_plugin_name && sub_property_id == o.sub_property_id && player_remote_played == o.player_remote_played && view_max_playhead_position == o.view_max_playhead_position && view_playing_time == o.view_playing_time && view_session_id == o.view_session_id && viewer_connection_type == o.viewer_connection_type && viewer_device_model == o.viewer_device_model && weighted_average_bitrate == o.weighted_average_bitrate && custom_1 == o.custom_1 && custom_2 == o.custom_2 && custom_3 == o.custom_3 && custom_4 == o.custom_4 && custom_5 == o.custom_5 && custom_6 == o.custom_6 && custom_7 == o.custom_7 && custom_8 == o.custom_8 && custom_9 == o.custom_9 && custom_10 == o.custom_10 && live_stream_latency == o.live_stream_latency && asset_id == o.asset_id && environment_id == o.environment_id && live_stream_id == o.live_stream_id && mux_embed == o.mux_embed && playback_id == o.playback_id && player_error_context == o.player_error_context && view_drm_type == o.view_drm_type && view_dropped_frame_count == o.view_dropped_frame_count && view_has_ad == o.view_has_ad && video_startup_failure == o.video_startup_failure end # @see the `==` method # @param [Object] Object to be compared def eql?(o) self == o end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash [view_total_upscaling, preroll_ad_asset_hostname, player_source_domain, region, viewer_user_agent, preroll_requested, page_type, startup_score, view_seek_duration, country_name, player_source_height, longitude, buffering_count, video_duration, player_source_type, city, view_id, platform_description, video_startup_preroll_request_time, viewer_device_name, video_series, viewer_application_name, updated_at, view_total_content_playback_time, cdn, player_instance_id, video_language, player_source_width, player_error_message, player_mux_plugin_version, watched, playback_score, page_url, metro, view_max_request_latency, requests_for_first_preroll, view_total_downscaling, latitude, player_source_host_name, inserted_at, view_end, mux_embed_version, player_language, page_load_time, viewer_device_category, video_startup_preroll_load_time, player_version, watch_time, player_source_stream_type, preroll_ad_tag_hostname, viewer_device_manufacturer, rebuffering_score, experiment_name, viewer_os_version, player_preload, buffering_duration, player_view_count, player_software, player_load_time, platform_summary, video_encoding_variant, player_width, view_seek_count, viewer_experience_score, view_error_id, video_variant_name, preroll_played, viewer_application_engine, viewer_os_architecture, player_error_code, buffering_rate, events, player_name, view_start, view_average_request_throughput, video_producer, error_type_id, mux_viewer_id, video_id, continent_code, session_id, exit_before_video_start, video_content_type, viewer_os_family, player_poster, view_average_request_latency, video_variant_id, player_source_duration, player_source_url, mux_api_version, video_title, id, short_time, rebuffer_percentage, time_to_first_frame, viewer_user_id, video_stream_type, player_startup_time, viewer_application_version, view_max_downscale_percentage, view_max_upscale_percentage, country_code, used_fullscreen, isp, property_id, player_autoplay, player_height, asn, asn_name, quality_score, player_software_version, player_mux_plugin_name, sub_property_id, player_remote_played, view_max_playhead_position, view_playing_time, view_session_id, viewer_connection_type, viewer_device_model, weighted_average_bitrate, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, live_stream_latency, asset_id, environment_id, live_stream_id, mux_embed, playback_id, player_error_context, view_drm_type, view_dropped_frame_count, view_has_ad, video_startup_failure].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) new.build_from_hash(attributes) end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?.+?), (?.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = MuxRuby.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end # Returns the string representation of the object # @return [String] String presentation of the object def to_s to_hash.to_s end # to_body is an alias to to_hash (backward compatibility) # @return [Hash] Returns the object in the form of hash def to_body to_hash end # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end # Outputs non-array value in the form of hash # For object, use to_hash. Otherwise, just return the value # @param [Object] value Any valid value # @return [Hash] Returns the value in the form of hash def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end end end