flamenco/pkg/api/openapi_types.gen.go

1269 lines
46 KiB
Go
Generated

// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen version v1.9.0 DO NOT EDIT.
package api
import (
"encoding/json"
"fmt"
"time"
)
const (
Worker_authScopes = "worker_auth.Scopes"
)
// Defines values for AvailableJobSettingSubtype.
const (
AvailableJobSettingSubtypeDirPath AvailableJobSettingSubtype = "dir_path"
AvailableJobSettingSubtypeFileName AvailableJobSettingSubtype = "file_name"
AvailableJobSettingSubtypeFilePath AvailableJobSettingSubtype = "file_path"
AvailableJobSettingSubtypeHashedFilePath AvailableJobSettingSubtype = "hashed_file_path"
)
// Defines values for AvailableJobSettingType.
const (
AvailableJobSettingTypeBool AvailableJobSettingType = "bool"
AvailableJobSettingTypeFloat AvailableJobSettingType = "float"
AvailableJobSettingTypeInt32 AvailableJobSettingType = "int32"
AvailableJobSettingTypeString AvailableJobSettingType = "string"
)
// Defines values for AvailableJobSettingVisibility.
const (
AvailableJobSettingVisibilityHidden AvailableJobSettingVisibility = "hidden"
AvailableJobSettingVisibilitySubmission AvailableJobSettingVisibility = "submission"
AvailableJobSettingVisibilityVisible AvailableJobSettingVisibility = "visible"
AvailableJobSettingVisibilityWeb AvailableJobSettingVisibility = "web"
)
// Defines values for BlenderPathSource.
const (
BlenderPathSourceFileAssociation BlenderPathSource = "file_association"
BlenderPathSourceInputPath BlenderPathSource = "input_path"
BlenderPathSourcePathEnvvar BlenderPathSource = "path_envvar"
)
// Defines values for JobStatus.
const (
JobStatusActive JobStatus = "active"
JobStatusCancelRequested JobStatus = "cancel-requested"
JobStatusCanceled JobStatus = "canceled"
JobStatusCompleted JobStatus = "completed"
JobStatusFailed JobStatus = "failed"
JobStatusPaused JobStatus = "paused"
JobStatusQueued JobStatus = "queued"
JobStatusRequeueing JobStatus = "requeueing"
JobStatusUnderConstruction JobStatus = "under-construction"
)
// Defines values for ManagerVariableAudience.
const (
ManagerVariableAudienceUsers ManagerVariableAudience = "users"
ManagerVariableAudienceWorkers ManagerVariableAudience = "workers"
)
// Defines values for ShamanFileStatus.
const (
ShamanFileStatusStored ShamanFileStatus = "stored"
ShamanFileStatusUnknown ShamanFileStatus = "unknown"
ShamanFileStatusUploading ShamanFileStatus = "uploading"
)
// Defines values for SocketIOSubscriptionOperation.
const (
SocketIOSubscriptionOperationSubscribe SocketIOSubscriptionOperation = "subscribe"
SocketIOSubscriptionOperationUnsubscribe SocketIOSubscriptionOperation = "unsubscribe"
)
// Defines values for SocketIOSubscriptionType.
const (
SocketIOSubscriptionTypeAllJobs SocketIOSubscriptionType = "allJobs"
SocketIOSubscriptionTypeAllLastRendered SocketIOSubscriptionType = "allLastRendered"
SocketIOSubscriptionTypeAllWorkerTags SocketIOSubscriptionType = "allWorkerTags"
SocketIOSubscriptionTypeAllWorkers SocketIOSubscriptionType = "allWorkers"
SocketIOSubscriptionTypeJob SocketIOSubscriptionType = "job"
SocketIOSubscriptionTypeTasklog SocketIOSubscriptionType = "tasklog"
)
// Defines values for TaskStatus.
const (
TaskStatusActive TaskStatus = "active"
TaskStatusCanceled TaskStatus = "canceled"
TaskStatusCompleted TaskStatus = "completed"
TaskStatusFailed TaskStatus = "failed"
TaskStatusPaused TaskStatus = "paused"
TaskStatusQueued TaskStatus = "queued"
TaskStatusSoftFailed TaskStatus = "soft-failed"
)
// Defines values for WorkerStatus.
const (
WorkerStatusAsleep WorkerStatus = "asleep"
WorkerStatusAwake WorkerStatus = "awake"
WorkerStatusError WorkerStatus = "error"
WorkerStatusOffline WorkerStatus = "offline"
WorkerStatusRestart WorkerStatus = "restart"
WorkerStatusStarting WorkerStatus = "starting"
WorkerStatusTesting WorkerStatus = "testing"
)
// AssignedTask is a task as it is received by the Worker.
type AssignedTask struct {
Commands []Command `json:"commands"`
Job string `json:"job"`
JobPriority int `json:"job_priority"`
JobType string `json:"job_type"`
Name string `json:"name"`
Priority int `json:"priority"`
Status TaskStatus `json:"status"`
TaskType string `json:"task_type"`
Uuid string `json:"uuid"`
}
// Single setting of a Job types.
type AvailableJobSetting struct {
// When given, limit the valid values to these choices. Only usable with string type.
Choices *[]string `json:"choices,omitempty"`
// The default value shown to the user when determining this setting.
Default *interface{} `json:"default,omitempty"`
// The description/tooltip shown in the user interface.
Description *interface{} `json:"description,omitempty"`
// Whether to allow editing this setting after the job has been submitted. Would imply deleting all existing tasks for this job, and recompiling it.
Editable *bool `json:"editable,omitempty"`
// Python expression to be evaluated in order to determine the default value for this setting.
Eval *string `json:"eval,omitempty"`
// Meta-data for the 'eval' expression.
EvalInfo *struct {
// Description of what the 'eval' expression is doing. It is also used as placeholder text to show when the manual input field is hidden (because eval-on-submit has been toggled on by the user).
Description string `json:"description"`
// Enables the 'eval on submit' toggle button behavior for this setting. A toggle button will be shown in Blender's submission interface. When toggled on, the `eval` expression will determine the setting's value. Manually editing the setting is then no longer possible, and instead of an input field, the 'description' string is shown.
// An example use is the to-be-rendered frame range, which by default automatically follows the scene range, but can be overridden manually when desired.
ShowLinkButton bool `json:"showLinkButton"`
} `json:"evalInfo,omitempty"`
// Identifier for the setting, must be unique within the job type.
Key string `json:"key"`
// Any extra arguments to the bpy.props.SomeProperty() call used to create this property.
Propargs *map[string]interface{} `json:"propargs,omitempty"`
// Whether to immediately reject a job definition, of this type, without this particular setting.
Required *bool `json:"required,omitempty"`
// Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `"/######"` appended.
Subtype *AvailableJobSettingSubtype `json:"subtype,omitempty"`
// Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported.
Type AvailableJobSettingType `json:"type"`
// When to show this setting. `visible`: always show. `submission`: only show in the UI of a job submitter (like a Blender add-on). `web`: only show in the web interface for management, but not when submitting the job. `hidden`: never show; only available to the job compiler script as internal setting.
Visible *AvailableJobSettingVisibility `json:"visible,omitempty"`
}
// Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `"/######"` appended.
type AvailableJobSettingSubtype string
// Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported.
type AvailableJobSettingType string
// When to show this setting. `visible`: always show. `submission`: only show in the UI of a job submitter (like a Blender add-on). `web`: only show in the web interface for management, but not when submitting the job. `hidden`: never show; only available to the job compiler script as internal setting.
type AvailableJobSettingVisibility string
// Job type supported by this Manager, and its parameters.
type AvailableJobType struct {
// Hash of the job type. If the job settings or the label change, this etag will change. This is used on job submission to ensure that the submitted job settings are up to date.
Etag string `json:"etag"`
Label string `json:"label"`
Name string `json:"name"`
Settings []AvailableJobSetting `json:"settings"`
}
// List of job types supported by this Manager.
type AvailableJobTypes struct {
JobTypes []AvailableJobType `json:"job_types"`
}
// BlenderPathCheckResult defines model for BlenderPathCheckResult.
type BlenderPathCheckResult struct {
// Description of why this path is (not) usable.
Cause string `json:"cause"`
// The input that was given to find this Blender.
Input string `json:"input"`
// Whether the path is usable or not.
IsUsable bool `json:"is_usable"`
// The path that was found.
Path string `json:"path"`
Source BlenderPathSource `json:"source"`
}
// BlenderPathFindResult defines model for BlenderPathFindResult.
type BlenderPathFindResult []BlenderPathCheckResult
// BlenderPathSource defines model for BlenderPathSource.
type BlenderPathSource string
// Command represents a single command to execute by the Worker.
type Command struct {
Name string `json:"name"`
Parameters map[string]interface{} `json:"parameters"`
}
// Generic error response.
type Error struct {
// HTTP status code of this response. Is included in the payload so that a single object represents all error information.
// Code 503 is used when the database is busy. The HTTP response will contain a 'Retry-After' HTTP header that indicates after which time the request can be retried. Following the header is not mandatory, and it's up to the client to do something reasonable like exponential backoff.
Code int32 `json:"code"`
Message string `json:"message"`
}
// FlamencoVersion defines model for FlamencoVersion.
type FlamencoVersion struct {
Git string `json:"git"`
Name string `json:"name"`
Shortversion string `json:"shortversion"`
// Version of this Manager, meant for human consumption. For release builds it is the same as `shortversion`, for other builds it also includes the `git` version info.
Version string `json:"version"`
}
// Job defines model for Job.
type Job struct {
// Embedded struct due to allOf(#/components/schemas/SubmittedJob)
SubmittedJob `yaml:",inline"`
// Embedded fields due to inline allOf schema
// Description of the last activity on this job.
Activity string `json:"activity"`
// Creation timestamp
Created time.Time `json:"created"`
// If job deletion was requested, this is the timestamp at which that request was stored on Flamenco Manager.
DeleteRequestedAt *time.Time `json:"delete_requested_at,omitempty"`
// UUID of the Job
Id string `json:"id"`
Status JobStatus `json:"status"`
// Timestamp of last update.
Updated time.Time `json:"updated"`
}
// List of workers that are not allowed certain task types on a specific job.
type JobBlocklist []JobBlocklistEntry
// JobBlocklistEntry defines model for JobBlocklistEntry.
type JobBlocklistEntry struct {
TaskType string `json:"task_type"`
WorkerId string `json:"worker_id"`
WorkerName *string `json:"worker_name,omitempty"`
}
// Info about what will be deleted when this job is deleted.
type JobDeletionInfo struct {
// Whether the Shaman checkout directory will be removed along with the job.
ShamanCheckout bool `json:"shaman_checkout"`
}
// Enough information for a client to piece together different strings to form a host-relative URL to the last-rendered image. To construct the URL, concatenate "{base}/{one of the suffixes}".
type JobLastRenderedImageInfo struct {
Base string `json:"base"`
Suffixes []string `json:"suffixes"`
}
// Parameters to describe which jobs should be deleted.
type JobMassDeletionSelection struct {
// All jobs that were last updated before or on this timestamp will be deleted.
LastUpdatedMax *time.Time `json:"last_updated_max,omitempty"`
}
// Arbitrary metadata strings. More complex structures can be modeled by using `a.b.c` notation for the key.
type JobMetadata struct {
AdditionalProperties map[string]string `json:"-"`
}
// JobPriorityChange defines model for JobPriorityChange.
type JobPriorityChange struct {
Priority int `json:"priority"`
}
// JobSettings defines model for JobSettings.
type JobSettings struct {
AdditionalProperties map[string]interface{} `json:"-"`
}
// JobStatus defines model for JobStatus.
type JobStatus string
// JobStatusChange defines model for JobStatusChange.
type JobStatusChange struct {
// The reason for this status change.
Reason string `json:"reason"`
Status JobStatus `json:"status"`
}
// Storage info of a job, which Flamenco can use to remove job-related files when necessary.
type JobStorageInfo struct {
// 'Checkout ID' used when creating the Shaman checkout for this job. Aids in removing the checkout directory when the job is removed from Flamenco.
ShamanCheckoutId *string `json:"shaman_checkout_id,omitempty"`
}
// Simplified list of tasks of a job. Contains all tasks, but not all info of each task.
type JobTasksSummary struct {
Tasks *[]TaskSummary `json:"tasks,omitempty"`
}
// JobsQuery defines model for JobsQuery.
type JobsQuery struct {
Limit *int `json:"limit,omitempty"`
// Filter by metadata, using `LIKE` notation.
Metadata *JobsQuery_Metadata `json:"metadata,omitempty"`
Offset *int `json:"offset,omitempty"`
OrderBy *[]string `json:"order_by,omitempty"`
// Filter by job settings, using `LIKE` notation.
Settings *JobsQuery_Settings `json:"settings,omitempty"`
// Return only jobs with a status in this array.
StatusIn *[]JobStatus `json:"status_in,omitempty"`
}
// Filter by metadata, using `LIKE` notation.
type JobsQuery_Metadata struct {
AdditionalProperties map[string]string `json:"-"`
}
// Filter by job settings, using `LIKE` notation.
type JobsQuery_Settings struct {
AdditionalProperties map[string]interface{} `json:"-"`
}
// JobsQueryResult defines model for JobsQueryResult.
type JobsQueryResult struct {
Jobs []Job `json:"jobs"`
}
// ManagerConfiguration defines model for ManagerConfiguration.
type ManagerConfiguration struct {
// Whether this is considered the first time the Manager runs. This is determined by a few factors, like a non-existent configuration file or certain settings being empty while they shouldn't be.
IsFirstRun bool `json:"isFirstRun"`
// Whether the Shaman file transfer API is available.
ShamanEnabled bool `json:"shamanEnabled"`
// Directory used for job file storage.
StorageLocation string `json:"storageLocation"`
}
// ManagerVariable defines model for ManagerVariable.
type ManagerVariable struct {
// One-way variables are the most common one, and are simple replacement from `{name}` to their value, which happens when a Task is given to a Worker. Two-way variables are also replaced when submitting a job, where the platform-specific value is replaced by `{name}`.
IsTwoway bool `json:"is_twoway"`
Value string `json:"value"`
}
// ManagerVariableAudience defines model for ManagerVariableAudience.
type ManagerVariableAudience string
// Mapping from variable name to its properties.
type ManagerVariables struct {
AdditionalProperties map[string]ManagerVariable `json:"-"`
}
// Indicates whether the worker may keep running the task.
type MayKeepRunning struct {
MayKeepRunning bool `json:"mayKeepRunning"`
Reason string `json:"reason"`
// Indicates that a status change requested for the worker. It should use the `workerState` operation to determine which state to go to next. If this is `true`, `mayKeepRunning` MUST be `false`.
StatusChangeRequested bool `json:"statusChangeRequested"`
}
// PathCheckInput defines model for PathCheckInput.
type PathCheckInput struct {
Path string `json:"path"`
}
// PathCheckResult defines model for PathCheckResult.
type PathCheckResult struct {
// Description of why this path is (not) usable.
Cause string `json:"cause"`
// Whether the path is usable or not.
IsUsable bool `json:"is_usable"`
// The path that was checked.
Path string `json:"path"`
}
// RegisteredWorker defines model for RegisteredWorker.
type RegisteredWorker struct {
Address string `json:"address"`
Name string `json:"name"`
Platform string `json:"platform"`
Software string `json:"software"`
Status WorkerStatus `json:"status"`
SupportedTaskTypes []string `json:"supported_task_types"`
Uuid string `json:"uuid"`
}
// SecurityError defines model for SecurityError.
type SecurityError struct {
Message string `json:"message"`
}
// Configuration obtained from the Setup Assistant.
type SetupAssistantConfig struct {
BlenderExecutable BlenderPathCheckResult `json:"blenderExecutable"`
// Directory used for job file storage.
StorageLocation string `json:"storageLocation"`
}
// Set of files with their SHA256 checksum, size in bytes, and desired location in the checkout directory.
type ShamanCheckout struct {
// Path where the Manager should create this checkout. It is relative to the Shaman checkout path as configured on the Manager. In older versions of the Shaman this was just the "checkout ID", but in this version it can be a path like `project-slug/scene-name/unique-ID`.
CheckoutPath string `json:"checkoutPath"`
Files []ShamanFileSpec `json:"files"`
}
// The result of a Shaman checkout.
type ShamanCheckoutResult struct {
// Path where the Manager created this checkout. This can be different than what was requested, as the Manager will ensure a unique directory. The path is relative to the Shaman checkout path as configured on the Manager.
CheckoutPath string `json:"checkoutPath"`
}
// Specification of a file in the Shaman storage.
type ShamanFileSpec struct {
// Location of the file in the checkout
Path string `json:"path"`
// SHA256 checksum of the file
Sha string `json:"sha"`
// File size in bytes
Size int `json:"size"`
}
// Specification of a file, which could be in the Shaman storage, or not, depending on its status.
type ShamanFileSpecWithStatus struct {
// Location of the file in the checkout
Path string `json:"path"`
// SHA256 checksum of the file
Sha string `json:"sha"`
// File size in bytes
Size int `json:"size"`
Status ShamanFileStatus `json:"status"`
}
// ShamanFileStatus defines model for ShamanFileStatus.
type ShamanFileStatus string
// Set of files with their SHA256 checksum and size in bytes.
type ShamanRequirementsRequest struct {
Files []ShamanFileSpec `json:"files"`
}
// The files from a requirements request, with their status on the Shaman server. Files that are known to Shaman are excluded from the response.
type ShamanRequirementsResponse struct {
Files []ShamanFileSpecWithStatus `json:"files"`
}
// Status of a file in the Shaman storage.
type ShamanSingleFileStatus struct {
Status ShamanFileStatus `json:"status"`
}
// Location of the shared storage, adjusted for a specific audience & platform. This uses two-way variables to adjust the shared storage path from the Manager's configuration.
type SharedStorageLocation struct {
Audience ManagerVariableAudience `json:"audience"`
Location string `json:"location"`
Platform string `json:"platform"`
// Whether the Shaman file transfer API is available.
ShamanEnabled bool `json:"shamanEnabled"`
}
// Subset of a Job, sent over SocketIO when a job changes. For new jobs, `previous_status` will be excluded.
type SocketIOJobUpdate struct {
// If job deletion was requested, this is the timestamp at which that request was stored on Flamenco Manager.
DeleteRequestedAt *time.Time `json:"delete_requested_at,omitempty"`
// UUID of the Job
Id string `json:"id"`
// Name of the job
Name *string `json:"name,omitempty"`
PreviousStatus *JobStatus `json:"previous_status,omitempty"`
Priority int `json:"priority"`
// Indicates that the client should refresh all the job's tasks. This is sent for mass updates, where updating each individual task would generate too many updates to be practical.
RefreshTasks bool `json:"refresh_tasks"`
Status JobStatus `json:"status"`
Type string `json:"type"`
// Timestamp of last update
Updated time.Time `json:"updated"`
// When a job was just deleted, this is set to `true`. If this is specified, only the 'id' field is set, the rest will be empty.
WasDeleted *bool `json:"was_deleted,omitempty"`
}
// Indicator that the last-rendered image of this job was updated.
type SocketIOLastRenderedUpdate struct {
JobId string `json:"job_id"`
// Enough information for a client to piece together different strings to form a host-relative URL to the last-rendered image. To construct the URL, concatenate "{base}/{one of the suffixes}".
Thumbnail JobLastRenderedImageInfo `json:"thumbnail"`
}
// Send by SocketIO clients as `/subscription` event type, to manage their subscription to job updates. Clients always get job updates, but for task updates or task logs they need to explicitly subscribe. For simplicity, clients can only subscribe to one job (to get task updates for that job) and one task's log at a time.
type SocketIOSubscription struct {
Op SocketIOSubscriptionOperation `json:"op"`
// What kind of thing to subscribe to / unsubscribe from.
Type SocketIOSubscriptionType `json:"type"`
// UUID of the thing to subscribe to / unsubscribe from.
Uuid *string `json:"uuid,omitempty"`
}
// SocketIOSubscriptionOperation defines model for SocketIOSubscriptionOperation.
type SocketIOSubscriptionOperation string
// What kind of thing to subscribe to / unsubscribe from.
type SocketIOSubscriptionType string
// Task log chunk, sent to a SocketIO room dedicated to a single task, to avoid sending too many updates.
type SocketIOTaskLogUpdate struct {
// Chunk of the task log. May contain multiple lines of text.
Log string `json:"log"`
// UUID of the Task
TaskId string `json:"task_id"`
}
// Subset of a Task, sent over SocketIO when a task changes. For new tasks, `previous_status` will be excluded.
type SocketIOTaskUpdate struct {
Activity string `json:"activity"`
// UUID of the Task
Id string `json:"id"`
JobId string `json:"job_id"`
// Name of the task
Name string `json:"name"`
PreviousStatus *TaskStatus `json:"previous_status,omitempty"`
Status TaskStatus `json:"status"`
// Timestamp of last update
Updated time.Time `json:"updated"`
}
// Worker Tag, sent over SocketIO when it changes.
type SocketIOWorkerTagUpdate struct {
// Tag of workers. A job can optionally specify which tag it should be limited to. Workers can be part of multiple tags simultaneously.
Tag WorkerTag `json:"tag"`
// When a tag was just deleted, this is set to `true`.
WasDeleted *bool `json:"was_deleted,omitempty"`
}
// Subset of a Worker, sent over SocketIO when a worker changes.
type SocketIOWorkerUpdate struct {
// Whether this Worker can auto-restart.
CanRestart bool `json:"can_restart"`
// This is only set when the worker was deleted.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// UUID of the Worker
Id string `json:"id"`
// Last time this worker was seen by the Manager.
LastSeen *time.Time `json:"last_seen,omitempty"`
// Name of the worker
Name string `json:"name"`
PreviousStatus *WorkerStatus `json:"previous_status,omitempty"`
Status WorkerStatus `json:"status"`
// Request for a Worker to change its status to `status`.
StatusChange *WorkerStatusChangeRequest `json:"status_change,omitempty"`
// Timestamp of last update
Updated time.Time `json:"updated"`
Version string `json:"version"`
}
// Job definition submitted to Flamenco.
type SubmittedJob struct {
// Arbitrary metadata strings. More complex structures can be modeled by using `a.b.c` notation for the key.
Metadata *JobMetadata `json:"metadata,omitempty"`
Name string `json:"name"`
Priority int `json:"priority"`
Settings *JobSettings `json:"settings,omitempty"`
// Storage info of a job, which Flamenco can use to remove job-related files when necessary.
Storage *JobStorageInfo `json:"storage,omitempty"`
// Operating system of the submitter. This is used to recognise two-way variables. This should be a lower-case version of the platform, like "linux", "windows", "darwin", "openbsd", etc. Should be ompatible with Go's `runtime.GOOS`; run `go tool dist list` to get a list of possible platforms.
// As a special case, the platform "manager" can be given, which will be interpreted as "the Manager's platform". This is mostly to make test/debug scripts easier, as they can use a static document on all platforms.
SubmitterPlatform string `json:"submitter_platform"`
Type string `json:"type"`
// Hash of the job type, copied from the `AvailableJobType.etag` property of the job type. The job will be rejected if this field doesn't match the actual job type on the Manager. This prevents job submission with old settings, after the job compiler script has been updated.
// If this field is ommitted, the check is bypassed.
TypeEtag *string `json:"type_etag,omitempty"`
// Worker tag that should execute this job. When a tag ID is given, only Workers in that tag will be scheduled to work on it. If empty or ommitted, all workers can work on this job.
WorkerTag *string `json:"worker_tag,omitempty"`
}
// The task as it exists in the Manager database, i.e. before variable replacement.
type Task struct {
Activity string `json:"activity"`
Commands []Command `json:"commands"`
// Creation timestamp
Created time.Time `json:"created"`
FailedByWorkers *[]TaskWorker `json:"failed_by_workers,omitempty"`
Id string `json:"id"`
JobId string `json:"job_id"`
// Timestamp of when any worker worked on this task.
LastTouched *time.Time `json:"last_touched,omitempty"`
Name string `json:"name"`
Priority int `json:"priority"`
Status TaskStatus `json:"status"`
TaskType string `json:"task_type"`
// Timestamp of last update.
Updated time.Time `json:"updated"`
// Worker reference, as used in Task objects.
Worker *TaskWorker `json:"worker,omitempty"`
}
// Info about the log of a single task.
type TaskLogInfo struct {
JobId string `json:"job_id"`
// The size of the task log, in bytes.
Size int `json:"size"`
TaskId string `json:"task_id"`
// The URL at which the task log itself can be downloaded.
Url string `json:"url"`
}
// TaskStatus defines model for TaskStatus.
type TaskStatus string
// TaskStatusChange defines model for TaskStatusChange.
type TaskStatusChange struct {
// The reason for this status change.
Reason string `json:"reason"`
Status TaskStatus `json:"status"`
}
// Just enough information about the task to show in the job's task list.
type TaskSummary struct {
Id string `json:"id"`
Name string `json:"name"`
Priority int `json:"priority"`
Status TaskStatus `json:"status"`
TaskType string `json:"task_type"`
Updated time.Time `json:"updated"`
}
// TaskUpdate is sent by a Worker to update the status & logs of a task it's executing. All properties are optional; omitted properties are ignored (i.e. omitting `activity` will not erase the activity property of the task).
type TaskUpdate struct {
// One-liner to indicate what's currently happening with the task. Overwrites previously sent activity strings.
Activity *string `json:"activity,omitempty"`
// Log lines for this task, will be appended to logs sent earlier.
Log *string `json:"log,omitempty"`
TaskStatus *TaskStatus `json:"taskStatus,omitempty"`
}
// Worker reference, as used in Task objects.
type TaskWorker struct {
Address string `json:"address"`
Id string `json:"id"`
Name string `json:"name"`
}
// Worker defines model for Worker.
type Worker struct {
// Embedded struct due to allOf(#/components/schemas/WorkerSummary)
WorkerSummary `yaml:",inline"`
// Embedded fields due to inline allOf schema
// IP address of the Worker
IpAddress string `json:"ip_address"`
// Operating system of the Worker
Platform string `json:"platform"`
SupportedTaskTypes []string `json:"supported_task_types"`
// Tags of which this Worker is a member.
Tags *[]WorkerTag `json:"tags,omitempty"`
// Task assigned to a Worker.
Task *WorkerTask `json:"task,omitempty"`
}
// List of workers.
type WorkerList struct {
Workers []WorkerSummary `json:"workers"`
}
// WorkerRegistration defines model for WorkerRegistration.
type WorkerRegistration struct {
Name string `json:"name"`
Platform string `json:"platform"`
Secret string `json:"secret"`
SupportedTaskTypes []string `json:"supported_task_types"`
}
// WorkerSignOn defines model for WorkerSignOn.
type WorkerSignOn struct {
CanRestart *bool `json:"can_restart,omitempty"`
Name string `json:"name"`
SoftwareVersion string `json:"software_version"`
SupportedTaskTypes []string `json:"supported_task_types"`
}
// Sleep schedule for a single Worker. Start and end time indicate the time of each day at which the schedule is active. Applies only when today is in `days_of_week`, or when `days_of_week` is empty.
// Start and end time are in 24-hour HH:MM notation.
type WorkerSleepSchedule struct {
// Space-separated two-letter strings indicating days of week the schedule is active ("mo", "tu", etc.). Empty means "every day".
DaysOfWeek string `json:"days_of_week"`
EndTime string `json:"end_time"`
IsActive bool `json:"is_active"`
StartTime string `json:"start_time"`
}
// WorkerStateChange defines model for WorkerStateChange.
type WorkerStateChange struct {
StatusRequested WorkerStatus `json:"status_requested"`
}
// WorkerStateChanged defines model for WorkerStateChanged.
type WorkerStateChanged struct {
Status WorkerStatus `json:"status"`
}
// WorkerStatus defines model for WorkerStatus.
type WorkerStatus string
// Request for a Worker to change its status to `status`.
type WorkerStatusChangeRequest struct {
// Whether the status change should happen immediately, or after the worker's current task is finished.
IsLazy bool `json:"is_lazy"`
Status WorkerStatus `json:"status"`
}
// Basic information about a Worker.
type WorkerSummary struct {
// Whether this worker can auto-restart.
CanRestart bool `json:"can_restart"`
Id string `json:"id"`
// Last time this worker was seen by the Manager.
LastSeen *time.Time `json:"last_seen,omitempty"`
Name string `json:"name"`
Status WorkerStatus `json:"status"`
// Request for a Worker to change its status to `status`.
StatusChange *WorkerStatusChangeRequest `json:"status_change,omitempty"`
// Version of Flamenco this Worker is running
Version string `json:"version"`
}
// Tag of workers. A job can optionally specify which tag it should be limited to. Workers can be part of multiple tags simultaneously.
type WorkerTag struct {
Description *string `json:"description,omitempty"`
// UUID of the tag. Can be ommitted when creating a new tag, in which case a random UUID will be assigned.
Id *string `json:"id,omitempty"`
Name string `json:"name"`
}
// Request to change which tags this Worker is assigned to.
type WorkerTagChangeRequest struct {
TagIds []string `json:"tag_ids"`
}
// WorkerTagList defines model for WorkerTagList.
type WorkerTagList struct {
Tags *[]WorkerTag `json:"tags,omitempty"`
}
// WorkerTask defines model for WorkerTask.
type WorkerTask struct {
// Embedded struct due to allOf(#/components/schemas/TaskSummary)
TaskSummary `yaml:",inline"`
// Embedded fields due to inline allOf schema
JobId string `json:"job_id"`
}
// CheckBlenderExePathJSONBody defines parameters for CheckBlenderExePath.
type CheckBlenderExePathJSONBody PathCheckInput
// CheckSharedStoragePathJSONBody defines parameters for CheckSharedStoragePath.
type CheckSharedStoragePathJSONBody PathCheckInput
// SaveSetupAssistantConfigJSONBody defines parameters for SaveSetupAssistantConfig.
type SaveSetupAssistantConfigJSONBody SetupAssistantConfig
// SubmitJobJSONBody defines parameters for SubmitJob.
type SubmitJobJSONBody SubmittedJob
// SubmitJobCheckJSONBody defines parameters for SubmitJobCheck.
type SubmitJobCheckJSONBody SubmittedJob
// DeleteJobMassJSONBody defines parameters for DeleteJobMass.
type DeleteJobMassJSONBody JobMassDeletionSelection
// QueryJobsJSONBody defines parameters for QueryJobs.
type QueryJobsJSONBody JobsQuery
// RemoveJobBlocklistJSONBody defines parameters for RemoveJobBlocklist.
type RemoveJobBlocklistJSONBody JobBlocklist
// SetJobPriorityJSONBody defines parameters for SetJobPriority.
type SetJobPriorityJSONBody JobPriorityChange
// SetJobStatusJSONBody defines parameters for SetJobStatus.
type SetJobStatusJSONBody JobStatusChange
// ShamanCheckoutJSONBody defines parameters for ShamanCheckout.
type ShamanCheckoutJSONBody ShamanCheckout
// ShamanCheckoutRequirementsJSONBody defines parameters for ShamanCheckoutRequirements.
type ShamanCheckoutRequirementsJSONBody ShamanRequirementsRequest
// ShamanFileStoreParams defines parameters for ShamanFileStore.
type ShamanFileStoreParams struct {
// The client indicates that it can defer uploading this file. The "208" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file.
XShamanCanDeferUpload *bool `json:"X-Shaman-Can-Defer-Upload,omitempty"`
// The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging.
XShamanOriginalFilename *string `json:"X-Shaman-Original-Filename,omitempty"`
}
// SetTaskStatusJSONBody defines parameters for SetTaskStatus.
type SetTaskStatusJSONBody TaskStatusChange
// UpdateWorkerTagJSONBody defines parameters for UpdateWorkerTag.
type UpdateWorkerTagJSONBody WorkerTag
// CreateWorkerTagJSONBody defines parameters for CreateWorkerTag.
type CreateWorkerTagJSONBody WorkerTag
// RequestWorkerStatusChangeJSONBody defines parameters for RequestWorkerStatusChange.
type RequestWorkerStatusChangeJSONBody WorkerStatusChangeRequest
// SetWorkerTagsJSONBody defines parameters for SetWorkerTags.
type SetWorkerTagsJSONBody WorkerTagChangeRequest
// SetWorkerSleepScheduleJSONBody defines parameters for SetWorkerSleepSchedule.
type SetWorkerSleepScheduleJSONBody WorkerSleepSchedule
// RegisterWorkerJSONBody defines parameters for RegisterWorker.
type RegisterWorkerJSONBody WorkerRegistration
// SignOnJSONBody defines parameters for SignOn.
type SignOnJSONBody WorkerSignOn
// WorkerStateChangedJSONBody defines parameters for WorkerStateChanged.
type WorkerStateChangedJSONBody WorkerStateChanged
// TaskUpdateJSONBody defines parameters for TaskUpdate.
type TaskUpdateJSONBody TaskUpdate
// CheckBlenderExePathJSONRequestBody defines body for CheckBlenderExePath for application/json ContentType.
type CheckBlenderExePathJSONRequestBody CheckBlenderExePathJSONBody
// CheckSharedStoragePathJSONRequestBody defines body for CheckSharedStoragePath for application/json ContentType.
type CheckSharedStoragePathJSONRequestBody CheckSharedStoragePathJSONBody
// SaveSetupAssistantConfigJSONRequestBody defines body for SaveSetupAssistantConfig for application/json ContentType.
type SaveSetupAssistantConfigJSONRequestBody SaveSetupAssistantConfigJSONBody
// SubmitJobJSONRequestBody defines body for SubmitJob for application/json ContentType.
type SubmitJobJSONRequestBody SubmitJobJSONBody
// SubmitJobCheckJSONRequestBody defines body for SubmitJobCheck for application/json ContentType.
type SubmitJobCheckJSONRequestBody SubmitJobCheckJSONBody
// DeleteJobMassJSONRequestBody defines body for DeleteJobMass for application/json ContentType.
type DeleteJobMassJSONRequestBody DeleteJobMassJSONBody
// QueryJobsJSONRequestBody defines body for QueryJobs for application/json ContentType.
type QueryJobsJSONRequestBody QueryJobsJSONBody
// RemoveJobBlocklistJSONRequestBody defines body for RemoveJobBlocklist for application/json ContentType.
type RemoveJobBlocklistJSONRequestBody RemoveJobBlocklistJSONBody
// SetJobPriorityJSONRequestBody defines body for SetJobPriority for application/json ContentType.
type SetJobPriorityJSONRequestBody SetJobPriorityJSONBody
// SetJobStatusJSONRequestBody defines body for SetJobStatus for application/json ContentType.
type SetJobStatusJSONRequestBody SetJobStatusJSONBody
// ShamanCheckoutJSONRequestBody defines body for ShamanCheckout for application/json ContentType.
type ShamanCheckoutJSONRequestBody ShamanCheckoutJSONBody
// ShamanCheckoutRequirementsJSONRequestBody defines body for ShamanCheckoutRequirements for application/json ContentType.
type ShamanCheckoutRequirementsJSONRequestBody ShamanCheckoutRequirementsJSONBody
// SetTaskStatusJSONRequestBody defines body for SetTaskStatus for application/json ContentType.
type SetTaskStatusJSONRequestBody SetTaskStatusJSONBody
// UpdateWorkerTagJSONRequestBody defines body for UpdateWorkerTag for application/json ContentType.
type UpdateWorkerTagJSONRequestBody UpdateWorkerTagJSONBody
// CreateWorkerTagJSONRequestBody defines body for CreateWorkerTag for application/json ContentType.
type CreateWorkerTagJSONRequestBody CreateWorkerTagJSONBody
// RequestWorkerStatusChangeJSONRequestBody defines body for RequestWorkerStatusChange for application/json ContentType.
type RequestWorkerStatusChangeJSONRequestBody RequestWorkerStatusChangeJSONBody
// SetWorkerTagsJSONRequestBody defines body for SetWorkerTags for application/json ContentType.
type SetWorkerTagsJSONRequestBody SetWorkerTagsJSONBody
// SetWorkerSleepScheduleJSONRequestBody defines body for SetWorkerSleepSchedule for application/json ContentType.
type SetWorkerSleepScheduleJSONRequestBody SetWorkerSleepScheduleJSONBody
// RegisterWorkerJSONRequestBody defines body for RegisterWorker for application/json ContentType.
type RegisterWorkerJSONRequestBody RegisterWorkerJSONBody
// SignOnJSONRequestBody defines body for SignOn for application/json ContentType.
type SignOnJSONRequestBody SignOnJSONBody
// WorkerStateChangedJSONRequestBody defines body for WorkerStateChanged for application/json ContentType.
type WorkerStateChangedJSONRequestBody WorkerStateChangedJSONBody
// TaskUpdateJSONRequestBody defines body for TaskUpdate for application/json ContentType.
type TaskUpdateJSONRequestBody TaskUpdateJSONBody
// Getter for additional properties for JobMetadata. Returns the specified
// element and whether it was found
func (a JobMetadata) Get(fieldName string) (value string, found bool) {
if a.AdditionalProperties != nil {
value, found = a.AdditionalProperties[fieldName]
}
return
}
// Setter for additional properties for JobMetadata
func (a *JobMetadata) Set(fieldName string, value string) {
if a.AdditionalProperties == nil {
a.AdditionalProperties = make(map[string]string)
}
a.AdditionalProperties[fieldName] = value
}
// Override default JSON handling for JobMetadata to handle AdditionalProperties
func (a *JobMetadata) UnmarshalJSON(b []byte) error {
object := make(map[string]json.RawMessage)
err := json.Unmarshal(b, &object)
if err != nil {
return err
}
if len(object) != 0 {
a.AdditionalProperties = make(map[string]string)
for fieldName, fieldBuf := range object {
var fieldVal string
err := json.Unmarshal(fieldBuf, &fieldVal)
if err != nil {
return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err)
}
a.AdditionalProperties[fieldName] = fieldVal
}
}
return nil
}
// Override default JSON handling for JobMetadata to handle AdditionalProperties
func (a JobMetadata) MarshalJSON() ([]byte, error) {
var err error
object := make(map[string]json.RawMessage)
for fieldName, field := range a.AdditionalProperties {
object[fieldName], err = json.Marshal(field)
if err != nil {
return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err)
}
}
return json.Marshal(object)
}
// Getter for additional properties for JobSettings. Returns the specified
// element and whether it was found
func (a JobSettings) Get(fieldName string) (value interface{}, found bool) {
if a.AdditionalProperties != nil {
value, found = a.AdditionalProperties[fieldName]
}
return
}
// Setter for additional properties for JobSettings
func (a *JobSettings) Set(fieldName string, value interface{}) {
if a.AdditionalProperties == nil {
a.AdditionalProperties = make(map[string]interface{})
}
a.AdditionalProperties[fieldName] = value
}
// Override default JSON handling for JobSettings to handle AdditionalProperties
func (a *JobSettings) UnmarshalJSON(b []byte) error {
object := make(map[string]json.RawMessage)
err := json.Unmarshal(b, &object)
if err != nil {
return err
}
if len(object) != 0 {
a.AdditionalProperties = make(map[string]interface{})
for fieldName, fieldBuf := range object {
var fieldVal interface{}
err := json.Unmarshal(fieldBuf, &fieldVal)
if err != nil {
return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err)
}
a.AdditionalProperties[fieldName] = fieldVal
}
}
return nil
}
// Override default JSON handling for JobSettings to handle AdditionalProperties
func (a JobSettings) MarshalJSON() ([]byte, error) {
var err error
object := make(map[string]json.RawMessage)
for fieldName, field := range a.AdditionalProperties {
object[fieldName], err = json.Marshal(field)
if err != nil {
return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err)
}
}
return json.Marshal(object)
}
// Getter for additional properties for JobsQuery_Metadata. Returns the specified
// element and whether it was found
func (a JobsQuery_Metadata) Get(fieldName string) (value string, found bool) {
if a.AdditionalProperties != nil {
value, found = a.AdditionalProperties[fieldName]
}
return
}
// Setter for additional properties for JobsQuery_Metadata
func (a *JobsQuery_Metadata) Set(fieldName string, value string) {
if a.AdditionalProperties == nil {
a.AdditionalProperties = make(map[string]string)
}
a.AdditionalProperties[fieldName] = value
}
// Override default JSON handling for JobsQuery_Metadata to handle AdditionalProperties
func (a *JobsQuery_Metadata) UnmarshalJSON(b []byte) error {
object := make(map[string]json.RawMessage)
err := json.Unmarshal(b, &object)
if err != nil {
return err
}
if len(object) != 0 {
a.AdditionalProperties = make(map[string]string)
for fieldName, fieldBuf := range object {
var fieldVal string
err := json.Unmarshal(fieldBuf, &fieldVal)
if err != nil {
return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err)
}
a.AdditionalProperties[fieldName] = fieldVal
}
}
return nil
}
// Override default JSON handling for JobsQuery_Metadata to handle AdditionalProperties
func (a JobsQuery_Metadata) MarshalJSON() ([]byte, error) {
var err error
object := make(map[string]json.RawMessage)
for fieldName, field := range a.AdditionalProperties {
object[fieldName], err = json.Marshal(field)
if err != nil {
return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err)
}
}
return json.Marshal(object)
}
// Getter for additional properties for JobsQuery_Settings. Returns the specified
// element and whether it was found
func (a JobsQuery_Settings) Get(fieldName string) (value interface{}, found bool) {
if a.AdditionalProperties != nil {
value, found = a.AdditionalProperties[fieldName]
}
return
}
// Setter for additional properties for JobsQuery_Settings
func (a *JobsQuery_Settings) Set(fieldName string, value interface{}) {
if a.AdditionalProperties == nil {
a.AdditionalProperties = make(map[string]interface{})
}
a.AdditionalProperties[fieldName] = value
}
// Override default JSON handling for JobsQuery_Settings to handle AdditionalProperties
func (a *JobsQuery_Settings) UnmarshalJSON(b []byte) error {
object := make(map[string]json.RawMessage)
err := json.Unmarshal(b, &object)
if err != nil {
return err
}
if len(object) != 0 {
a.AdditionalProperties = make(map[string]interface{})
for fieldName, fieldBuf := range object {
var fieldVal interface{}
err := json.Unmarshal(fieldBuf, &fieldVal)
if err != nil {
return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err)
}
a.AdditionalProperties[fieldName] = fieldVal
}
}
return nil
}
// Override default JSON handling for JobsQuery_Settings to handle AdditionalProperties
func (a JobsQuery_Settings) MarshalJSON() ([]byte, error) {
var err error
object := make(map[string]json.RawMessage)
for fieldName, field := range a.AdditionalProperties {
object[fieldName], err = json.Marshal(field)
if err != nil {
return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err)
}
}
return json.Marshal(object)
}
// Getter for additional properties for ManagerVariables. Returns the specified
// element and whether it was found
func (a ManagerVariables) Get(fieldName string) (value ManagerVariable, found bool) {
if a.AdditionalProperties != nil {
value, found = a.AdditionalProperties[fieldName]
}
return
}
// Setter for additional properties for ManagerVariables
func (a *ManagerVariables) Set(fieldName string, value ManagerVariable) {
if a.AdditionalProperties == nil {
a.AdditionalProperties = make(map[string]ManagerVariable)
}
a.AdditionalProperties[fieldName] = value
}
// Override default JSON handling for ManagerVariables to handle AdditionalProperties
func (a *ManagerVariables) UnmarshalJSON(b []byte) error {
object := make(map[string]json.RawMessage)
err := json.Unmarshal(b, &object)
if err != nil {
return err
}
if len(object) != 0 {
a.AdditionalProperties = make(map[string]ManagerVariable)
for fieldName, fieldBuf := range object {
var fieldVal ManagerVariable
err := json.Unmarshal(fieldBuf, &fieldVal)
if err != nil {
return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err)
}
a.AdditionalProperties[fieldName] = fieldVal
}
}
return nil
}
// Override default JSON handling for ManagerVariables to handle AdditionalProperties
func (a ManagerVariables) MarshalJSON() ([]byte, error) {
var err error
object := make(map[string]json.RawMessage)
for fieldName, field := range a.AdditionalProperties {
object[fieldName], err = json.Marshal(field)
if err != nil {
return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err)
}
}
return json.Marshal(object)
}