# 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
    # Type - Plex content type to search for
    class Type < T::Enum
      enums do
        ONE = new(1)
        TWO = new(2)
        THREE = new(3)
        FOUR = new(4)
      end
    end



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

      # the Id of the library to query
      field :section_id, Integer, { 'path_param': { 'field_name': 'sectionId', 'style': 'simple', 'explode': false } }
      # Plex content type to search for
      field :type, Operations::Type, { 'query_param': { 'field_name': 'type', 'style': 'form', 'explode': true } }


      sig { params(section_id: Integer, type: Operations::Type).void }
      def initialize(section_id: nil, type: nil)
        @section_id = section_id
        @type = type
      end
    end


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      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), art: T.nilable(String), guid: T.nilable(String), index: T.nilable(Integer), key: T.nilable(String), parent_guid: T.nilable(String), parent_index: T.nilable(Integer), parent_key: T.nilable(String), parent_rating_key: T.nilable(String), parent_studio: T.nilable(String), parent_theme: T.nilable(String), parent_thumb: T.nilable(String), parent_title: T.nilable(String), parent_year: T.nilable(Integer), rating_key: T.nilable(String), summary: T.nilable(String), thumb: T.nilable(String), title: T.nilable(String), type: T.nilable(String), updated_at: T.nilable(Integer)).void }
      def initialize(added_at: nil, art: nil, guid: nil, index: nil, key: nil, parent_guid: nil, parent_index: nil, parent_key: nil, parent_rating_key: nil, parent_studio: nil, parent_theme: nil, parent_thumb: nil, parent_title: nil, parent_year: nil, rating_key: nil, summary: nil, thumb: nil, title: nil, type: nil, updated_at: nil)
        @added_at = added_at
        @art = art
        @guid = guid
        @index = index
        @key = key
        @parent_guid = parent_guid
        @parent_index = parent_index
        @parent_key = parent_key
        @parent_rating_key = parent_rating_key
        @parent_studio = parent_studio
        @parent_theme = parent_theme
        @parent_thumb = parent_thumb
        @parent_title = parent_title
        @parent_year = parent_year
        @rating_key = rating_key
        @summary = summary
        @thumb = thumb
        @title = title
        @type = type
        @updated_at = updated_at
      end
    end


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

      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 :metadata, T.nilable(T::Array[Operations::SearchLibraryMetadata]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Metadata') } }

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

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

      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), identifier: T.nilable(String), media_tag_prefix: T.nilable(String), media_tag_version: T.nilable(Integer), metadata: T.nilable(T::Array[Operations::SearchLibraryMetadata]), nocache: T.nilable(T::Boolean), size: T.nilable(Integer), thumb: T.nilable(String), title1: T.nilable(String), title2: T.nilable(String), view_group: T.nilable(String), view_mode: T.nilable(Integer)).void }
      def initialize(allow_sync: nil, art: nil, identifier: nil, media_tag_prefix: nil, media_tag_version: nil, metadata: nil, nocache: nil, size: nil, thumb: nil, title1: nil, title2: nil, view_group: nil, view_mode: nil)
        @allow_sync = allow_sync
        @art = art
        @identifier = identifier
        @media_tag_prefix = media_tag_prefix
        @media_tag_version = media_tag_version
        @metadata = metadata
        @nocache = nocache
        @size = size
        @thumb = thumb
        @title1 = title1
        @title2 = title2
        @view_group = view_group
        @view_mode = view_mode
      end
    end

    # The contents of the library by section and type
    class SearchLibraryResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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


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


    class SearchLibraryResponse < ::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 contents of the library by section and type
      field :object, T.nilable(Operations::SearchLibraryResponseBody)


      sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, object: T.nilable(Operations::SearchLibraryResponseBody)).void }
      def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil)
        @content_type = content_type
        @raw_response = raw_response
        @status_code = status_code
        @object = object
      end
    end
  end
end
