# frozen_string_literal: true

module OpenAI
  module Models
    class Image < OpenAI::Internal::Type::BaseModel
      # @!attribute b64_json
      #   The base64-encoded JSON of the generated image. Default value for `gpt-image-1`,
      #   and only present if `response_format` is set to `b64_json` for `dall-e-2` and
      #   `dall-e-3`.
      #
      #   @return [String, nil]
      optional :b64_json, String

      # @!attribute revised_prompt
      #   For `dall-e-3` only, the revised prompt that was used to generate the image.
      #
      #   @return [String, nil]
      optional :revised_prompt, String

      # @!attribute url
      #   When using `dall-e-2` or `dall-e-3`, the URL of the generated image if
      #   `response_format` is set to `url` (default value). Unsupported for
      #   `gpt-image-1`.
      #
      #   @return [String, nil]
      optional :url, String

      # @!method initialize(b64_json: nil, revised_prompt: nil, url: nil)
      #   Some parameter documentations has been truncated, see {OpenAI::Models::Image}
      #   for more details.
      #
      #   Represents the content or the URL of an image generated by the OpenAI API.
      #
      #   @param b64_json [String] The base64-encoded JSON of the generated image. Default value for `gpt-image-1`,
      #
      #   @param revised_prompt [String] For `dall-e-3` only, the revised prompt that was used to generate the image.
      #
      #   @param url [String] When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response
    end
  end
end
