-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_filter_search.go
164 lines (133 loc) · 4.45 KB
/
model_filter_search.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
/*
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 FilterSearch type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FilterSearch{}
// FilterSearch Filter search data.
type FilterSearch struct {
// List of advanced search filters.
SearchFilters []SearchFilter4 `json:"SearchFilters,omitempty"`
SortCriteria *SortingMethod4 `json:"SortCriteria,omitempty"`
}
// NewFilterSearch instantiates a new FilterSearch 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 NewFilterSearch() *FilterSearch {
this := FilterSearch{}
return &this
}
// NewFilterSearchWithDefaults instantiates a new FilterSearch 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 NewFilterSearchWithDefaults() *FilterSearch {
this := FilterSearch{}
return &this
}
// GetSearchFilters returns the SearchFilters field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *FilterSearch) GetSearchFilters() []SearchFilter4 {
if o == nil {
var ret []SearchFilter4
return ret
}
return o.SearchFilters
}
// GetSearchFiltersOk returns a tuple with the SearchFilters 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 *FilterSearch) GetSearchFiltersOk() ([]SearchFilter4, bool) {
if o == nil || IsNil(o.SearchFilters) {
return nil, false
}
return o.SearchFilters, true
}
// HasSearchFilters returns a boolean if a field has been set.
func (o *FilterSearch) HasSearchFilters() bool {
if o != nil && IsNil(o.SearchFilters) {
return true
}
return false
}
// SetSearchFilters gets a reference to the given []SearchFilter4 and assigns it to the SearchFilters field.
func (o *FilterSearch) SetSearchFilters(v []SearchFilter4) {
o.SearchFilters = v
}
// GetSortCriteria returns the SortCriteria field value if set, zero value otherwise.
func (o *FilterSearch) GetSortCriteria() SortingMethod4 {
if o == nil || IsNil(o.SortCriteria) {
var ret SortingMethod4
return ret
}
return *o.SortCriteria
}
// GetSortCriteriaOk returns a tuple with the SortCriteria field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FilterSearch) GetSortCriteriaOk() (*SortingMethod4, bool) {
if o == nil || IsNil(o.SortCriteria) {
return nil, false
}
return o.SortCriteria, true
}
// HasSortCriteria returns a boolean if a field has been set.
func (o *FilterSearch) HasSortCriteria() bool {
if o != nil && !IsNil(o.SortCriteria) {
return true
}
return false
}
// SetSortCriteria gets a reference to the given SortingMethod4 and assigns it to the SortCriteria field.
func (o *FilterSearch) SetSortCriteria(v SortingMethod4) {
o.SortCriteria = &v
}
func (o FilterSearch) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FilterSearch) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.SearchFilters != nil {
toSerialize["SearchFilters"] = o.SearchFilters
}
if !IsNil(o.SortCriteria) {
toSerialize["SortCriteria"] = o.SortCriteria
}
return toSerialize, nil
}
type NullableFilterSearch struct {
value *FilterSearch
isSet bool
}
func (v NullableFilterSearch) Get() *FilterSearch {
return v.value
}
func (v *NullableFilterSearch) Set(val *FilterSearch) {
v.value = val
v.isSet = true
}
func (v NullableFilterSearch) IsSet() bool {
return v.isSet
}
func (v *NullableFilterSearch) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFilterSearch(val *FilterSearch) *NullableFilterSearch {
return &NullableFilterSearch{value: val, isSet: true}
}
func (v NullableFilterSearch) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFilterSearch) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}