-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_resource_validation_report_model.go
200 lines (164 loc) · 6.15 KB
/
model_resource_validation_report_model.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
/*
Citrix Virtual Apps and Desktops Rest API for Developer Portal
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: devportal-onprem-ga
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package citrixorchestration
import (
"encoding/json"
)
// checks if the ResourceValidationReportModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ResourceValidationReportModel{}
// ResourceValidationReportModel The validation report.
type ResourceValidationReportModel struct {
Category *ResourceValidationCategory `json:"Category,omitempty"`
Result *ResourceValidationResult `json:"Result,omitempty"`
// A list of violations.
Violations []ResourceValidationViolationModel `json:"Violations,omitempty"`
}
// NewResourceValidationReportModel instantiates a new ResourceValidationReportModel 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 NewResourceValidationReportModel() *ResourceValidationReportModel {
this := ResourceValidationReportModel{}
return &this
}
// NewResourceValidationReportModelWithDefaults instantiates a new ResourceValidationReportModel 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 NewResourceValidationReportModelWithDefaults() *ResourceValidationReportModel {
this := ResourceValidationReportModel{}
return &this
}
// GetCategory returns the Category field value if set, zero value otherwise.
func (o *ResourceValidationReportModel) GetCategory() ResourceValidationCategory {
if o == nil || IsNil(o.Category) {
var ret ResourceValidationCategory
return ret
}
return *o.Category
}
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourceValidationReportModel) GetCategoryOk() (*ResourceValidationCategory, bool) {
if o == nil || IsNil(o.Category) {
return nil, false
}
return o.Category, true
}
// HasCategory returns a boolean if a field has been set.
func (o *ResourceValidationReportModel) HasCategory() bool {
if o != nil && !IsNil(o.Category) {
return true
}
return false
}
// SetCategory gets a reference to the given ResourceValidationCategory and assigns it to the Category field.
func (o *ResourceValidationReportModel) SetCategory(v ResourceValidationCategory) {
o.Category = &v
}
// GetResult returns the Result field value if set, zero value otherwise.
func (o *ResourceValidationReportModel) GetResult() ResourceValidationResult {
if o == nil || IsNil(o.Result) {
var ret ResourceValidationResult
return ret
}
return *o.Result
}
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourceValidationReportModel) GetResultOk() (*ResourceValidationResult, bool) {
if o == nil || IsNil(o.Result) {
return nil, false
}
return o.Result, true
}
// HasResult returns a boolean if a field has been set.
func (o *ResourceValidationReportModel) HasResult() bool {
if o != nil && !IsNil(o.Result) {
return true
}
return false
}
// SetResult gets a reference to the given ResourceValidationResult and assigns it to the Result field.
func (o *ResourceValidationReportModel) SetResult(v ResourceValidationResult) {
o.Result = &v
}
// GetViolations returns the Violations field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ResourceValidationReportModel) GetViolations() []ResourceValidationViolationModel {
if o == nil {
var ret []ResourceValidationViolationModel
return ret
}
return o.Violations
}
// GetViolationsOk returns a tuple with the Violations field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ResourceValidationReportModel) GetViolationsOk() ([]ResourceValidationViolationModel, bool) {
if o == nil || IsNil(o.Violations) {
return nil, false
}
return o.Violations, true
}
// HasViolations returns a boolean if a field has been set.
func (o *ResourceValidationReportModel) HasViolations() bool {
if o != nil && IsNil(o.Violations) {
return true
}
return false
}
// SetViolations gets a reference to the given []ResourceValidationViolationModel and assigns it to the Violations field.
func (o *ResourceValidationReportModel) SetViolations(v []ResourceValidationViolationModel) {
o.Violations = v
}
func (o ResourceValidationReportModel) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ResourceValidationReportModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Category) {
toSerialize["Category"] = o.Category
}
if !IsNil(o.Result) {
toSerialize["Result"] = o.Result
}
if o.Violations != nil {
toSerialize["Violations"] = o.Violations
}
return toSerialize, nil
}
type NullableResourceValidationReportModel struct {
value *ResourceValidationReportModel
isSet bool
}
func (v NullableResourceValidationReportModel) Get() *ResourceValidationReportModel {
return v.value
}
func (v *NullableResourceValidationReportModel) Set(val *ResourceValidationReportModel) {
v.value = val
v.isSet = true
}
func (v NullableResourceValidationReportModel) IsSet() bool {
return v.isSet
}
func (v *NullableResourceValidationReportModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResourceValidationReportModel(val *ResourceValidationReportModel) *NullableResourceValidationReportModel {
return &NullableResourceValidationReportModel{value: val, isSet: true}
}
func (v NullableResourceValidationReportModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResourceValidationReportModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}