1 Star 0 Fork 0

pengchengduan / goharbor-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
schedule.go 2.70 KB
一键复制 编辑 原始数据 按行查看 历史
pengchengduan 提交于 2024-02-01 17:28 . first commit
// Code generated by go-swagger; DO NOT EDIT.
package model
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// Schedule schedule
//
// swagger:model Schedule
type Schedule struct {
// the creation time of the schedule.
// Read Only: true
// Format: date-time
CreationTime strfmt.DateTime `json:"creation_time,omitempty"`
// The id of the schedule.
// Read Only: true
ID int64 `json:"id,omitempty"`
// The parameters of schedule job
Parameters map[string]interface{} `json:"parameters,omitempty"`
// schedule
Schedule *ScheduleObj `json:"schedule,omitempty"`
// The status of the schedule.
// Read Only: true
Status string `json:"status,omitempty"`
// the update time of the schedule.
// Read Only: true
// Format: date-time
UpdateTime strfmt.DateTime `json:"update_time,omitempty"`
}
// Validate validates this schedule
func (m *Schedule) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCreationTime(formats); err != nil {
res = append(res, err)
}
if err := m.validateSchedule(formats); err != nil {
res = append(res, err)
}
if err := m.validateUpdateTime(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Schedule) validateCreationTime(formats strfmt.Registry) error {
if swag.IsZero(m.CreationTime) { // not required
return nil
}
if err := validate.FormatOf("creation_time", "body", "date-time", m.CreationTime.String(), formats); err != nil {
return err
}
return nil
}
func (m *Schedule) validateSchedule(formats strfmt.Registry) error {
if swag.IsZero(m.Schedule) { // not required
return nil
}
if m.Schedule != nil {
if err := m.Schedule.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("schedule")
}
return err
}
}
return nil
}
func (m *Schedule) validateUpdateTime(formats strfmt.Registry) error {
if swag.IsZero(m.UpdateTime) { // not required
return nil
}
if err := validate.FormatOf("update_time", "body", "date-time", m.UpdateTime.String(), formats); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *Schedule) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Schedule) UnmarshalBinary(b []byte) error {
var res Schedule
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
1
https://gitee.com/pengchengduan/goharbor-client.git
git@gitee.com:pengchengduan/goharbor-client.git
pengchengduan
goharbor-client
goharbor-client
41c6882efe91

搜索帮助

53164aa7 5694891 3bd8fe86 5694891