# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

# typed: true
# frozen_string_literal: true

require 'sorbet-runtime'
require 'faraday'

module OpenApiSDK
  module Operations
    # OnlyTransient - Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
    class OnlyTransient < T::Enum
      enums do
        ZERO = new(0)
        ONE = new(1)
      end
    end



    class GetGlobalHubsRequest < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig

      # The number of items to return with each hub.
      field :count, T.nilable(Float), { 'query_param': { 'field_name': 'count', 'style': 'form', 'explode': true } }
      # Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
      field :only_transient, T.nilable(Operations::OnlyTransient), { 'query_param': { 'field_name': 'onlyTransient', 'style': 'form', 'explode': true } }


      sig { params(count: T.nilable(Float), only_transient: T.nilable(Operations::OnlyTransient)).void }
      def initialize(count: nil, only_transient: nil)
        @count = count
        @only_transient = only_transient
      end
    end


    class GetGlobalHubsErrors < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


      field :code, T.nilable(Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } }

      field :message, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('message') } }

      field :status, T.nilable(Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status') } }


      sig { params(code: T.nilable(Float), message: T.nilable(String), status: T.nilable(Float)).void }
      def initialize(code: nil, message: nil, status: nil)
        @code = code
        @message = message
        @status = status
      end
    end

    # Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
    class GetGlobalHubsHubsResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


      field :errors, T.nilable(T::Array[Operations::GetGlobalHubsErrors]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('errors') } }


      sig { params(errors: T.nilable(T::Array[Operations::GetGlobalHubsErrors])).void }
      def initialize(errors: nil)
        @errors = errors
      end
    end


    class GetGlobalHubsMetadata < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


      field :added_at, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('addedAt') } }

      field :composite, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('composite') } }

      field :duration, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration') } }

      field :guid, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guid') } }

      field :icon, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('icon') } }

      field :key, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } }

      field :last_viewed_at, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lastViewedAt') } }

      field :leaf_count, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('leafCount') } }

      field :playlist_type, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('playlistType') } }

      field :rating_key, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ratingKey') } }

      field :smart, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('smart') } }

      field :summary, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('summary') } }

      field :title, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }

      field :title_sort, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('titleSort') } }

      field :type, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } }

      field :updated_at, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } }

      field :view_count, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('viewCount') } }


      sig { params(added_at: T.nilable(Integer), composite: T.nilable(String), duration: T.nilable(Integer), guid: T.nilable(String), icon: T.nilable(String), key: T.nilable(String), last_viewed_at: T.nilable(Integer), leaf_count: T.nilable(Integer), playlist_type: T.nilable(String), rating_key: T.nilable(String), smart: T.nilable(T::Boolean), summary: T.nilable(String), title: T.nilable(String), title_sort: T.nilable(String), type: T.nilable(String), updated_at: T.nilable(Integer), view_count: T.nilable(Integer)).void }
      def initialize(added_at: nil, composite: nil, duration: nil, guid: nil, icon: nil, key: nil, last_viewed_at: nil, leaf_count: nil, playlist_type: nil, rating_key: nil, smart: nil, summary: nil, title: nil, title_sort: nil, type: nil, updated_at: nil, view_count: nil)
        @added_at = added_at
        @composite = composite
        @duration = duration
        @guid = guid
        @icon = icon
        @key = key
        @last_viewed_at = last_viewed_at
        @leaf_count = leaf_count
        @playlist_type = playlist_type
        @rating_key = rating_key
        @smart = smart
        @summary = summary
        @title = title
        @title_sort = title_sort
        @type = type
        @updated_at = updated_at
        @view_count = view_count
      end
    end


    class Hub < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


      field :context, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('context') } }

      field :hub_identifier, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('hubIdentifier') } }

      field :hub_key, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('hubKey') } }

      field :key, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } }

      field :metadata, T.nilable(T::Array[Operations::GetGlobalHubsMetadata]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Metadata') } }

      field :more, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('more') } }

      field :promoted, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('promoted') } }

      field :size, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } }

      field :style, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('style') } }

      field :title, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }

      field :type, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } }


      sig { params(context: T.nilable(String), hub_identifier: T.nilable(String), hub_key: T.nilable(String), key: T.nilable(String), metadata: T.nilable(T::Array[Operations::GetGlobalHubsMetadata]), more: T.nilable(T::Boolean), promoted: T.nilable(T::Boolean), size: T.nilable(Integer), style: T.nilable(String), title: T.nilable(String), type: T.nilable(String)).void }
      def initialize(context: nil, hub_identifier: nil, hub_key: nil, key: nil, metadata: nil, more: nil, promoted: nil, size: nil, style: nil, title: nil, type: nil)
        @context = context
        @hub_identifier = hub_identifier
        @hub_key = hub_key
        @key = key
        @metadata = metadata
        @more = more
        @promoted = promoted
        @size = size
        @style = style
        @title = title
        @type = type
      end
    end


    class GetGlobalHubsMediaContainer < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


      field :allow_sync, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allowSync') } }

      field :hub, T.nilable(T::Array[Operations::Hub]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Hub') } }

      field :identifier, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('identifier') } }

      field :size, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } }


      sig { params(allow_sync: T.nilable(T::Boolean), hub: T.nilable(T::Array[Operations::Hub]), identifier: T.nilable(String), size: T.nilable(Integer)).void }
      def initialize(allow_sync: nil, hub: nil, identifier: nil, size: nil)
        @allow_sync = allow_sync
        @hub = hub
        @identifier = identifier
        @size = size
      end
    end

    # returns global hubs
    class GetGlobalHubsResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


      field :media_container, T.nilable(Operations::GetGlobalHubsMediaContainer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('MediaContainer') } }


      sig { params(media_container: T.nilable(Operations::GetGlobalHubsMediaContainer)).void }
      def initialize(media_container: nil)
        @media_container = media_container
      end
    end


    class GetGlobalHubsResponse < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig

      # HTTP response content type for this operation
      field :content_type, String
      # Raw HTTP response; suitable for custom response parsing
      field :raw_response, Faraday::Response
      # HTTP response status code for this operation
      field :status_code, Integer
      # returns global hubs
      field :two_hundred_application_json_object, T.nilable(Operations::GetGlobalHubsResponseBody)
      # Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
      field :four_hundred_and_one_application_json_object, T.nilable(Operations::GetGlobalHubsHubsResponseBody)


      sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, two_hundred_application_json_object: T.nilable(Operations::GetGlobalHubsResponseBody), four_hundred_and_one_application_json_object: T.nilable(Operations::GetGlobalHubsHubsResponseBody)).void }
      def initialize(content_type: nil, raw_response: nil, status_code: nil, two_hundred_application_json_object: nil, four_hundred_and_one_application_json_object: nil)
        @content_type = content_type
        @raw_response = raw_response
        @status_code = status_code
        @two_hundred_application_json_object = two_hundred_application_json_object
        @four_hundred_and_one_application_json_object = four_hundred_and_one_application_json_object
      end
    end
  end
end
