# 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 AddPlaylistContentsRequest < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig

      # the ID of the playlist
      field :playlist_id, Float, { 'path_param': { 'field_name': 'playlistID', 'style': 'simple', 'explode': false } }
      # the content URI for the playlist
      field :uri, String, { 'query_param': { 'field_name': 'uri', 'style': 'form', 'explode': true } }
      # the play queue to add to a playlist
      field :play_queue_id, T.nilable(Float), { 'query_param': { 'field_name': 'playQueueID', 'style': 'form', 'explode': true } }


      sig { params(playlist_id: Float, uri: String, play_queue_id: T.nilable(Float)).void }
      def initialize(playlist_id: nil, uri: nil, play_queue_id: nil)
        @playlist_id = playlist_id
        @uri = uri
        @play_queue_id = play_queue_id
      end
    end


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


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


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


    class AddPlaylistContentsMetadata < ::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 :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), duration: T.nilable(Integer), guid: 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, duration: nil, guid: 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
        @duration = duration
        @guid = guid
        @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 AddPlaylistContentsMediaContainer < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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

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

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

    # Playlist Updated
    class AddPlaylistContentsResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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


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


    class AddPlaylistContentsResponse < ::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
      # Playlist Updated
      field :two_hundred_application_json_object, T.nilable(Operations::AddPlaylistContentsResponseBody)
      # 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::AddPlaylistContentsPlaylistsResponseBody)


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