forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
552 lines (502 loc) · 22.5 KB
/
models.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
package automanage
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/automanage/mgmt/2020-06-30-preview/automanage"
// Account definition of the Automanage account.
type Account struct {
autorest.Response `json:"-"`
// Identity - The identity of the Automanage account.
Identity *AccountIdentity `json:"identity,omitempty"`
// Tags - Resource tags.
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for Account.
func (a Account) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if a.Identity != nil {
objectMap["identity"] = a.Identity
}
if a.Tags != nil {
objectMap["tags"] = a.Tags
}
if a.Location != nil {
objectMap["location"] = a.Location
}
return json.Marshal(objectMap)
}
// AccountIdentity identity for the Automanage account.
type AccountIdentity struct {
// PrincipalID - READ-ONLY; The principal id of Automanage account identity.
PrincipalID *string `json:"principalId,omitempty"`
// TenantID - READ-ONLY; The tenant id associated with the Automanage account.
TenantID *string `json:"tenantId,omitempty"`
// Type - The type of identity used for the Automanage account. Currently, the only supported type is 'SystemAssigned', which implicitly creates an identity. Possible values include: 'SystemAssigned', 'None'
Type ResourceIdentityType `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AccountIdentity.
func (ai AccountIdentity) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ai.Type != "" {
objectMap["type"] = ai.Type
}
return json.Marshal(objectMap)
}
// AccountList the response of the list Account operation.
type AccountList struct {
autorest.Response `json:"-"`
// Value - Result of the list Account operation.
Value *[]Account `json:"value,omitempty"`
}
// AccountUpdate definition of the Automanage account.
type AccountUpdate struct {
// Identity - The identity of the Automanage account.
Identity *AccountIdentity `json:"identity,omitempty"`
// Tags - The tags of the resource.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for AccountUpdate.
func (au AccountUpdate) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if au.Identity != nil {
objectMap["identity"] = au.Identity
}
if au.Tags != nil {
objectMap["tags"] = au.Tags
}
return json.Marshal(objectMap)
}
// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
type AzureEntityResource struct {
// Etag - READ-ONLY; Resource Etag.
Etag *string `json:"etag,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureEntityResource.
func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ConfigurationProfileAssignment configuration profile assignment is an association between a VM and
// automanage profile configuration.
type ConfigurationProfileAssignment struct {
autorest.Response `json:"-"`
// Properties - Properties of the configuration profile assignment.
Properties *ConfigurationProfileAssignmentProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for ConfigurationProfileAssignment.
func (cpa ConfigurationProfileAssignment) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cpa.Properties != nil {
objectMap["properties"] = cpa.Properties
}
return json.Marshal(objectMap)
}
// ConfigurationProfileAssignmentCompliance the compliance status for the configuration profile assignment.
type ConfigurationProfileAssignmentCompliance struct {
// UpdateStatus - READ-ONLY; The state of compliance, which only appears in the response. Possible values include: 'UpdateStatusSucceeded', 'UpdateStatusFailed', 'UpdateStatusCreated'
UpdateStatus UpdateStatus `json:"updateStatus,omitempty"`
}
// MarshalJSON is the custom marshaler for ConfigurationProfileAssignmentCompliance.
func (cpac ConfigurationProfileAssignmentCompliance) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ConfigurationProfileAssignmentList the response of the list configuration profile assignment operation.
type ConfigurationProfileAssignmentList struct {
autorest.Response `json:"-"`
// Value - Result of the list configuration profile assignment operation.
Value *[]ConfigurationProfileAssignment `json:"value,omitempty"`
}
// ConfigurationProfileAssignmentProperties automanage configuration profile assignment properties.
type ConfigurationProfileAssignmentProperties struct {
// ConfigurationProfile - A value indicating configuration profile. Possible values include: 'AzurevirtualmachinebestpracticesDevTest', 'AzurevirtualmachinebestpracticesProduction'
ConfigurationProfile ConfigurationProfile `json:"configurationProfile,omitempty"`
// TargetID - The target VM resource URI
TargetID *string `json:"targetId,omitempty"`
// AccountID - The Automanage account ARM Resource URI
AccountID *string `json:"accountId,omitempty"`
// ConfigurationProfilePreferenceID - The configuration profile custom preferences ARM resource URI
ConfigurationProfilePreferenceID *string `json:"configurationProfilePreferenceId,omitempty"`
// ProvisioningState - READ-ONLY; The state of onboarding, which only appears in the response. Possible values include: 'Succeeded', 'Failed', 'Created'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Compliance - The configuration setting for the configuration profile.
Compliance *ConfigurationProfileAssignmentCompliance `json:"compliance,omitempty"`
}
// MarshalJSON is the custom marshaler for ConfigurationProfileAssignmentProperties.
func (cpap ConfigurationProfileAssignmentProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cpap.ConfigurationProfile != "" {
objectMap["configurationProfile"] = cpap.ConfigurationProfile
}
if cpap.TargetID != nil {
objectMap["targetId"] = cpap.TargetID
}
if cpap.AccountID != nil {
objectMap["accountId"] = cpap.AccountID
}
if cpap.ConfigurationProfilePreferenceID != nil {
objectMap["configurationProfilePreferenceId"] = cpap.ConfigurationProfilePreferenceID
}
if cpap.Compliance != nil {
objectMap["compliance"] = cpap.Compliance
}
return json.Marshal(objectMap)
}
// ConfigurationProfileAssignmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type ConfigurationProfileAssignmentsCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(ConfigurationProfileAssignmentsClient) (ConfigurationProfileAssignment, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *ConfigurationProfileAssignmentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for ConfigurationProfileAssignmentsCreateOrUpdateFuture.Result.
func (future *ConfigurationProfileAssignmentsCreateOrUpdateFuture) result(client ConfigurationProfileAssignmentsClient) (cpa ConfigurationProfileAssignment, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "automanage.ConfigurationProfileAssignmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
cpa.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("automanage.ConfigurationProfileAssignmentsCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if cpa.Response.Response, err = future.GetResult(sender); err == nil && cpa.Response.Response.StatusCode != http.StatusNoContent {
cpa, err = client.CreateOrUpdateResponder(cpa.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "automanage.ConfigurationProfileAssignmentsCreateOrUpdateFuture", "Result", cpa.Response.Response, "Failure responding to request")
}
}
return
}
// ConfigurationProfilePreference definition of the configuration profile preference.
type ConfigurationProfilePreference struct {
autorest.Response `json:"-"`
// Properties - Properties of the configuration profile preference.
Properties *ConfigurationProfilePreferenceProperties `json:"properties,omitempty"`
// Tags - Resource tags.
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for ConfigurationProfilePreference.
func (cpp ConfigurationProfilePreference) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cpp.Properties != nil {
objectMap["properties"] = cpp.Properties
}
if cpp.Tags != nil {
objectMap["tags"] = cpp.Tags
}
if cpp.Location != nil {
objectMap["location"] = cpp.Location
}
return json.Marshal(objectMap)
}
// ConfigurationProfilePreferenceAntiMalware automanage configuration profile Antimalware preferences.
type ConfigurationProfilePreferenceAntiMalware struct {
// EnableRealTimeProtection - Enables or disables Real Time Protection. Possible values include: 'True', 'False'
EnableRealTimeProtection EnableRealTimeProtection `json:"enableRealTimeProtection,omitempty"`
// Exclusions - Extensions, Paths and Processes that must be excluded from scan
Exclusions interface{} `json:"exclusions,omitempty"`
// RunScheduledScan - Enables or disables a periodic scan for antimalware. Possible values include: 'RunScheduledScanTrue', 'RunScheduledScanFalse'
RunScheduledScan RunScheduledScan `json:"runScheduledScan,omitempty"`
// ScanType - Type of scheduled scan. Possible values include: 'Quick', 'Full'
ScanType ScanType `json:"scanType,omitempty"`
// ScanDay - Schedule scan settings day
ScanDay *string `json:"scanDay,omitempty"`
// ScanTimeInMinutes - Schedule scan settings time
ScanTimeInMinutes *string `json:"scanTimeInMinutes,omitempty"`
}
// ConfigurationProfilePreferenceList the response of the list ConfigurationProfilePreference operation.
type ConfigurationProfilePreferenceList struct {
autorest.Response `json:"-"`
// Value - Result of the list ConfigurationProfilePreference operation.
Value *[]ConfigurationProfilePreference `json:"value,omitempty"`
}
// ConfigurationProfilePreferenceProperties automanage configuration profile preference properties.
type ConfigurationProfilePreferenceProperties struct {
// VMBackup - The custom preferences for Azure VM Backup.
VMBackup *ConfigurationProfilePreferenceVMBackup `json:"vmBackup,omitempty"`
// AntiMalware - The custom preferences for Azure Antimalware.
AntiMalware *ConfigurationProfilePreferenceAntiMalware `json:"antiMalware,omitempty"`
}
// ConfigurationProfilePreferenceUpdate definition of the configuration profile preference.
type ConfigurationProfilePreferenceUpdate struct {
// Properties - Properties of the configuration profile preference.
Properties *ConfigurationProfilePreferenceProperties `json:"properties,omitempty"`
// Tags - The tags of the resource.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for ConfigurationProfilePreferenceUpdate.
func (cppu ConfigurationProfilePreferenceUpdate) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cppu.Properties != nil {
objectMap["properties"] = cppu.Properties
}
if cppu.Tags != nil {
objectMap["tags"] = cppu.Tags
}
return json.Marshal(objectMap)
}
// ConfigurationProfilePreferenceVMBackup automanage configuration profile VM Backup preferences.
type ConfigurationProfilePreferenceVMBackup struct {
// TimeZone - TimeZone optional input as string. For example: Pacific Standard Time
TimeZone *string `json:"timeZone,omitempty"`
// InstantRpRetentionRangeInDays - Instant RP retention policy range in days
InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`
// RetentionPolicy - Retention policy with the details on backup copy retention ranges.
RetentionPolicy *string `json:"retentionPolicy,omitempty"`
// SchedulePolicy - Backup schedule specified as part of backup policy.
SchedulePolicy *string `json:"schedulePolicy,omitempty"`
}
// ErrorAdditionalInfo the resource management error additional info.
type ErrorAdditionalInfo struct {
// Type - READ-ONLY; The additional info type.
Type *string `json:"type,omitempty"`
// Info - READ-ONLY; The additional info.
Info interface{} `json:"info,omitempty"`
}
// MarshalJSON is the custom marshaler for ErrorAdditionalInfo.
func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ErrorDetail the error detail.
type ErrorDetail struct {
// Code - READ-ONLY; The error code.
Code *string `json:"code,omitempty"`
// Message - READ-ONLY; The error message.
Message *string `json:"message,omitempty"`
// Target - READ-ONLY; The error target.
Target *string `json:"target,omitempty"`
// Details - READ-ONLY; The error details.
Details *[]ErrorDetail `json:"details,omitempty"`
// AdditionalInfo - READ-ONLY; The error additional info.
AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
}
// MarshalJSON is the custom marshaler for ErrorDetail.
func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for
// failed operations. (This also follows the OData error response format.).
type ErrorResponse struct {
// Error - The error object.
Error *ErrorDetail `json:"error,omitempty"`
}
// Operation automanage REST API operation
type Operation struct {
// Name - Operation name: For ex. providers/Microsoft.Automanage/configurationProfileAssignments/write or read
Name *string `json:"name,omitempty"`
// IsDataAction - Indicates whether the operation is a data action
IsDataAction *string `json:"isDataAction,omitempty"`
// Display - Provider, Resource, Operation and description values.
Display *OperationDisplay `json:"display,omitempty"`
// OperationProperties - Provider, Resource, Operation and description values.
*OperationProperties `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for Operation.
func (o Operation) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if o.Name != nil {
objectMap["name"] = o.Name
}
if o.IsDataAction != nil {
objectMap["isDataAction"] = o.IsDataAction
}
if o.Display != nil {
objectMap["display"] = o.Display
}
if o.OperationProperties != nil {
objectMap["properties"] = o.OperationProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Operation struct.
func (o *Operation) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
o.Name = &name
}
case "isDataAction":
if v != nil {
var isDataAction string
err = json.Unmarshal(*v, &isDataAction)
if err != nil {
return err
}
o.IsDataAction = &isDataAction
}
case "display":
if v != nil {
var display OperationDisplay
err = json.Unmarshal(*v, &display)
if err != nil {
return err
}
o.Display = &display
}
case "properties":
if v != nil {
var operationProperties OperationProperties
err = json.Unmarshal(*v, &operationProperties)
if err != nil {
return err
}
o.OperationProperties = &operationProperties
}
}
}
return nil
}
// OperationDisplay provider, Resource, Operation and description values.
type OperationDisplay struct {
// Provider - Service provider: Microsoft.Automanage
Provider *string `json:"provider,omitempty"`
// Resource - Resource on which the operation is performed: For ex.
Resource *string `json:"resource,omitempty"`
// Operation - Operation type: Read, write, delete, etc.
Operation *string `json:"operation,omitempty"`
// Description - Description about operation.
Description *string `json:"description,omitempty"`
}
// OperationList the response model for the list of Automanage operations
type OperationList struct {
autorest.Response `json:"-"`
// Value - List of Automanage operations supported by the Automanage resource provider.
Value *[]Operation `json:"value,omitempty"`
}
// OperationProperties provider, Resource, Operation and description values.
type OperationProperties struct {
// StatusCode - Service provider: Microsoft.Automanage
StatusCode *string `json:"statusCode,omitempty"`
}
// ProxyResource the resource model definition for an Azure Resource Manager proxy resource. It will have
// everything other than required location and tags
type ProxyResource struct {
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for ProxyResource.
func (pr ProxyResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// Resource common fields that are returned in the response for all Azure Resource Manager resources
type Resource struct {
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for Resource.
func (r Resource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
type TrackedResource struct {
// Tags - Resource tags.
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for TrackedResource.
func (tr TrackedResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if tr.Tags != nil {
objectMap["tags"] = tr.Tags
}
if tr.Location != nil {
objectMap["location"] = tr.Location
}
return json.Marshal(objectMap)
}
// UpdateResource represents an update resource
type UpdateResource struct {
// Tags - The tags of the resource.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for UpdateResource.
func (ur UpdateResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ur.Tags != nil {
objectMap["tags"] = ur.Tags
}
return json.Marshal(objectMap)
}