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

      # the id of the library item to return the children of.
      field :rating_key, Float, { 'path_param': { 'field_name': 'ratingKey', 'style': 'simple', 'explode': false } }


      sig { params(rating_key: Float).void }
      def initialize(rating_key: nil)
        @rating_key = rating_key
      end
    end


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


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


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


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


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


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


    class GetMetadataChildrenMetadata < ::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 :last_rated_at, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lastRatedAt') } }

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

      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') } }

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

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

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


      sig { params(added_at: T.nilable(Integer), art: T.nilable(String), guid: T.nilable(String), index: T.nilable(Integer), key: T.nilable(String), last_rated_at: T.nilable(Integer), last_viewed_at: T.nilable(Integer), leaf_count: T.nilable(Integer), 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), skip_count: T.nilable(Integer), summary: T.nilable(String), thumb: T.nilable(String), title: T.nilable(String), type: T.nilable(String), updated_at: T.nilable(Integer), user_rating: T.nilable(Integer), view_count: T.nilable(Integer), viewed_leaf_count: T.nilable(Integer)).void }
      def initialize(added_at: nil, art: nil, guid: nil, index: nil, key: nil, last_rated_at: nil, last_viewed_at: nil, leaf_count: 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, skip_count: nil, summary: nil, thumb: nil, title: nil, type: nil, updated_at: nil, user_rating: nil, view_count: nil, viewed_leaf_count: nil)
        @added_at = added_at
        @art = art
        @guid = guid
        @index = index
        @key = key
        @last_rated_at = last_rated_at
        @last_viewed_at = last_viewed_at
        @leaf_count = leaf_count
        @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
        @skip_count = skip_count
        @summary = summary
        @thumb = thumb
        @title = title
        @type = type
        @updated_at = updated_at
        @user_rating = user_rating
        @view_count = view_count
        @viewed_leaf_count = viewed_leaf_count
      end
    end


    class GetMetadataChildrenMediaContainer < ::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 :directory, T.nilable(T::Array[Operations::GetMetadataChildrenDirectory]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('Directory') } }

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

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

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

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

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

      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::GetMetadataChildrenMetadata]), { '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 :parent_index, T.nilable(Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('parentIndex') } }

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

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

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

      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), directory: T.nilable(T::Array[Operations::GetMetadataChildrenDirectory]), identifier: T.nilable(String), key: T.nilable(String), library_section_id: T.nilable(Integer), library_section_title: T.nilable(String), library_section_uuid: T.nilable(String), media_tag_prefix: T.nilable(String), media_tag_version: T.nilable(Integer), metadata: T.nilable(T::Array[Operations::GetMetadataChildrenMetadata]), nocache: T.nilable(T::Boolean), parent_index: T.nilable(Integer), parent_title: T.nilable(String), parent_year: T.nilable(Integer), size: T.nilable(Integer), summary: T.nilable(String), theme: T.nilable(String), 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, directory: nil, identifier: nil, key: nil, library_section_id: nil, library_section_title: nil, library_section_uuid: nil, media_tag_prefix: nil, media_tag_version: nil, metadata: nil, nocache: nil, parent_index: nil, parent_title: nil, parent_year: nil, size: nil, summary: nil, theme: nil, thumb: nil, title1: nil, title2: nil, view_group: nil, view_mode: nil)
        @allow_sync = allow_sync
        @art = art
        @directory = directory
        @identifier = identifier
        @key = key
        @library_section_id = library_section_id
        @library_section_title = library_section_title
        @library_section_uuid = library_section_uuid
        @media_tag_prefix = media_tag_prefix
        @media_tag_version = media_tag_version
        @metadata = metadata
        @nocache = nocache
        @parent_index = parent_index
        @parent_title = parent_title
        @parent_year = parent_year
        @size = size
        @summary = summary
        @theme = theme
        @thumb = thumb
        @title1 = title1
        @title2 = title2
        @view_group = view_group
        @view_mode = view_mode
      end
    end

    # The children of the library item.
    class GetMetadataChildrenResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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


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


    class GetMetadataChildrenResponse < ::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 children of the library item.
      field :two_hundred_application_json_object, T.nilable(Operations::GetMetadataChildrenResponseBody)
      # 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::GetMetadataChildrenLibraryResponseBody)


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