# 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
    # PlaylistType - limit to a type of playlist.
    class PlaylistType < T::Enum
      enums do
        AUDIO = new('audio')
        VIDEO = new('video')
        PHOTO = new('photo')
      end
    end


    # QueryParamSmart - type of playlists to return (default is all).
    class QueryParamSmart < T::Enum
      enums do
        ZERO = new(0)
        ONE = new(1)
      end
    end



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

      # limit to a type of playlist.
      field :playlist_type, T.nilable(Operations::PlaylistType), { 'query_param': { 'field_name': 'playlistType', 'style': 'form', 'explode': true } }
      # type of playlists to return (default is all).
      field :smart, T.nilable(Operations::QueryParamSmart), { 'query_param': { 'field_name': 'smart', 'style': 'form', 'explode': true } }


      sig { params(playlist_type: T.nilable(Operations::PlaylistType), smart: T.nilable(Operations::QueryParamSmart)).void }
      def initialize(playlist_type: nil, smart: nil)
        @playlist_type = playlist_type
        @smart = smart
      end
    end


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


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


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


    class GetPlaylistsMetadata < ::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 :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), 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, 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
        @type = type
        @updated_at = updated_at
        @view_count = view_count
      end
    end


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


      field :metadata, T.nilable(T::Array[Operations::GetPlaylistsMetadata]), { '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::GetPlaylistsMetadata]), size: T.nilable(Integer)).void }
      def initialize(metadata: nil, size: nil)
        @metadata = metadata
        @size = size
      end
    end

    # returns all playlists
    class GetPlaylistsResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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


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


    class GetPlaylistsResponse < ::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 all playlists
      field :two_hundred_application_json_object, T.nilable(Operations::GetPlaylistsResponseBody)
      # 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::GetPlaylistsPlaylistsResponseBody)


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