// Code generated by ent, DO NOT EDIT.

package ent

import (
	"fmt"
	"strings"
	"time"

	"entgo.io/ent"
	"entgo.io/ent/dialect/sql"
	"github.com/Wei-Shaw/sub2api/ent/batchimagejob"
)

// BatchImageJob is the model entity for the BatchImageJob schema.
type BatchImageJob struct {
	config `json:"-"`
	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// BatchID holds the value of the "batch_id" field.
	BatchID string `json:"batch_id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID int64 `json:"user_id,omitempty"`
	// APIKeyID holds the value of the "api_key_id" field.
	APIKeyID *int64 `json:"api_key_id,omitempty"`
	// AccountID holds the value of the "account_id" field.
	AccountID *int64 `json:"account_id,omitempty"`
	// Provider holds the value of the "provider" field.
	Provider string `json:"provider,omitempty"`
	// Model holds the value of the "model" field.
	Model string `json:"model,omitempty"`
	// TaskName holds the value of the "task_name" field.
	TaskName string `json:"task_name,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// ProviderJobName holds the value of the "provider_job_name" field.
	ProviderJobName *string `json:"provider_job_name,omitempty"`
	// ProviderInputRef holds the value of the "provider_input_ref" field.
	ProviderInputRef *string `json:"provider_input_ref,omitempty"`
	// ProviderOutputRef holds the value of the "provider_output_ref" field.
	ProviderOutputRef *string `json:"provider_output_ref,omitempty"`
	// GcsInputURI holds the value of the "gcs_input_uri" field.
	GcsInputURI *string `json:"gcs_input_uri,omitempty"`
	// GcsOutputURI holds the value of the "gcs_output_uri" field.
	GcsOutputURI *string `json:"gcs_output_uri,omitempty"`
	// ItemCount holds the value of the "item_count" field.
	ItemCount int `json:"item_count,omitempty"`
	// SuccessCount holds the value of the "success_count" field.
	SuccessCount int `json:"success_count,omitempty"`
	// FailCount holds the value of the "fail_count" field.
	FailCount int `json:"fail_count,omitempty"`
	// CancelledCount holds the value of the "cancelled_count" field.
	CancelledCount int `json:"cancelled_count,omitempty"`
	// EstimatedCost holds the value of the "estimated_cost" field.
	EstimatedCost float64 `json:"estimated_cost,omitempty"`
	// HoldAmount holds the value of the "hold_amount" field.
	HoldAmount *float64 `json:"hold_amount,omitempty"`
	// ActualCost holds the value of the "actual_cost" field.
	ActualCost *float64 `json:"actual_cost,omitempty"`
	// Currency holds the value of the "currency" field.
	Currency string `json:"currency,omitempty"`
	// HoldID holds the value of the "hold_id" field.
	HoldID *string `json:"hold_id,omitempty"`
	// IdempotencyKey holds the value of the "idempotency_key" field.
	IdempotencyKey *string `json:"idempotency_key,omitempty"`
	// RequestHash holds the value of the "request_hash" field.
	RequestHash *string `json:"request_hash,omitempty"`
	// ManifestHash holds the value of the "manifest_hash" field.
	ManifestHash *string `json:"manifest_hash,omitempty"`
	// RetryCount holds the value of the "retry_count" field.
	RetryCount int `json:"retry_count,omitempty"`
	// Version holds the value of the "version" field.
	Version int `json:"version,omitempty"`
	// OutputExpiresAt holds the value of the "output_expires_at" field.
	OutputExpiresAt *time.Time `json:"output_expires_at,omitempty"`
	// InputDeletedAt holds the value of the "input_deleted_at" field.
	InputDeletedAt *time.Time `json:"input_deleted_at,omitempty"`
	// OutputDeletedAt holds the value of the "output_deleted_at" field.
	OutputDeletedAt *time.Time `json:"output_deleted_at,omitempty"`
	// DownloadedAt holds the value of the "downloaded_at" field.
	DownloadedAt *time.Time `json:"downloaded_at,omitempty"`
	// UserDeletedAt holds the value of the "user_deleted_at" field.
	UserDeletedAt *time.Time `json:"user_deleted_at,omitempty"`
	// LastErrorCode holds the value of the "last_error_code" field.
	LastErrorCode *string `json:"last_error_code,omitempty"`
	// LastErrorMessage holds the value of the "last_error_message" field.
	LastErrorMessage *string `json:"last_error_message,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// SubmittedAt holds the value of the "submitted_at" field.
	SubmittedAt *time.Time `json:"submitted_at,omitempty"`
	// StartedAt holds the value of the "started_at" field.
	StartedAt *time.Time `json:"started_at,omitempty"`
	// FinishedAt holds the value of the "finished_at" field.
	FinishedAt *time.Time `json:"finished_at,omitempty"`
	// SettledAt holds the value of the "settled_at" field.
	SettledAt    *time.Time `json:"settled_at,omitempty"`
	selectValues sql.SelectValues
}

// scanValues returns the types for scanning values from sql.Rows.
func (*BatchImageJob) scanValues(columns []string) ([]any, error) {
	values := make([]any, len(columns))
	for i := range columns {
		switch columns[i] {
		case batchimagejob.FieldEstimatedCost, batchimagejob.FieldHoldAmount, batchimagejob.FieldActualCost:
			values[i] = new(sql.NullFloat64)
		case batchimagejob.FieldID, batchimagejob.FieldUserID, batchimagejob.FieldAPIKeyID, batchimagejob.FieldAccountID, batchimagejob.FieldItemCount, batchimagejob.FieldSuccessCount, batchimagejob.FieldFailCount, batchimagejob.FieldCancelledCount, batchimagejob.FieldRetryCount, batchimagejob.FieldVersion:
			values[i] = new(sql.NullInt64)
		case batchimagejob.FieldBatchID, batchimagejob.FieldProvider, batchimagejob.FieldModel, batchimagejob.FieldTaskName, batchimagejob.FieldStatus, batchimagejob.FieldProviderJobName, batchimagejob.FieldProviderInputRef, batchimagejob.FieldProviderOutputRef, batchimagejob.FieldGcsInputURI, batchimagejob.FieldGcsOutputURI, batchimagejob.FieldCurrency, batchimagejob.FieldHoldID, batchimagejob.FieldIdempotencyKey, batchimagejob.FieldRequestHash, batchimagejob.FieldManifestHash, batchimagejob.FieldLastErrorCode, batchimagejob.FieldLastErrorMessage:
			values[i] = new(sql.NullString)
		case batchimagejob.FieldOutputExpiresAt, batchimagejob.FieldInputDeletedAt, batchimagejob.FieldOutputDeletedAt, batchimagejob.FieldDownloadedAt, batchimagejob.FieldUserDeletedAt, batchimagejob.FieldCreatedAt, batchimagejob.FieldUpdatedAt, batchimagejob.FieldSubmittedAt, batchimagejob.FieldStartedAt, batchimagejob.FieldFinishedAt, batchimagejob.FieldSettledAt:
			values[i] = new(sql.NullTime)
		default:
			values[i] = new(sql.UnknownType)
		}
	}
	return values, nil
}

// assignValues assigns the values that were returned from sql.Rows (after scanning)
// to the BatchImageJob fields.
func (_m *BatchImageJob) assignValues(columns []string, values []any) error {
	if m, n := len(values), len(columns); m < n {
		return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
	}
	for i := range columns {
		switch columns[i] {
		case batchimagejob.FieldID:
			value, ok := values[i].(*sql.NullInt64)
			if !ok {
				return fmt.Errorf("unexpected type %T for field id", value)
			}
			_m.ID = int64(value.Int64)
		case batchimagejob.FieldBatchID:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field batch_id", values[i])
			} else if value.Valid {
				_m.BatchID = value.String
			}
		case batchimagejob.FieldUserID:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field user_id", values[i])
			} else if value.Valid {
				_m.UserID = value.Int64
			}
		case batchimagejob.FieldAPIKeyID:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field api_key_id", values[i])
			} else if value.Valid {
				_m.APIKeyID = new(int64)
				*_m.APIKeyID = value.Int64
			}
		case batchimagejob.FieldAccountID:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field account_id", values[i])
			} else if value.Valid {
				_m.AccountID = new(int64)
				*_m.AccountID = value.Int64
			}
		case batchimagejob.FieldProvider:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field provider", values[i])
			} else if value.Valid {
				_m.Provider = value.String
			}
		case batchimagejob.FieldModel:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field model", values[i])
			} else if value.Valid {
				_m.Model = value.String
			}
		case batchimagejob.FieldTaskName:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field task_name", values[i])
			} else if value.Valid {
				_m.TaskName = value.String
			}
		case batchimagejob.FieldStatus:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field status", values[i])
			} else if value.Valid {
				_m.Status = value.String
			}
		case batchimagejob.FieldProviderJobName:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field provider_job_name", values[i])
			} else if value.Valid {
				_m.ProviderJobName = new(string)
				*_m.ProviderJobName = value.String
			}
		case batchimagejob.FieldProviderInputRef:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field provider_input_ref", values[i])
			} else if value.Valid {
				_m.ProviderInputRef = new(string)
				*_m.ProviderInputRef = value.String
			}
		case batchimagejob.FieldProviderOutputRef:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field provider_output_ref", values[i])
			} else if value.Valid {
				_m.ProviderOutputRef = new(string)
				*_m.ProviderOutputRef = value.String
			}
		case batchimagejob.FieldGcsInputURI:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field gcs_input_uri", values[i])
			} else if value.Valid {
				_m.GcsInputURI = new(string)
				*_m.GcsInputURI = value.String
			}
		case batchimagejob.FieldGcsOutputURI:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field gcs_output_uri", values[i])
			} else if value.Valid {
				_m.GcsOutputURI = new(string)
				*_m.GcsOutputURI = value.String
			}
		case batchimagejob.FieldItemCount:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field item_count", values[i])
			} else if value.Valid {
				_m.ItemCount = int(value.Int64)
			}
		case batchimagejob.FieldSuccessCount:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field success_count", values[i])
			} else if value.Valid {
				_m.SuccessCount = int(value.Int64)
			}
		case batchimagejob.FieldFailCount:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field fail_count", values[i])
			} else if value.Valid {
				_m.FailCount = int(value.Int64)
			}
		case batchimagejob.FieldCancelledCount:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field cancelled_count", values[i])
			} else if value.Valid {
				_m.CancelledCount = int(value.Int64)
			}
		case batchimagejob.FieldEstimatedCost:
			if value, ok := values[i].(*sql.NullFloat64); !ok {
				return fmt.Errorf("unexpected type %T for field estimated_cost", values[i])
			} else if value.Valid {
				_m.EstimatedCost = value.Float64
			}
		case batchimagejob.FieldHoldAmount:
			if value, ok := values[i].(*sql.NullFloat64); !ok {
				return fmt.Errorf("unexpected type %T for field hold_amount", values[i])
			} else if value.Valid {
				_m.HoldAmount = new(float64)
				*_m.HoldAmount = value.Float64
			}
		case batchimagejob.FieldActualCost:
			if value, ok := values[i].(*sql.NullFloat64); !ok {
				return fmt.Errorf("unexpected type %T for field actual_cost", values[i])
			} else if value.Valid {
				_m.ActualCost = new(float64)
				*_m.ActualCost = value.Float64
			}
		case batchimagejob.FieldCurrency:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field currency", values[i])
			} else if value.Valid {
				_m.Currency = value.String
			}
		case batchimagejob.FieldHoldID:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field hold_id", values[i])
			} else if value.Valid {
				_m.HoldID = new(string)
				*_m.HoldID = value.String
			}
		case batchimagejob.FieldIdempotencyKey:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field idempotency_key", values[i])
			} else if value.Valid {
				_m.IdempotencyKey = new(string)
				*_m.IdempotencyKey = value.String
			}
		case batchimagejob.FieldRequestHash:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field request_hash", values[i])
			} else if value.Valid {
				_m.RequestHash = new(string)
				*_m.RequestHash = value.String
			}
		case batchimagejob.FieldManifestHash:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field manifest_hash", values[i])
			} else if value.Valid {
				_m.ManifestHash = new(string)
				*_m.ManifestHash = value.String
			}
		case batchimagejob.FieldRetryCount:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field retry_count", values[i])
			} else if value.Valid {
				_m.RetryCount = int(value.Int64)
			}
		case batchimagejob.FieldVersion:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for field version", values[i])
			} else if value.Valid {
				_m.Version = int(value.Int64)
			}
		case batchimagejob.FieldOutputExpiresAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field output_expires_at", values[i])
			} else if value.Valid {
				_m.OutputExpiresAt = new(time.Time)
				*_m.OutputExpiresAt = value.Time
			}
		case batchimagejob.FieldInputDeletedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field input_deleted_at", values[i])
			} else if value.Valid {
				_m.InputDeletedAt = new(time.Time)
				*_m.InputDeletedAt = value.Time
			}
		case batchimagejob.FieldOutputDeletedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field output_deleted_at", values[i])
			} else if value.Valid {
				_m.OutputDeletedAt = new(time.Time)
				*_m.OutputDeletedAt = value.Time
			}
		case batchimagejob.FieldDownloadedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field downloaded_at", values[i])
			} else if value.Valid {
				_m.DownloadedAt = new(time.Time)
				*_m.DownloadedAt = value.Time
			}
		case batchimagejob.FieldUserDeletedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field user_deleted_at", values[i])
			} else if value.Valid {
				_m.UserDeletedAt = new(time.Time)
				*_m.UserDeletedAt = value.Time
			}
		case batchimagejob.FieldLastErrorCode:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field last_error_code", values[i])
			} else if value.Valid {
				_m.LastErrorCode = new(string)
				*_m.LastErrorCode = value.String
			}
		case batchimagejob.FieldLastErrorMessage:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field last_error_message", values[i])
			} else if value.Valid {
				_m.LastErrorMessage = new(string)
				*_m.LastErrorMessage = value.String
			}
		case batchimagejob.FieldCreatedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field created_at", values[i])
			} else if value.Valid {
				_m.CreatedAt = value.Time
			}
		case batchimagejob.FieldUpdatedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field updated_at", values[i])
			} else if value.Valid {
				_m.UpdatedAt = value.Time
			}
		case batchimagejob.FieldSubmittedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field submitted_at", values[i])
			} else if value.Valid {
				_m.SubmittedAt = new(time.Time)
				*_m.SubmittedAt = value.Time
			}
		case batchimagejob.FieldStartedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field started_at", values[i])
			} else if value.Valid {
				_m.StartedAt = new(time.Time)
				*_m.StartedAt = value.Time
			}
		case batchimagejob.FieldFinishedAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field finished_at", values[i])
			} else if value.Valid {
				_m.FinishedAt = new(time.Time)
				*_m.FinishedAt = value.Time
			}
		case batchimagejob.FieldSettledAt:
			if value, ok := values[i].(*sql.NullTime); !ok {
				return fmt.Errorf("unexpected type %T for field settled_at", values[i])
			} else if value.Valid {
				_m.SettledAt = new(time.Time)
				*_m.SettledAt = value.Time
			}
		default:
			_m.selectValues.Set(columns[i], values[i])
		}
	}
	return nil
}

// Value returns the ent.Value that was dynamically selected and assigned to the BatchImageJob.
// This includes values selected through modifiers, order, etc.
func (_m *BatchImageJob) Value(name string) (ent.Value, error) {
	return _m.selectValues.Get(name)
}

// Update returns a builder for updating this BatchImageJob.
// Note that you need to call BatchImageJob.Unwrap() before calling this method if this BatchImageJob
// was returned from a transaction, and the transaction was committed or rolled back.
func (_m *BatchImageJob) Update() *BatchImageJobUpdateOne {
	return NewBatchImageJobClient(_m.config).UpdateOne(_m)
}

// Unwrap unwraps the BatchImageJob entity that was returned from a transaction after it was closed,
// so that all future queries will be executed through the driver which created the transaction.
func (_m *BatchImageJob) Unwrap() *BatchImageJob {
	_tx, ok := _m.config.driver.(*txDriver)
	if !ok {
		panic("ent: BatchImageJob is not a transactional entity")
	}
	_m.config.driver = _tx.drv
	return _m
}

// String implements the fmt.Stringer.
func (_m *BatchImageJob) String() string {
	var builder strings.Builder
	builder.WriteString("BatchImageJob(")
	builder.WriteString(fmt.Sprintf("id=%v, ", _m.ID))
	builder.WriteString("batch_id=")
	builder.WriteString(_m.BatchID)
	builder.WriteString(", ")
	builder.WriteString("user_id=")
	builder.WriteString(fmt.Sprintf("%v", _m.UserID))
	builder.WriteString(", ")
	if v := _m.APIKeyID; v != nil {
		builder.WriteString("api_key_id=")
		builder.WriteString(fmt.Sprintf("%v", *v))
	}
	builder.WriteString(", ")
	if v := _m.AccountID; v != nil {
		builder.WriteString("account_id=")
		builder.WriteString(fmt.Sprintf("%v", *v))
	}
	builder.WriteString(", ")
	builder.WriteString("provider=")
	builder.WriteString(_m.Provider)
	builder.WriteString(", ")
	builder.WriteString("model=")
	builder.WriteString(_m.Model)
	builder.WriteString(", ")
	builder.WriteString("task_name=")
	builder.WriteString(_m.TaskName)
	builder.WriteString(", ")
	builder.WriteString("status=")
	builder.WriteString(_m.Status)
	builder.WriteString(", ")
	if v := _m.ProviderJobName; v != nil {
		builder.WriteString("provider_job_name=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	if v := _m.ProviderInputRef; v != nil {
		builder.WriteString("provider_input_ref=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	if v := _m.ProviderOutputRef; v != nil {
		builder.WriteString("provider_output_ref=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	if v := _m.GcsInputURI; v != nil {
		builder.WriteString("gcs_input_uri=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	if v := _m.GcsOutputURI; v != nil {
		builder.WriteString("gcs_output_uri=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	builder.WriteString("item_count=")
	builder.WriteString(fmt.Sprintf("%v", _m.ItemCount))
	builder.WriteString(", ")
	builder.WriteString("success_count=")
	builder.WriteString(fmt.Sprintf("%v", _m.SuccessCount))
	builder.WriteString(", ")
	builder.WriteString("fail_count=")
	builder.WriteString(fmt.Sprintf("%v", _m.FailCount))
	builder.WriteString(", ")
	builder.WriteString("cancelled_count=")
	builder.WriteString(fmt.Sprintf("%v", _m.CancelledCount))
	builder.WriteString(", ")
	builder.WriteString("estimated_cost=")
	builder.WriteString(fmt.Sprintf("%v", _m.EstimatedCost))
	builder.WriteString(", ")
	if v := _m.HoldAmount; v != nil {
		builder.WriteString("hold_amount=")
		builder.WriteString(fmt.Sprintf("%v", *v))
	}
	builder.WriteString(", ")
	if v := _m.ActualCost; v != nil {
		builder.WriteString("actual_cost=")
		builder.WriteString(fmt.Sprintf("%v", *v))
	}
	builder.WriteString(", ")
	builder.WriteString("currency=")
	builder.WriteString(_m.Currency)
	builder.WriteString(", ")
	if v := _m.HoldID; v != nil {
		builder.WriteString("hold_id=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	if v := _m.IdempotencyKey; v != nil {
		builder.WriteString("idempotency_key=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	if v := _m.RequestHash; v != nil {
		builder.WriteString("request_hash=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	if v := _m.ManifestHash; v != nil {
		builder.WriteString("manifest_hash=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	builder.WriteString("retry_count=")
	builder.WriteString(fmt.Sprintf("%v", _m.RetryCount))
	builder.WriteString(", ")
	builder.WriteString("version=")
	builder.WriteString(fmt.Sprintf("%v", _m.Version))
	builder.WriteString(", ")
	if v := _m.OutputExpiresAt; v != nil {
		builder.WriteString("output_expires_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteString(", ")
	if v := _m.InputDeletedAt; v != nil {
		builder.WriteString("input_deleted_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteString(", ")
	if v := _m.OutputDeletedAt; v != nil {
		builder.WriteString("output_deleted_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteString(", ")
	if v := _m.DownloadedAt; v != nil {
		builder.WriteString("downloaded_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteString(", ")
	if v := _m.UserDeletedAt; v != nil {
		builder.WriteString("user_deleted_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteString(", ")
	if v := _m.LastErrorCode; v != nil {
		builder.WriteString("last_error_code=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	if v := _m.LastErrorMessage; v != nil {
		builder.WriteString("last_error_message=")
		builder.WriteString(*v)
	}
	builder.WriteString(", ")
	builder.WriteString("created_at=")
	builder.WriteString(_m.CreatedAt.Format(time.ANSIC))
	builder.WriteString(", ")
	builder.WriteString("updated_at=")
	builder.WriteString(_m.UpdatedAt.Format(time.ANSIC))
	builder.WriteString(", ")
	if v := _m.SubmittedAt; v != nil {
		builder.WriteString("submitted_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteString(", ")
	if v := _m.StartedAt; v != nil {
		builder.WriteString("started_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteString(", ")
	if v := _m.FinishedAt; v != nil {
		builder.WriteString("finished_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteString(", ")
	if v := _m.SettledAt; v != nil {
		builder.WriteString("settled_at=")
		builder.WriteString(v.Format(time.ANSIC))
	}
	builder.WriteByte(')')
	return builder.String()
}

// BatchImageJobs is a parsable slice of BatchImageJob.
type BatchImageJobs []*BatchImageJob
