common: update gitea APIs
This commit is contained in:
144
common/gitea-generated/models/action_task.go
Normal file
144
common/gitea-generated/models/action_task.go
Normal file
@@ -0,0 +1,144 @@
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ActionTask ActionTask represents a ActionTask
|
||||
//
|
||||
// swagger:model ActionTask
|
||||
type ActionTask struct {
|
||||
|
||||
// created at
|
||||
// Format: date-time
|
||||
CreatedAt strfmt.DateTime `json:"created_at,omitempty"`
|
||||
|
||||
// display title
|
||||
DisplayTitle string `json:"display_title,omitempty"`
|
||||
|
||||
// event
|
||||
Event string `json:"event,omitempty"`
|
||||
|
||||
// head branch
|
||||
HeadBranch string `json:"head_branch,omitempty"`
|
||||
|
||||
// head s h a
|
||||
HeadSHA string `json:"head_sha,omitempty"`
|
||||
|
||||
// ID
|
||||
ID int64 `json:"id,omitempty"`
|
||||
|
||||
// name
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// run number
|
||||
RunNumber int64 `json:"run_number,omitempty"`
|
||||
|
||||
// run started at
|
||||
// Format: date-time
|
||||
RunStartedAt strfmt.DateTime `json:"run_started_at,omitempty"`
|
||||
|
||||
// status
|
||||
Status string `json:"status,omitempty"`
|
||||
|
||||
// URL
|
||||
URL string `json:"url,omitempty"`
|
||||
|
||||
// updated at
|
||||
// Format: date-time
|
||||
UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"`
|
||||
|
||||
// workflow ID
|
||||
WorkflowID string `json:"workflow_id,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this action task
|
||||
func (m *ActionTask) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateCreatedAt(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateRunStartedAt(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 *ActionTask) 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 *ActionTask) validateRunStartedAt(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.RunStartedAt) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := validate.FormatOf("run_started_at", "body", "date-time", m.RunStartedAt.String(), formats); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ActionTask) 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 task based on context it is used
|
||||
func (m *ActionTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *ActionTask) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *ActionTask) UnmarshalBinary(b []byte) error {
|
||||
var res ActionTask
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user