# 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
    # Level - An integer log level to write to the PMS log with.  
    # 0: Error  
    # 1: Warning  
    # 2: Info  
    # 3: Debug  
    # 4: Verbose
    # 
    class Level < T::Enum
      enums do
        ZERO = new(0)
        ONE = new(1)
        TWO = new(2)
        THREE = new(3)
        FOUR = new(4)
      end
    end



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

      # An integer log level to write to the PMS log with.  
      # 0: Error  
      # 1: Warning  
      # 2: Info  
      # 3: Debug  
      # 4: Verbose
      # 
      field :level, Operations::Level, { 'query_param': { 'field_name': 'level', 'style': 'form', 'explode': true } }
      # The text of the message to write to the log.
      field :message, String, { 'query_param': { 'field_name': 'message', 'style': 'form', 'explode': true } }
      # a string indicating the source of the message.
      field :source, String, { 'query_param': { 'field_name': 'source', 'style': 'form', 'explode': true } }


      sig { params(level: Operations::Level, message: String, source: String).void }
      def initialize(level: nil, message: nil, source: nil)
        @level = level
        @message = message
        @source = source
      end
    end


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


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


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


    class LogLineResponse < ::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
      # Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
      field :object, T.nilable(Operations::LogLineResponseBody)


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