# 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
    # IncludeDetails - Whether or not to include details for a section (types, filters, and sorts). 
    # Only exists for backwards compatibility, media providers other than the server libraries have it on always.
    # 
    class IncludeDetails < T::Enum
      enums do
        ZERO = new(0)
        ONE = new(1)
      end
    end



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

      # the Id of the library to query
      field :section_id, Float, { 'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': false } }
      # Whether or not to include details for a section (types, filters, and sorts). 
      # Only exists for backwards compatibility, media providers other than the server libraries have it on always.
      # 
      field :include_details, T.nilable(Operations::IncludeDetails), { 'query_param': { 'field_name': 'includeDetails', 'style': 'form', 'explode': true } }


      sig { params(section_id: Float, include_details: T.nilable(Operations::IncludeDetails)).void }
      def initialize(section_id: nil, include_details: nil)
        @section_id = section_id
        @include_details = include_details
      end
    end


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


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


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


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


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

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

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

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

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


      sig { params(key: T.nilable(String), prompt: T.nilable(String), search: T.nilable(T::Boolean), secondary: T.nilable(T::Boolean), title: T.nilable(String)).void }
      def initialize(key: nil, prompt: nil, search: nil, secondary: nil, title: nil)
        @key = key
        @prompt = prompt
        @search = search
        @secondary = secondary
        @title = title
      end
    end


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


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

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

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

      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(filter: T.nilable(String), filter_type: T.nilable(String), key: T.nilable(String), title: T.nilable(String), type: T.nilable(String)).void }
      def initialize(filter: nil, filter_type: nil, key: nil, title: nil, type: nil)
        @filter = filter
        @filter_type = filter_type
        @key = key
        @title = title
        @type = type
      end
    end


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


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

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

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

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

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

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


      sig { params(default: T.nilable(String), default_direction: T.nilable(String), desc_key: T.nilable(String), first_character_key: T.nilable(String), key: T.nilable(String), title: T.nilable(String)).void }
      def initialize(default: nil, default_direction: nil, desc_key: nil, first_character_key: nil, key: nil, title: nil)
        @default = default
        @default_direction = default_direction
        @desc_key = desc_key
        @first_character_key = first_character_key
        @key = key
        @title = title
      end
    end


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


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

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

      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(key: T.nilable(String), sub_type: T.nilable(String), title: T.nilable(String), type: T.nilable(String)).void }
      def initialize(key: nil, sub_type: nil, title: nil, type: nil)
        @key = key
        @sub_type = sub_type
        @title = title
        @type = type
      end
    end


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


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

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

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

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

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

      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(active: T.nilable(T::Boolean), field: T.nilable(T::Array[Operations::Field]), filter: T.nilable(T::Array[Operations::Filter]), key: T.nilable(String), sort: T.nilable(T::Array[Operations::Sort]), title: T.nilable(String), type: T.nilable(String)).void }
      def initialize(active: nil, field: nil, filter: nil, key: nil, sort: nil, title: nil, type: nil)
        @active = active
        @field = field
        @filter = filter
        @key = key
        @sort = sort
        @title = title
        @type = type
      end
    end


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


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

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


      sig { params(key: T.nilable(String), title: T.nilable(String)).void }
      def initialize(key: nil, title: nil)
        @key = key
        @title = title
      end
    end


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


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

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


      sig { params(operator: T.nilable(T::Array[Operations::Operator]), type: T.nilable(String)).void }
      def initialize(operator: nil, type: nil)
        @operator = operator
        @type = type
      end
    end


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


      sig { params(allow_sync: T.nilable(T::Boolean), art: T.nilable(String), content: T.nilable(String), directory: T.nilable(T::Array[Operations::GetLibraryDirectory]), field_type: T.nilable(T::Array[Operations::FieldType]), identifier: T.nilable(String), library_section_id: T.nilable(Integer), media_tag_prefix: T.nilable(String), media_tag_version: T.nilable(Integer), size: T.nilable(Integer), thumb: T.nilable(String), title1: T.nilable(String), type: T.nilable(T::Array[Operations::GetLibraryType]), view_group: T.nilable(String), view_mode: T.nilable(Integer)).void }
      def initialize(allow_sync: nil, art: nil, content: nil, directory: nil, field_type: nil, identifier: nil, library_section_id: nil, media_tag_prefix: nil, media_tag_version: nil, size: nil, thumb: nil, title1: nil, type: nil, view_group: nil, view_mode: nil)
        @allow_sync = allow_sync
        @art = art
        @content = content
        @directory = directory
        @field_type = field_type
        @identifier = identifier
        @library_section_id = library_section_id
        @media_tag_prefix = media_tag_prefix
        @media_tag_version = media_tag_version
        @size = size
        @thumb = thumb
        @title1 = title1
        @type = type
        @view_group = view_group
        @view_mode = view_mode
      end
    end

    # The details of the library
    class GetLibraryResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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


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


    class GetLibraryResponse < ::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 details of the library
      field :two_hundred_application_json_object, T.nilable(Operations::GetLibraryResponseBody)
      # 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::GetLibraryLibraryResponseBody)


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