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


    # Smart - whether the playlist is smart or not
    class Smart < T::Enum
      enums do
        ZERO = new(0)
        ONE = new(1)
      end
    end



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

      # whether the playlist is smart or not
      field :smart, Operations::Smart, { 'query_param': { 'field_name': 'smart', 'style': 'form', 'explode': true } }
      # name of the playlist
      field :title, String, { 'query_param': { 'field_name': 'title', 'style': 'form', 'explode': true } }
      # type of playlist to create
      field :type, Operations::QueryParamType, { 'query_param': { 'field_name': 'type', 'style': 'form', 'explode': true } }
      # the content URI for the playlist
      field :uri, String, { 'query_param': { 'field_name': 'uri', 'style': 'form', 'explode': true } }
      # the play queue to copy to a playlist
      field :play_queue_id, T.nilable(Float), { 'query_param': { 'field_name': 'playQueueID', 'style': 'form', 'explode': true } }


      sig { params(smart: Operations::Smart, title: String, type: Operations::QueryParamType, uri: String, play_queue_id: T.nilable(Float)).void }
      def initialize(smart: nil, title: nil, type: nil, uri: nil, play_queue_id: nil)
        @smart = smart
        @title = title
        @type = type
        @uri = uri
        @play_queue_id = play_queue_id
      end
    end


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


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


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


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


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

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


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


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


    class CreatePlaylistResponse < ::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::CreatePlaylistResponseBody)
      # 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::CreatePlaylistPlaylistsResponseBody)


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