107 lines
2.4 KiB
Go
107 lines
2.4 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package models
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-openapi/errors"
|
|
"github.com/go-openapi/strfmt"
|
|
"github.com/go-openapi/swag"
|
|
"github.com/go-openapi/validate"
|
|
)
|
|
|
|
// ActionWorkflowStep ActionWorkflowStep represents a step of a WorkflowJob
|
|
//
|
|
// swagger:model ActionWorkflowStep
|
|
type ActionWorkflowStep struct {
|
|
|
|
// completed at
|
|
// Format: date-time
|
|
CompletedAt strfmt.DateTime `json:"completed_at,omitempty"`
|
|
|
|
// conclusion
|
|
Conclusion string `json:"conclusion,omitempty"`
|
|
|
|
// name
|
|
Name string `json:"name,omitempty"`
|
|
|
|
// number
|
|
Number int64 `json:"number,omitempty"`
|
|
|
|
// started at
|
|
// Format: date-time
|
|
StartedAt strfmt.DateTime `json:"started_at,omitempty"`
|
|
|
|
// status
|
|
Status string `json:"status,omitempty"`
|
|
}
|
|
|
|
// Validate validates this action workflow step
|
|
func (m *ActionWorkflowStep) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateCompletedAt(formats); err != nil {
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateStartedAt(formats); err != nil {
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ActionWorkflowStep) validateCompletedAt(formats strfmt.Registry) error {
|
|
if swag.IsZero(m.CompletedAt) { // not required
|
|
return nil
|
|
}
|
|
|
|
if err := validate.FormatOf("completed_at", "body", "date-time", m.CompletedAt.String(), formats); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *ActionWorkflowStep) validateStartedAt(formats strfmt.Registry) error {
|
|
if swag.IsZero(m.StartedAt) { // not required
|
|
return nil
|
|
}
|
|
|
|
if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// ContextValidate validates this action workflow step based on context it is used
|
|
func (m *ActionWorkflowStep) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *ActionWorkflowStep) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *ActionWorkflowStep) UnmarshalBinary(b []byte) error {
|
|
var res ActionWorkflowStep
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|