autogits/bots-common/gitea-generated/models/package_file.go
Adam Majer 598ecbbd5a .
2024-07-07 21:12:40 +02:00

69 lines
1.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/strfmt"
"github.com/go-openapi/swag"
)
// PackageFile PackageFile represents a package file
//
// swagger:model PackageFile
type PackageFile struct {
// hash m d5
HashMD5 string `json:"md5,omitempty"`
// hash s h a1
HashSHA1 string `json:"sha1,omitempty"`
// hash s h a256
HashSHA256 string `json:"sha256,omitempty"`
// hash s h a512
HashSHA512 string `json:"sha512,omitempty"`
// ID
ID int64 `json:"id,omitempty"`
// name
Name string `json:"name,omitempty"`
// size
Size int64 `json:"Size,omitempty"`
}
// Validate validates this package file
func (m *PackageFile) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this package file based on context it is used
func (m *PackageFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *PackageFile) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *PackageFile) UnmarshalBinary(b []byte) error {
var res PackageFile
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}