Geminix.V1beta.GeneratedFile (geminix v0.2.0)

A file generated on behalf of a user.

Fields:

  • :error (Geminix.V1beta.Status.t/0) - Error details if the GeneratedFile ends up in the STATE_FAILED state.
  • :mime_type (binary/0) - MIME type of the generatedFile.
  • :name (binary/0) - Identifier. The name of the generated file. Example: generatedFiles/abc-123
  • :state (binary/0) - Output only. The state of the GeneratedFile.

Summary

Types

t()

@type t() :: %Geminix.V1beta.GeneratedFile{
  __meta__: term(),
  error: Geminix.V1beta.Status.t(),
  mime_type: binary(),
  name: binary(),
  state: binary()
}

Functions

from_map(schema \\ %__MODULE__{}, map)

@spec from_map(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Create a Geminix.V1beta.GeneratedFile.t/0 from a map returned by the Gemini API.

Sometimes, this function should not be applied to the full response body, but instead it should be applied to the correct part of the map in the response body. This depends on the concrete API call.