# 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

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

      # the ID of the playlist
      field :playlist_id, Float, { 'path_param': { 'field_name': 'playlistID', 'style': 'simple', 'explode': false } }


      sig { params(playlist_id: Float).void }
      def initialize(playlist_id: nil)
        @playlist_id = playlist_id
      end
    end


    class GetPlaylistErrors < ::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 GetPlaylistPlaylistsResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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


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


    class GetPlaylistMetadata < ::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 :content, T.nilable(String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('content') } }

      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 :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 :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') } }


      sig { params(added_at: T.nilable(Integer), composite: T.nilable(String), content: T.nilable(String), duration: T.nilable(Integer), guid: T.nilable(String), icon: T.nilable(String), key: T.nilable(String), 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), type: T.nilable(String), updated_at: T.nilable(Integer)).void }
      def initialize(added_at: nil, composite: nil, content: nil, duration: nil, guid: nil, icon: nil, key: nil, leaf_count: nil, playlist_type: nil, rating_key: nil, smart: nil, summary: nil, title: nil, type: nil, updated_at: nil)
        @added_at = added_at
        @composite = composite
        @content = content
        @duration = duration
        @guid = guid
        @icon = icon
        @key = key
        @leaf_count = leaf_count
        @playlist_type = playlist_type
        @rating_key = rating_key
        @smart = smart
        @summary = summary
        @title = title
        @type = type
        @updated_at = updated_at
      end
    end


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


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

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


      sig { params(metadata: T.nilable(T::Array[Operations::GetPlaylistMetadata]), size: T.nilable(Integer)).void }
      def initialize(metadata: nil, size: nil)
        @metadata = metadata
        @size = size
      end
    end

    # The playlist
    class GetPlaylistResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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


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


    class GetPlaylistResponse < ::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
      # The playlist
      field :two_hundred_application_json_object, T.nilable(Operations::GetPlaylistResponseBody)
      # 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::GetPlaylistPlaylistsResponseBody)


      sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, two_hundred_application_json_object: T.nilable(Operations::GetPlaylistResponseBody), four_hundred_and_one_application_json_object: T.nilable(Operations::GetPlaylistPlaylistsResponseBody)).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
