# 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
    # MinSize - images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.
    class MinSize < T::Enum
      enums do
        ZERO = new(0)
        ONE = new(1)
      end
    end


    # Upscale - allow images to be resized beyond native dimensions.
    class Upscale < T::Enum
      enums do
        ZERO = new(0)
        ONE = new(1)
      end
    end



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

      # The width for the resized photo
      field :blur, Float, { 'query_param': { 'field_name': 'blur', 'style': 'form', 'explode': true } }
      # The height for the resized photo
      field :height, Float, { 'query_param': { 'field_name': 'height', 'style': 'form', 'explode': true } }
      # images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.
      field :min_size, Operations::MinSize, { 'query_param': { 'field_name': 'minSize', 'style': 'form', 'explode': true } }
      # The opacity for the resized photo
      field :opacity, Integer, { 'query_param': { 'field_name': 'opacity', 'style': 'form', 'explode': true } }
      # allow images to be resized beyond native dimensions.
      field :upscale, Operations::Upscale, { 'query_param': { 'field_name': 'upscale', 'style': 'form', 'explode': true } }
      # path to image within Plex
      field :url, String, { 'query_param': { 'field_name': 'url', 'style': 'form', 'explode': true } }
      # The width for the resized photo
      field :width, Float, { 'query_param': { 'field_name': 'width', 'style': 'form', 'explode': true } }


      sig { params(blur: Float, height: Float, min_size: Operations::MinSize, opacity: Integer, upscale: Operations::Upscale, url: String, width: Float).void }
      def initialize(blur: nil, height: nil, min_size: nil, opacity: nil, upscale: nil, url: nil, width: nil)
        @blur = blur
        @height = height
        @min_size = min_size
        @opacity = opacity
        @upscale = upscale
        @url = url
        @width = width
      end
    end


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


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


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


    class GetResizedPhotoResponse < ::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::GetResizedPhotoResponseBody)


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