/
task_collection_task_collection.go
128 lines (90 loc) · 2.64 KB
/
task_collection_task_collection.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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 (
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/errors"
)
/*TaskCollectionTaskCollection task collection task collection
swagger:model TaskCollection_TaskCollection
*/
type TaskCollectionTaskCollection struct {
/* at odata context
Read Only: true
*/
AtOdataContext strfmt.URI `json:"@odata.context,omitempty"`
/* at odata id
Read Only: true
*/
AtOdataID strfmt.URI `json:"@odata.id,omitempty"`
/* at odata type
Read Only: true
*/
AtOdataType string `json:"@odata.type,omitempty"`
/* Provides a description of this resource and is used for commonality in the schema definitions.
Read Only: true
*/
Description string `json:"Description,omitempty"`
/* Contains the members of this collection.
Read Only: true
*/
Members []*Odata400IDRef `json:"Members,omitempty"`
/* members at odata count
Read Only: true
*/
MembersAtOdataCount float64 `json:"Members@odata.count,omitempty"`
/* members at odata navigation link
*/
MembersAtOdataNavigationLink *Odata400IDRef `json:"Members@odata.navigationLink,omitempty"`
/* The name of the resource or array element.
Read Only: true
*/
Name string `json:"Name,omitempty"`
/* This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections.
*/
Oem ResourceOem `json:"Oem,omitempty"`
}
// Validate validates this task collection task collection
func (m *TaskCollectionTaskCollection) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateMembers(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateMembersAtOdataNavigationLink(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *TaskCollectionTaskCollection) validateMembers(formats strfmt.Registry) error {
if swag.IsZero(m.Members) { // not required
return nil
}
for i := 0; i < len(m.Members); i++ {
if swag.IsZero(m.Members[i]) { // not required
continue
}
if m.Members[i] != nil {
if err := m.Members[i].Validate(formats); err != nil {
return err
}
}
}
return nil
}
func (m *TaskCollectionTaskCollection) validateMembersAtOdataNavigationLink(formats strfmt.Registry) error {
if swag.IsZero(m.MembersAtOdataNavigationLink) { // not required
return nil
}
if m.MembersAtOdataNavigationLink != nil {
if err := m.MembersAtOdataNavigationLink.Validate(formats); err != nil {
return err
}
}
return nil
}