136 lines
3.2 KiB
Go
136 lines
3.2 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"
|
|
)
|
|
|
|
// ActionWorkflow ActionWorkflow represents a ActionWorkflow
|
|
//
|
|
// swagger:model ActionWorkflow
|
|
type ActionWorkflow struct {
|
|
|
|
// BadgeURL is the URL for the workflow badge
|
|
BadgeURL string `json:"badge_url,omitempty"`
|
|
|
|
// created at
|
|
// Format: date-time
|
|
CreatedAt strfmt.DateTime `json:"created_at,omitempty"`
|
|
|
|
// deleted at
|
|
// Format: date-time
|
|
DeletedAt strfmt.DateTime `json:"deleted_at,omitempty"`
|
|
|
|
// HTMLURL is the web URL for viewing the workflow
|
|
HTMLURL string `json:"html_url,omitempty"`
|
|
|
|
// ID is the unique identifier for the workflow
|
|
ID string `json:"id,omitempty"`
|
|
|
|
// Name is the name of the workflow
|
|
Name string `json:"name,omitempty"`
|
|
|
|
// Path is the file path of the workflow
|
|
Path string `json:"path,omitempty"`
|
|
|
|
// State indicates if the workflow is active or disabled
|
|
State string `json:"state,omitempty"`
|
|
|
|
// URL is the API URL for this workflow
|
|
URL string `json:"url,omitempty"`
|
|
|
|
// updated at
|
|
// Format: date-time
|
|
UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"`
|
|
}
|
|
|
|
// Validate validates this action workflow
|
|
func (m *ActionWorkflow) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateCreatedAt(formats); err != nil {
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateDeletedAt(formats); err != nil {
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateUpdatedAt(formats); err != nil {
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ActionWorkflow) validateCreatedAt(formats strfmt.Registry) error {
|
|
if swag.IsZero(m.CreatedAt) { // not required
|
|
return nil
|
|
}
|
|
|
|
if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *ActionWorkflow) validateDeletedAt(formats strfmt.Registry) error {
|
|
if swag.IsZero(m.DeletedAt) { // not required
|
|
return nil
|
|
}
|
|
|
|
if err := validate.FormatOf("deleted_at", "body", "date-time", m.DeletedAt.String(), formats); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *ActionWorkflow) validateUpdatedAt(formats strfmt.Registry) error {
|
|
if swag.IsZero(m.UpdatedAt) { // not required
|
|
return nil
|
|
}
|
|
|
|
if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// ContextValidate validates this action workflow based on context it is used
|
|
func (m *ActionWorkflow) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *ActionWorkflow) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *ActionWorkflow) UnmarshalBinary(b []byte) error {
|
|
var res ActionWorkflow
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|