Class: FastpixClient::Models::Components::Views

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/fastpix_client/models/components/views.rb

Overview

Displays the result of the request.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_json

Constructor Details

#initialize(beacon_domain: nil, custom: nil, exit_before_video_start: nil, insert_timestamp: nil, ip_address: nil, os_version: nil, player_autoplay_on: nil, player_preload_on: nil, player_remote_played: nil, used_full_screen: nil, video_startup_failed: nil, view_has_ad: nil, view_has_error: nil, view_id: nil, workspace_id: nil, events: nil, asn_id: nil, asn_name: nil, average_bitrate: nil, avg_downscaling: nil, avg_request_latency: nil, avg_request_throughput: nil, avg_upscaling: nil, browser_engine: nil, browser_name: nil, browser_version: nil, buffer_count: nil, buffer_fill: nil, buffer_frequency: nil, buffer_ratio: nil, cdn: nil, city: nil, connection_type: nil, continent: nil, country: nil, country_code: nil, device_manufacturer: nil, device_model: nil, device_name: nil, device_type: nil, drm_type: nil, dropped_frame_count: nil, error_code: nil, error_context: nil, error_id: nil, error_message: nil, experiment_name: nil, fp_api_version: nil, fp_embed: nil, fp_embed_version: nil, fp_live_stream_id: nil, fp_playback_id: nil, fp_sdk: nil, fp_sdk_version: nil, fp_viewer_id: nil, jump_latency: nil, latitude: nil, live_stream_latency: nil, longitude: nil, max_downscaling: nil, max_request_latency: nil, max_upscaling: nil, media_id: nil, os_name: nil, page_context: nil, page_load_time: nil, playback_score: nil, player_height: nil, player_initialization_time: nil, player_instance_id: nil, player_language: nil, player_name: nil, player_poster: nil, player_resolution: nil, player_software_name: nil, player_software_version: nil, player_source_domain: nil, player_source_height: nil, player_source_width: nil, player_version: nil, player_view_count: nil, player_width: nil, property_id: nil, quality_of_experience_score: nil, region: nil, render_quality_score: nil, session_id: nil, sign: nil, stability_score: nil, startup_score: nil, sub_property_id: nil, total_startup_time: nil, updated_timestamp: nil, user_agent: nil, video_content_type: nil, video_duration: nil, video_encoding_variant: nil, video_id: nil, video_language: nil, video_producer: nil, video_resolution: nil, video_series: nil, video_source_domain: nil, video_source_duration: nil, video_source_hostname: nil, video_source_stream_type: nil, video_source_type: nil, video_source_url: nil, video_startup_time: nil, video_title: nil, video_variant_id: nil, video_variant_name: nil, view_end: nil, view_max_playhead_position: nil, view_page_url: nil, view_playing_time: nil, view_seeked_count: nil, view_seeked_duration: nil, view_session_id: nil, view_start: nil, view_total_content_playback_time: nil, viewer_id: nil, watch_time: nil) ⇒ Views

Returns a new instance of Views.



386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/fastpix_client/models/components/views.rb', line 386

def initialize(beacon_domain: nil, custom: nil, exit_before_video_start: nil, insert_timestamp: nil, ip_address: nil, os_version: nil, player_autoplay_on: nil, player_preload_on: nil, player_remote_played: nil, used_full_screen: nil, video_startup_failed: nil, view_has_ad: nil, view_has_error: nil, view_id: nil, workspace_id: nil, events: nil, asn_id: nil, asn_name: nil, average_bitrate: nil, avg_downscaling: nil, avg_request_latency: nil, avg_request_throughput: nil, avg_upscaling: nil, browser_engine: nil, browser_name: nil, browser_version: nil, buffer_count: nil, buffer_fill: nil, buffer_frequency: nil, buffer_ratio: nil, cdn: nil, city: nil, connection_type: nil, continent: nil, country: nil, country_code: nil, device_manufacturer: nil, device_model: nil, device_name: nil, device_type: nil, drm_type: nil, dropped_frame_count: nil, error_code: nil, error_context: nil, error_id: nil, error_message: nil, experiment_name: nil, fp_api_version: nil, fp_embed: nil, fp_embed_version: nil, fp_live_stream_id: nil, fp_playback_id: nil, fp_sdk: nil, fp_sdk_version: nil, fp_viewer_id: nil, jump_latency: nil, latitude: nil, live_stream_latency: nil, longitude: nil, max_downscaling: nil, max_request_latency: nil, max_upscaling: nil, media_id: nil, os_name: nil, page_context: nil, page_load_time: nil, playback_score: nil, player_height: nil, player_initialization_time: nil, player_instance_id: nil, player_language: nil, player_name: nil, player_poster: nil, player_resolution: nil, player_software_name: nil, player_software_version: nil, player_source_domain: nil, player_source_height: nil, player_source_width: nil, player_version: nil, player_view_count: nil, player_width: nil, property_id: nil, quality_of_experience_score: nil, region: nil, render_quality_score: nil, session_id: nil, sign: nil, stability_score: nil, startup_score: nil, sub_property_id: nil, total_startup_time: nil, updated_timestamp: nil, user_agent: nil, video_content_type: nil, video_duration: nil, video_encoding_variant: nil, video_id: nil, video_language: nil, video_producer: nil, video_resolution: nil, video_series: nil, video_source_domain: nil, video_source_duration: nil, video_source_hostname: nil, video_source_stream_type: nil, video_source_type: nil, video_source_url: nil, video_startup_time: nil, video_title: nil, video_variant_id: nil, video_variant_name: nil, view_end: nil, view_max_playhead_position: nil, view_page_url: nil, view_playing_time: nil, view_seeked_count: nil, view_seeked_duration: nil, view_session_id: nil, view_start: nil, view_total_content_playback_time: nil, viewer_id: nil, watch_time: nil)
  @beacon_domain = beacon_domain
  @custom = custom
  @exit_before_video_start = exit_before_video_start
  @insert_timestamp = insert_timestamp
  @ip_address = ip_address
  @os_version = os_version
  @player_autoplay_on = player_autoplay_on
  @player_preload_on = player_preload_on
  @player_remote_played = player_remote_played
  @used_full_screen = used_full_screen
  @video_startup_failed = video_startup_failed
  @view_has_ad = view_has_ad
  @view_has_error = view_has_error
  @view_id = view_id
  @workspace_id = workspace_id
  @events = events
  @asn_id = asn_id
  @asn_name = asn_name
  @average_bitrate = average_bitrate
  @avg_downscaling = avg_downscaling
  @avg_request_latency = avg_request_latency
  @avg_request_throughput = avg_request_throughput
  @avg_upscaling = avg_upscaling
  @browser_engine = browser_engine
  @browser_name = browser_name
  @browser_version = browser_version
  @buffer_count = buffer_count
  @buffer_fill = buffer_fill
  @buffer_frequency = buffer_frequency
  @buffer_ratio = buffer_ratio
  @cdn = cdn
  @city = city
  @connection_type = connection_type
  @continent = continent
  @country = country
  @country_code = country_code
  @device_manufacturer = device_manufacturer
  @device_model = device_model
  @device_name = device_name
  @device_type = device_type
  @drm_type = drm_type
  @dropped_frame_count = dropped_frame_count
  @error_code = error_code
  @error_context = error_context
  @error_id = error_id
  @error_message = error_message
  @experiment_name = experiment_name
  @fp_api_version = fp_api_version
  @fp_embed = fp_embed
  @fp_embed_version = fp_embed_version
  @fp_live_stream_id = fp_live_stream_id
  @fp_playback_id = fp_playback_id
  @fp_sdk = fp_sdk
  @fp_sdk_version = fp_sdk_version
  @fp_viewer_id = fp_viewer_id
  @jump_latency = jump_latency
  @latitude = latitude
  @live_stream_latency = live_stream_latency
  @longitude = longitude
  @max_downscaling = max_downscaling
  @max_request_latency = max_request_latency
  @max_upscaling = max_upscaling
  @media_id = media_id
  @os_name = os_name
  @page_context = page_context
  @page_load_time = page_load_time
  @playback_score = playback_score
  @player_height = player_height
  @player_initialization_time = player_initialization_time
  @player_instance_id = player_instance_id
  @player_language = player_language
  @player_name = player_name
  @player_poster = player_poster
  @player_resolution = player_resolution
  @player_software_name = player_software_name
  @player_software_version = player_software_version
  @player_source_domain = player_source_domain
  @player_source_height = player_source_height
  @player_source_width = player_source_width
  @player_version = player_version
  @player_view_count = player_view_count
  @player_width = player_width
  @property_id = property_id
  @quality_of_experience_score = quality_of_experience_score
  @region = region
  @render_quality_score = render_quality_score
  @session_id = session_id
  @sign = sign
  @stability_score = stability_score
  @startup_score = startup_score
  @sub_property_id = sub_property_id
  @total_startup_time = total_startup_time
  @updated_timestamp = updated_timestamp
  @user_agent = user_agent
  @video_content_type = video_content_type
  @video_duration = video_duration
  @video_encoding_variant = video_encoding_variant
  @video_id = video_id
  @video_language = video_language
  @video_producer = video_producer
  @video_resolution = video_resolution
  @video_series = video_series
  @video_source_domain = video_source_domain
  @video_source_duration = video_source_duration
  @video_source_hostname = video_source_hostname
  @video_source_stream_type = video_source_stream_type
  @video_source_type = video_source_type
  @video_source_url = video_source_url
  @video_startup_time = video_startup_time
  @video_title = video_title
  @video_variant_id = video_variant_id
  @video_variant_name = video_variant_name
  @view_end = view_end
  @view_max_playhead_position = view_max_playhead_position
  @view_page_url = view_page_url
  @view_playing_time = view_playing_time
  @view_seeked_count = view_seeked_count
  @view_seeked_duration = view_seeked_duration
  @view_session_id = view_session_id
  @view_start = view_start
  @view_total_content_playback_time = view_total_content_playback_time
  @viewer_id = viewer_id
  @watch_time = watch_time
end

Instance Method Details

#==(other) ⇒ Object



513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/fastpix_client/models/components/views.rb', line 513

def ==(other)
  return false unless other.is_a? self.class

  [@beacon_domain, @custom, @exit_before_video_start, @insert_timestamp, @ip_address,
   @os_version, @player_autoplay_on, @player_preload_on, @player_remote_played, @used_full_screen,
   @video_startup_failed, @view_has_ad, @view_has_error, @view_id, @workspace_id,
   @events, @asn_id, @asn_name, @average_bitrate, @avg_downscaling,
   @avg_request_latency, @avg_request_throughput, @avg_upscaling, @browser_engine, @browser_name,
   @browser_version, @buffer_count, @buffer_fill, @buffer_frequency, @buffer_ratio,
   @cdn, @city, @connection_type, @continent, @country,
   @country_code, @device_manufacturer, @device_model, @device_name, @device_type,
   @drm_type, @dropped_frame_count, @error_code, @error_context, @error_id,
   @error_message, @experiment_name, @fp_api_version, @fp_embed, @fp_embed_version,
   @fp_live_stream_id, @fp_playback_id, @fp_sdk, @fp_sdk_version, @fp_viewer_id,
   @jump_latency, @latitude, @live_stream_latency, @longitude, @max_downscaling,
   @max_request_latency, @max_upscaling, @media_id, @os_name, @page_context,
   @page_load_time, @playback_score, @player_height, @player_initialization_time, @player_instance_id,
   @player_language, @player_name, @player_poster, @player_resolution, @player_software_name,
   @player_software_version, @player_source_domain, @player_source_height, @player_source_width, @player_version,
   @player_view_count, @player_width, @property_id, @quality_of_experience_score, @region,
   @render_quality_score, @session_id, @sign, @stability_score, @startup_score,
   @sub_property_id, @total_startup_time, @updated_timestamp, @user_agent, @video_content_type,
   @video_duration, @video_encoding_variant, @video_id, @video_language, @video_producer,
   @video_resolution, @video_series, @video_source_domain, @video_source_duration, @video_source_hostname,
   @video_source_stream_type, @video_source_type, @video_source_url, @video_startup_time, @video_title,
   @video_variant_id, @video_variant_name, @view_end, @view_max_playhead_position, @view_page_url,
   @view_playing_time, @view_seeked_count, @view_seeked_duration, @view_session_id, @view_start,
   @view_total_content_playback_time, @viewer_id, @watch_time] ==
    [other.beacon_domain, other.custom, other.exit_before_video_start, other.insert_timestamp, other.ip_address,
     other.os_version, other.player_autoplay_on, other.player_preload_on, other.player_remote_played, other.used_full_screen,
     other.video_startup_failed, other.view_has_ad, other.view_has_error, other.view_id, other.workspace_id,
     other.events, other.asn_id, other.asn_name, other.average_bitrate, other.avg_downscaling,
     other.avg_request_latency, other.avg_request_throughput, other.avg_upscaling, other.browser_engine, other.browser_name,
     other.browser_version, other.buffer_count, other.buffer_fill, other.buffer_frequency, other.buffer_ratio,
     other.cdn, other.city, other.connection_type, other.continent, other.country,
     other.country_code, other.device_manufacturer, other.device_model, other.device_name, other.device_type,
     other.drm_type, other.dropped_frame_count, other.error_code, other.error_context, other.error_id,
     other.error_message, other.experiment_name, other.fp_api_version, other.fp_embed, other.fp_embed_version,
     other.fp_live_stream_id, other.fp_playback_id, other.fp_sdk, other.fp_sdk_version, other.fp_viewer_id,
     other.jump_latency, other.latitude, other.live_stream_latency, other.longitude, other.max_downscaling,
     other.max_request_latency, other.max_upscaling, other.media_id, other.os_name, other.page_context,
     other.page_load_time, other.playback_score, other.player_height, other.player_initialization_time, other.player_instance_id,
     other.player_language, other.player_name, other.player_poster, other.player_resolution, other.player_software_name,
     other.player_software_version, other.player_source_domain, other.player_source_height, other.player_source_width, other.player_version,
     other.player_view_count, other.player_width, other.property_id, other.quality_of_experience_score, other.region,
     other.render_quality_score, other.session_id, other.sign, other.stability_score, other.startup_score,
     other.sub_property_id, other.total_startup_time, other.updated_timestamp, other.user_agent, other.video_content_type,
     other.video_duration, other.video_encoding_variant, other.video_id, other.video_language, other.video_producer,
     other.video_resolution, other.video_series, other.video_source_domain, other.video_source_duration, other.video_source_hostname,
     other.video_source_stream_type, other.video_source_type, other.video_source_url, other.video_startup_time, other.video_title,
     other.video_variant_id, other.video_variant_name, other.view_end, other.view_max_playhead_position, other.view_page_url,
     other.view_playing_time, other.view_seeked_count, other.view_seeked_duration, other.view_session_id, other.view_start,
     other.view_total_content_playback_time, other.viewer_id, other.watch_time]
end

#to_dictObject



568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
# File 'lib/fastpix_client/models/components/views.rb', line 568

def to_dict
  result = {}
  fields.sort_by(&:name).each do |field|
    next if field.name == :events

    format_json_meta = field.[:format_json]
    key = if !format_json_meta.nil? && format_json_meta.include?(:letter_case)
      format_json_meta[:letter_case].call
    else
      field.name.to_s
    end

    f = send(field.name)
    if f.nil?
      result[key] = nil
    elsif f.is_a?(Array)
      result[key] = f.map { |o| marshal_single(o) }
    elsif f.is_a?(Hash)
      result[key] = f.transform_values { |v| marshal_single(v) }
    else
      result[key] = marshal_single(f)
    end
  end
  result['events'] = @events&.map(&:to_dict)
  result
end