forked from AliyunContainerService/pouch
/
search_result_item.go
72 lines (52 loc) · 1.76 KB
/
search_result_item.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Code generated by go-swagger; DO NOT EDIT.
package types
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
"github.com/go-openapi/swag"
)
// SearchResultItem search result item in search results.
// swagger:model SearchResultItem
type SearchResultItem struct {
// description just shows the description of this image
Description string `json:"description,omitempty"`
// is_automated means whether this image is automated.
IsAutomated bool `json:"is_automated,omitempty"`
// is_official shows if this image is marked official.
IsOfficial bool `json:"is_official,omitempty"`
// name represents the name of this image
Name string `json:"name,omitempty"`
// star_count refers to the star count of this image.
StarCount int64 `json:"star_count,omitempty"`
}
/* polymorph SearchResultItem description false */
/* polymorph SearchResultItem is_automated false */
/* polymorph SearchResultItem is_official false */
/* polymorph SearchResultItem name false */
/* polymorph SearchResultItem star_count false */
// Validate validates this search result item
func (m *SearchResultItem) Validate(formats strfmt.Registry) error {
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// MarshalBinary interface implementation
func (m *SearchResultItem) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *SearchResultItem) UnmarshalBinary(b []byte) error {
var res SearchResultItem
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}