-
Notifications
You must be signed in to change notification settings - Fork 32
/
unified_rbac_resource_action.go
261 lines (259 loc) · 8.75 KB
/
unified_rbac_resource_action.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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
type UnifiedRbacResourceAction struct {
Entity
}
// NewUnifiedRbacResourceAction instantiates a new UnifiedRbacResourceAction and sets the default values.
func NewUnifiedRbacResourceAction()(*UnifiedRbacResourceAction) {
m := &UnifiedRbacResourceAction{
Entity: *NewEntity(),
}
return m
}
// CreateUnifiedRbacResourceActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateUnifiedRbacResourceActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewUnifiedRbacResourceAction(), nil
}
// GetActionVerb gets the actionVerb property value. The actionVerb property
// returns a *string when successful
func (m *UnifiedRbacResourceAction) GetActionVerb()(*string) {
val, err := m.GetBackingStore().Get("actionVerb")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetAuthenticationContextId gets the authenticationContextId property value. The authenticationContextId property
// returns a *string when successful
func (m *UnifiedRbacResourceAction) GetAuthenticationContextId()(*string) {
val, err := m.GetBackingStore().Get("authenticationContextId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetDescription gets the description property value. The description property
// returns a *string when successful
func (m *UnifiedRbacResourceAction) GetDescription()(*string) {
val, err := m.GetBackingStore().Get("description")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *UnifiedRbacResourceAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["actionVerb"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetActionVerb(val)
}
return nil
}
res["authenticationContextId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetAuthenticationContextId(val)
}
return nil
}
res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDescription(val)
}
return nil
}
res["isAuthenticationContextSettable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetIsAuthenticationContextSettable(val)
}
return nil
}
res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetName(val)
}
return nil
}
res["resourceScopeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetResourceScopeId(val)
}
return nil
}
return res
}
// GetIsAuthenticationContextSettable gets the isAuthenticationContextSettable property value. The isAuthenticationContextSettable property
// returns a *bool when successful
func (m *UnifiedRbacResourceAction) GetIsAuthenticationContextSettable()(*bool) {
val, err := m.GetBackingStore().Get("isAuthenticationContextSettable")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetName gets the name property value. The name property
// returns a *string when successful
func (m *UnifiedRbacResourceAction) GetName()(*string) {
val, err := m.GetBackingStore().Get("name")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetResourceScopeId gets the resourceScopeId property value. The resourceScopeId property
// returns a *string when successful
func (m *UnifiedRbacResourceAction) GetResourceScopeId()(*string) {
val, err := m.GetBackingStore().Get("resourceScopeId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// Serialize serializes information the current object
func (m *UnifiedRbacResourceAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteStringValue("actionVerb", m.GetActionVerb())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("authenticationContextId", m.GetAuthenticationContextId())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("description", m.GetDescription())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("isAuthenticationContextSettable", m.GetIsAuthenticationContextSettable())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("name", m.GetName())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("resourceScopeId", m.GetResourceScopeId())
if err != nil {
return err
}
}
return nil
}
// SetActionVerb sets the actionVerb property value. The actionVerb property
func (m *UnifiedRbacResourceAction) SetActionVerb(value *string)() {
err := m.GetBackingStore().Set("actionVerb", value)
if err != nil {
panic(err)
}
}
// SetAuthenticationContextId sets the authenticationContextId property value. The authenticationContextId property
func (m *UnifiedRbacResourceAction) SetAuthenticationContextId(value *string)() {
err := m.GetBackingStore().Set("authenticationContextId", value)
if err != nil {
panic(err)
}
}
// SetDescription sets the description property value. The description property
func (m *UnifiedRbacResourceAction) SetDescription(value *string)() {
err := m.GetBackingStore().Set("description", value)
if err != nil {
panic(err)
}
}
// SetIsAuthenticationContextSettable sets the isAuthenticationContextSettable property value. The isAuthenticationContextSettable property
func (m *UnifiedRbacResourceAction) SetIsAuthenticationContextSettable(value *bool)() {
err := m.GetBackingStore().Set("isAuthenticationContextSettable", value)
if err != nil {
panic(err)
}
}
// SetName sets the name property value. The name property
func (m *UnifiedRbacResourceAction) SetName(value *string)() {
err := m.GetBackingStore().Set("name", value)
if err != nil {
panic(err)
}
}
// SetResourceScopeId sets the resourceScopeId property value. The resourceScopeId property
func (m *UnifiedRbacResourceAction) SetResourceScopeId(value *string)() {
err := m.GetBackingStore().Set("resourceScopeId", value)
if err != nil {
panic(err)
}
}
type UnifiedRbacResourceActionable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetActionVerb()(*string)
GetAuthenticationContextId()(*string)
GetDescription()(*string)
GetIsAuthenticationContextSettable()(*bool)
GetName()(*string)
GetResourceScopeId()(*string)
SetActionVerb(value *string)()
SetAuthenticationContextId(value *string)()
SetDescription(value *string)()
SetIsAuthenticationContextSettable(value *bool)()
SetName(value *string)()
SetResourceScopeId(value *string)()
}