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


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


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


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


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

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

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

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

      field :private_port, T.nilable(Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('privatePort') } }

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

      field :public_port, T.nilable(Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publicPort') } }

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

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

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

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

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


      sig { params(auth_token: T.nilable(String), mapping_error: T.nilable(String), mapping_state: T.nilable(String), private_address: T.nilable(String), private_port: T.nilable(Float), public_address: T.nilable(String), public_port: T.nilable(Float), sign_in_state: T.nilable(String), subscription_active: T.nilable(T::Boolean), subscription_features: T.nilable(String), subscription_state: T.nilable(String), username: T.nilable(String)).void }
      def initialize(auth_token: nil, mapping_error: nil, mapping_state: nil, private_address: nil, private_port: nil, public_address: nil, public_port: nil, sign_in_state: nil, subscription_active: nil, subscription_features: nil, subscription_state: nil, username: nil)
        @auth_token = auth_token
        @mapping_error = mapping_error
        @mapping_state = mapping_state
        @private_address = private_address
        @private_port = private_port
        @public_address = public_address
        @public_port = public_port
        @sign_in_state = sign_in_state
        @subscription_active = subscription_active
        @subscription_features = subscription_features
        @subscription_state = subscription_state
        @username = username
      end
    end

    # MyPlex Account
    class GetMyPlexAccountResponseBody < ::OpenApiSDK::Utils::FieldAugmented
      extend T::Sig


      field :my_plex, T.nilable(Operations::MyPlex), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('MyPlex') } }


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


    class GetMyPlexAccountResponse < ::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
      # MyPlex Account
      field :two_hundred_application_json_object, T.nilable(Operations::GetMyPlexAccountResponseBody)
      # 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::GetMyPlexAccountServerResponseBody)


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