/
model_paginated_vulnerability_list.go
228 lines (189 loc) · 6.74 KB
/
model_paginated_vulnerability_list.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/*
Anchore Engine API Server
This is the Anchore Engine API. Provides the primary external API for users of the service.
API version: 0.3.0
Contact: nurmi@anchore.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package engine
import (
"encoding/json"
)
// PaginatedVulnerabilityList A paginated listing of vulnerability records sorted by ID in descending order
type PaginatedVulnerabilityList struct {
// The page number returned (should match the requested page query string param)
Page *string `json:"page,omitempty"`
// True if additional pages exist (page + 1) or False if this is the last page
NextPage *string `json:"next_page,omitempty"`
// The number of items sent in this response
ReturnedCount *int32 `json:"returned_count,omitempty"`
// The listing of matching vulnerabilities for the query subject to pagination
Vulnerabilities *[]StandaloneVulnerability `json:"vulnerabilities,omitempty"`
}
// NewPaginatedVulnerabilityList instantiates a new PaginatedVulnerabilityList object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewPaginatedVulnerabilityList() *PaginatedVulnerabilityList {
this := PaginatedVulnerabilityList{}
return &this
}
// NewPaginatedVulnerabilityListWithDefaults instantiates a new PaginatedVulnerabilityList object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewPaginatedVulnerabilityListWithDefaults() *PaginatedVulnerabilityList {
this := PaginatedVulnerabilityList{}
return &this
}
// GetPage returns the Page field value if set, zero value otherwise.
func (o *PaginatedVulnerabilityList) GetPage() string {
if o == nil || o.Page == nil {
var ret string
return ret
}
return *o.Page
}
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PaginatedVulnerabilityList) GetPageOk() (*string, bool) {
if o == nil || o.Page == nil {
return nil, false
}
return o.Page, true
}
// HasPage returns a boolean if a field has been set.
func (o *PaginatedVulnerabilityList) HasPage() bool {
if o != nil && o.Page != nil {
return true
}
return false
}
// SetPage gets a reference to the given string and assigns it to the Page field.
func (o *PaginatedVulnerabilityList) SetPage(v string) {
o.Page = &v
}
// GetNextPage returns the NextPage field value if set, zero value otherwise.
func (o *PaginatedVulnerabilityList) GetNextPage() string {
if o == nil || o.NextPage == nil {
var ret string
return ret
}
return *o.NextPage
}
// GetNextPageOk returns a tuple with the NextPage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PaginatedVulnerabilityList) GetNextPageOk() (*string, bool) {
if o == nil || o.NextPage == nil {
return nil, false
}
return o.NextPage, true
}
// HasNextPage returns a boolean if a field has been set.
func (o *PaginatedVulnerabilityList) HasNextPage() bool {
if o != nil && o.NextPage != nil {
return true
}
return false
}
// SetNextPage gets a reference to the given string and assigns it to the NextPage field.
func (o *PaginatedVulnerabilityList) SetNextPage(v string) {
o.NextPage = &v
}
// GetReturnedCount returns the ReturnedCount field value if set, zero value otherwise.
func (o *PaginatedVulnerabilityList) GetReturnedCount() int32 {
if o == nil || o.ReturnedCount == nil {
var ret int32
return ret
}
return *o.ReturnedCount
}
// GetReturnedCountOk returns a tuple with the ReturnedCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PaginatedVulnerabilityList) GetReturnedCountOk() (*int32, bool) {
if o == nil || o.ReturnedCount == nil {
return nil, false
}
return o.ReturnedCount, true
}
// HasReturnedCount returns a boolean if a field has been set.
func (o *PaginatedVulnerabilityList) HasReturnedCount() bool {
if o != nil && o.ReturnedCount != nil {
return true
}
return false
}
// SetReturnedCount gets a reference to the given int32 and assigns it to the ReturnedCount field.
func (o *PaginatedVulnerabilityList) SetReturnedCount(v int32) {
o.ReturnedCount = &v
}
// GetVulnerabilities returns the Vulnerabilities field value if set, zero value otherwise.
func (o *PaginatedVulnerabilityList) GetVulnerabilities() []StandaloneVulnerability {
if o == nil || o.Vulnerabilities == nil {
var ret []StandaloneVulnerability
return ret
}
return *o.Vulnerabilities
}
// GetVulnerabilitiesOk returns a tuple with the Vulnerabilities field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PaginatedVulnerabilityList) GetVulnerabilitiesOk() (*[]StandaloneVulnerability, bool) {
if o == nil || o.Vulnerabilities == nil {
return nil, false
}
return o.Vulnerabilities, true
}
// HasVulnerabilities returns a boolean if a field has been set.
func (o *PaginatedVulnerabilityList) HasVulnerabilities() bool {
if o != nil && o.Vulnerabilities != nil {
return true
}
return false
}
// SetVulnerabilities gets a reference to the given []StandaloneVulnerability and assigns it to the Vulnerabilities field.
func (o *PaginatedVulnerabilityList) SetVulnerabilities(v []StandaloneVulnerability) {
o.Vulnerabilities = &v
}
func (o PaginatedVulnerabilityList) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Page != nil {
toSerialize["page"] = o.Page
}
if o.NextPage != nil {
toSerialize["next_page"] = o.NextPage
}
if o.ReturnedCount != nil {
toSerialize["returned_count"] = o.ReturnedCount
}
if o.Vulnerabilities != nil {
toSerialize["vulnerabilities"] = o.Vulnerabilities
}
return json.Marshal(toSerialize)
}
type NullablePaginatedVulnerabilityList struct {
value *PaginatedVulnerabilityList
isSet bool
}
func (v NullablePaginatedVulnerabilityList) Get() *PaginatedVulnerabilityList {
return v.value
}
func (v *NullablePaginatedVulnerabilityList) Set(val *PaginatedVulnerabilityList) {
v.value = val
v.isSet = true
}
func (v NullablePaginatedVulnerabilityList) IsSet() bool {
return v.isSet
}
func (v *NullablePaginatedVulnerabilityList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePaginatedVulnerabilityList(val *PaginatedVulnerabilityList) *NullablePaginatedVulnerabilityList {
return &NullablePaginatedVulnerabilityList{value: val, isSet: true}
}
func (v NullablePaginatedVulnerabilityList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePaginatedVulnerabilityList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}