job_model

package
v0.0.0-...-4f670de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APICronSchedule

type APICronSchedule struct {

	// The cron string. For details how to compose a cron, visit
	// ttps://en.wikipedia.org/wiki/Cron
	Cron string `json:"cron,omitempty"`

	// The end time of the cron job
	// Format: date-time
	EndTime strfmt.DateTime `json:"end_time,omitempty"`

	// The start time of the cron job
	// Format: date-time
	StartTime strfmt.DateTime `json:"start_time,omitempty"`
}

APICronSchedule CronSchedule allow scheduling the job with unix-like cron swagger:model apiCronSchedule

func (*APICronSchedule) MarshalBinary

func (m *APICronSchedule) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APICronSchedule) UnmarshalBinary

func (m *APICronSchedule) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APICronSchedule) Validate

func (m *APICronSchedule) Validate(formats strfmt.Registry) error

Validate validates this api cron schedule

type APIJob

type APIJob struct {

	// Output. The time this job is created.
	// Format: date-time
	CreatedAt strfmt.DateTime `json:"created_at,omitempty"`

	// Optional input field. Describing the purpose of the job
	Description string `json:"description,omitempty"`

	// Input. Whether the job is enabled or not.
	Enabled bool `json:"enabled,omitempty"`

	// In case any error happens retrieving a job field, only job ID
	// and the error message is returned. Client has the flexibility of choosing
	// how to handle error. This is especially useful during listing call.
	Error string `json:"error,omitempty"`

	// Output. Unique run ID. Generated by API server.
	ID string `json:"id,omitempty"`

	// Required input field.
	// Specify how many runs can be executed concurrently. Rage [1-10]
	MaxConcurrency int64 `json:"max_concurrency,omitempty,string"`

	// mode
	Mode JobMode `json:"mode,omitempty"`

	// Required input field. Job name provided by user. Not unique.
	Name string `json:"name,omitempty"`

	// Optional input field. Whether the job should catch up if behind schedule.
	// If true, the job will only schedule the latest interval if behind schedule.
	// If false, the job will catch up on each past interval.
	NoCatchup bool `json:"no_catchup,omitempty"`

	// Required input field.
	// Describing what the pipeline manifest and parameters to use
	// for the scheduled job.
	PipelineSpec *APIPipelineSpec `json:"pipeline_spec,omitempty"`

	// Optional input field. Specify which resource this job belongs to.
	ResourceReferences []*APIResourceReference `json:"resource_references"`

	// Optional input field. Specify which Kubernetes service account this job uses.
	ServiceAccount string `json:"service_account,omitempty"`

	// Output. The status of the job.
	// One of [Enable, Disable, Error]
	Status string `json:"status,omitempty"`

	// Required input field.
	// Specify how a run is triggered. Support cron mode or periodic mode.
	Trigger *APITrigger `json:"trigger,omitempty"`

	// Output. The last time this job is updated.
	// Format: date-time
	UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"`
}

APIJob api job swagger:model apiJob

func (*APIJob) MarshalBinary

func (m *APIJob) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIJob) UnmarshalBinary

func (m *APIJob) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIJob) Validate

func (m *APIJob) Validate(formats strfmt.Registry) error

Validate validates this api job

type APIListJobsResponse

type APIListJobsResponse struct {

	// A list of jobs returned.
	Jobs []*APIJob `json:"jobs"`

	// next page token
	NextPageToken string `json:"next_page_token,omitempty"`

	// total size
	TotalSize int32 `json:"total_size,omitempty"`
}

APIListJobsResponse api list jobs response swagger:model apiListJobsResponse

func (*APIListJobsResponse) MarshalBinary

func (m *APIListJobsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIListJobsResponse) UnmarshalBinary

func (m *APIListJobsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIListJobsResponse) Validate

func (m *APIListJobsResponse) Validate(formats strfmt.Registry) error

Validate validates this api list jobs response

type APIParameter

type APIParameter struct {

	// name
	Name string `json:"name,omitempty"`

	// value
	Value string `json:"value,omitempty"`
}

APIParameter api parameter swagger:model apiParameter

func (*APIParameter) MarshalBinary

func (m *APIParameter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIParameter) UnmarshalBinary

func (m *APIParameter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIParameter) Validate

func (m *APIParameter) Validate(formats strfmt.Registry) error

Validate validates this api parameter

type APIPeriodicSchedule

type APIPeriodicSchedule struct {

	// The end time of the periodic job
	// Format: date-time
	EndTime strfmt.DateTime `json:"end_time,omitempty"`

	// The time interval between the starting time of consecutive jobs
	IntervalSecond int64 `json:"interval_second,omitempty,string"`

	// The start time of the periodic job
	// Format: date-time
	StartTime strfmt.DateTime `json:"start_time,omitempty"`
}

APIPeriodicSchedule PeriodicSchedule allow scheduling the job periodically with certain interval swagger:model apiPeriodicSchedule

func (*APIPeriodicSchedule) MarshalBinary

func (m *APIPeriodicSchedule) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIPeriodicSchedule) UnmarshalBinary

func (m *APIPeriodicSchedule) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIPeriodicSchedule) Validate

func (m *APIPeriodicSchedule) Validate(formats strfmt.Registry) error

Validate validates this api periodic schedule

type APIPipelineSpec

type APIPipelineSpec struct {

	// The parameter user provide to inject to the pipeline JSON.
	// If a default value of a parameter exist in the JSON,
	// the value user provided here will replace.
	Parameters []*APIParameter `json:"parameters"`

	// Optional input field. The ID of the pipeline user uploaded before.
	PipelineID string `json:"pipeline_id,omitempty"`

	// Optional input field. The raw pipeline JSON spec.
	PipelineManifest string `json:"pipeline_manifest,omitempty"`

	// Optional output field. The name of the pipeline.
	// Not empty if the pipeline id is not empty.
	PipelineName string `json:"pipeline_name,omitempty"`

	// Optional input field. The marshalled raw argo JSON workflow.
	// This will be deprecated when pipeline_manifest is in use.
	WorkflowManifest string `json:"workflow_manifest,omitempty"`
}

APIPipelineSpec api pipeline spec swagger:model apiPipelineSpec

func (*APIPipelineSpec) MarshalBinary

func (m *APIPipelineSpec) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIPipelineSpec) UnmarshalBinary

func (m *APIPipelineSpec) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIPipelineSpec) Validate

func (m *APIPipelineSpec) Validate(formats strfmt.Registry) error

Validate validates this api pipeline spec

type APIRelationship

type APIRelationship string

APIRelationship api relationship swagger:model apiRelationship

const (

	// APIRelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP"
	APIRelationshipUNKNOWNRELATIONSHIP APIRelationship = "UNKNOWN_RELATIONSHIP"

	// APIRelationshipOWNER captures enum value "OWNER"
	APIRelationshipOWNER APIRelationship = "OWNER"

	// APIRelationshipCREATOR captures enum value "CREATOR"
	APIRelationshipCREATOR APIRelationship = "CREATOR"
)

func (APIRelationship) Validate

func (m APIRelationship) Validate(formats strfmt.Registry) error

Validate validates this api relationship

type APIResourceKey

type APIResourceKey struct {

	// The ID of the resource that referred to.
	ID string `json:"id,omitempty"`

	// The type of the resource that referred to.
	Type APIResourceType `json:"type,omitempty"`
}

APIResourceKey api resource key swagger:model apiResourceKey

func (*APIResourceKey) MarshalBinary

func (m *APIResourceKey) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIResourceKey) UnmarshalBinary

func (m *APIResourceKey) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIResourceKey) Validate

func (m *APIResourceKey) Validate(formats strfmt.Registry) error

Validate validates this api resource key

type APIResourceReference

type APIResourceReference struct {

	// key
	Key *APIResourceKey `json:"key,omitempty"`

	// The name of the resource that referred to.
	Name string `json:"name,omitempty"`

	// Required field. The relationship from referred resource to the object.
	Relationship APIRelationship `json:"relationship,omitempty"`
}

APIResourceReference api resource reference swagger:model apiResourceReference

func (*APIResourceReference) MarshalBinary

func (m *APIResourceReference) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIResourceReference) UnmarshalBinary

func (m *APIResourceReference) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIResourceReference) Validate

func (m *APIResourceReference) Validate(formats strfmt.Registry) error

Validate validates this api resource reference

type APIResourceType

type APIResourceType string

APIResourceType api resource type swagger:model apiResourceType

const (

	// APIResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE"
	APIResourceTypeUNKNOWNRESOURCETYPE APIResourceType = "UNKNOWN_RESOURCE_TYPE"

	// APIResourceTypeEXPERIMENT captures enum value "EXPERIMENT"
	APIResourceTypeEXPERIMENT APIResourceType = "EXPERIMENT"

	// APIResourceTypeJOB captures enum value "JOB"
	APIResourceTypeJOB APIResourceType = "JOB"

	// APIResourceTypePIPELINE captures enum value "PIPELINE"
	APIResourceTypePIPELINE APIResourceType = "PIPELINE"

	// APIResourceTypePIPELINEVERSION captures enum value "PIPELINE_VERSION"
	APIResourceTypePIPELINEVERSION APIResourceType = "PIPELINE_VERSION"

	// APIResourceTypeNAMESPACE captures enum value "NAMESPACE"
	APIResourceTypeNAMESPACE APIResourceType = "NAMESPACE"
)

func (APIResourceType) Validate

func (m APIResourceType) Validate(formats strfmt.Registry) error

Validate validates this api resource type

type APIStatus

type APIStatus struct {

	// code
	Code int32 `json:"code,omitempty"`

	// details
	Details []*ProtobufAny `json:"details"`

	// error
	Error string `json:"error,omitempty"`
}

APIStatus api status swagger:model apiStatus

func (*APIStatus) MarshalBinary

func (m *APIStatus) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIStatus) UnmarshalBinary

func (m *APIStatus) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIStatus) Validate

func (m *APIStatus) Validate(formats strfmt.Registry) error

Validate validates this api status

type APITrigger

type APITrigger struct {

	// cron schedule
	CronSchedule *APICronSchedule `json:"cron_schedule,omitempty"`

	// periodic schedule
	PeriodicSchedule *APIPeriodicSchedule `json:"periodic_schedule,omitempty"`
}

APITrigger Trigger defines what starts a pipeline run. swagger:model apiTrigger

func (*APITrigger) MarshalBinary

func (m *APITrigger) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APITrigger) UnmarshalBinary

func (m *APITrigger) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APITrigger) Validate

func (m *APITrigger) Validate(formats strfmt.Registry) error

Validate validates this api trigger

type JobMode

type JobMode string

JobMode Required input.

  • DISABLED: The job won't schedule any run if disabled.

swagger:model JobMode

const (

	// JobModeUNKNOWNMODE captures enum value "UNKNOWN_MODE"
	JobModeUNKNOWNMODE JobMode = "UNKNOWN_MODE"

	// JobModeENABLED captures enum value "ENABLED"
	JobModeENABLED JobMode = "ENABLED"

	// JobModeDISABLED captures enum value "DISABLED"
	JobModeDISABLED JobMode = "DISABLED"
)

func (JobMode) Validate

func (m JobMode) Validate(formats strfmt.Registry) error

Validate validates this job mode

type ProtobufAny

type ProtobufAny struct {

	// A URL/resource name that uniquely identifies the type of the serialized
	// protocol buffer message. The last segment of the URL's path must represent
	// the fully qualified name of the type (as in
	// `path/google.protobuf.Duration`). The name should be in a canonical form
	// (e.g., leading "." is not accepted).
	//
	// In practice, teams usually precompile into the binary all types that they
	// expect it to use in the context of Any. However, for URLs which use the
	// scheme `http`, `https`, or no scheme, one can optionally set up a type
	// server that maps type URLs to message definitions as follows:
	//
	// * If no scheme is provided, `https` is assumed.
	// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
	//   value in binary format, or produce an error.
	// * Applications are allowed to cache lookup results based on the
	//   URL, or have them precompiled into a binary to avoid any
	//   lookup. Therefore, binary compatibility needs to be preserved
	//   on changes to types. (Use versioned type names to manage
	//   breaking changes.)
	//
	// Note: this functionality is not currently available in the official
	// protobuf release, and it is not used for type URLs beginning with
	// type.googleapis.com.
	//
	// Schemes other than `http`, `https` (or the empty scheme) might be
	// used with implementation specific semantics.
	TypeURL string `json:"type_url,omitempty"`

	// Must be a valid serialized protocol buffer of the above specified type.
	// Format: byte
	Value strfmt.Base64 `json:"value,omitempty"`
}

ProtobufAny `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.

Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.

Example 1: Pack and unpack a message in C++.

Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
  ...
}

Example 2: Pack and unpack a message in Java.

   Foo foo = ...;
   Any any = Any.pack(foo);
   ...
   if (any.is(Foo.class)) {
     foo = any.unpack(Foo.class);
   }

Example 3: Pack and unpack a message in Python.

   foo = Foo(...)
   any = Any()
   any.Pack(foo)
   ...
   if any.Is(Foo.DESCRIPTOR):
     any.Unpack(foo)
     ...

Example 4: Pack and unpack a message in Go

    foo := &pb.Foo{...}
    any, err := ptypes.MarshalAny(foo)
    ...
    foo := &pb.Foo{}
    if err := ptypes.UnmarshalAny(any, foo); err != nil {
      ...
    }

The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z".

JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:

package google.profile;
message Person {
  string first_name = 1;
  string last_name = 2;
}

{
  "@type": "type.googleapis.com/google.profile.Person",
  "firstName": <string>,
  "lastName": <string>
}

If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):

{
  "@type": "type.googleapis.com/google.protobuf.Duration",
  "value": "1.212s"
}

swagger:model protobufAny

func (*ProtobufAny) MarshalBinary

func (m *ProtobufAny) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ProtobufAny) UnmarshalBinary

func (m *ProtobufAny) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ProtobufAny) Validate

func (m *ProtobufAny) Validate(formats strfmt.Registry) error

Validate validates this protobuf any

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL