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


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


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


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


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

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

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

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

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

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


      sig { params(added: T.nilable(String), download_url: T.nilable(String), fixed: T.nilable(String), key: T.nilable(String), state: T.nilable(String), version: T.nilable(String)).void }
      def initialize(added: nil, download_url: nil, fixed: nil, key: nil, state: nil, version: nil)
        @added = added
        @download_url = download_url
        @fixed = fixed
        @key = key
        @state = state
        @version = version
      end
    end


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


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

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

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

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

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

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


      sig { params(can_install: T.nilable(T::Boolean), checked_at: T.nilable(Integer), download_url: T.nilable(String), release: T.nilable(T::Array[Operations::Release]), size: T.nilable(Integer), status: T.nilable(Integer)).void }
      def initialize(can_install: nil, checked_at: nil, download_url: nil, release: nil, size: nil, status: nil)
        @can_install = can_install
        @checked_at = checked_at
        @download_url = download_url
        @release = release
        @size = size
        @status = status
      end
    end

    # The Server Updates
    class GetUpdateStatusResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


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


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


    class GetUpdateStatusResponse < ::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 Server Updates
      field :two_hundred_application_json_object, T.nilable(Operations::GetUpdateStatusResponseBody)
      # 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::GetUpdateStatusUpdaterResponseBody)


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