forked from Azure/azure-sdk-for-go
/
models.go
589 lines (539 loc) · 23.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
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
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 (
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/automanage/mgmt/2021-04-30-preview/automanage"
// AssignmentReportProperties data related to the report detail.
type AssignmentReportProperties struct {
// StartTime - Start time of the configuration profile assignment processing.
StartTime *string `json:"startTime,omitempty"`
// EndTime - End time of the configuration profile assignment processing.
EndTime *string `json:"endTime,omitempty"`
// LastModifiedTime - READ-ONLY; Last modified time of the configuration profile assignment processing.
LastModifiedTime *string `json:"lastModifiedTime,omitempty"`
// Duration - READ-ONLY; Duration of the configuration profile assignment processing.
Duration *string `json:"duration,omitempty"`
// Type - READ-ONLY; Type of the configuration profile assignment processing (Initial/Consistency).
Type *string `json:"type,omitempty"`
// Status - READ-ONLY; The status of the configuration profile assignment.
Status *string `json:"status,omitempty"`
// ConfigurationProfile - READ-ONLY; The configurationProfile linked to the assignment.
ConfigurationProfile *string `json:"configurationProfile,omitempty"`
// Resources - READ-ONLY; List of resources processed by the configuration profile assignment.
Resources *[]ReportResource `json:"resources,omitempty"`
// Error - READ-ONLY; Error message, if any, returned by the configuration profile assignment processing.
Error *ErrorDetail `json:"error,omitempty"`
// ReportFormatVersion - READ-ONLY; Version of the report format
ReportFormatVersion *string `json:"reportFormatVersion,omitempty"`
}
// MarshalJSON is the custom marshaler for AssignmentReportProperties.
func (arp AssignmentReportProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if arp.StartTime != nil {
objectMap["startTime"] = arp.StartTime
}
if arp.EndTime != nil {
objectMap["endTime"] = arp.EndTime
}
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)
}
// BestPractice definition of the Automanage best practice.
type BestPractice struct {
autorest.Response `json:"-"`
// ID - READ-ONLY; The fully qualified ID for the best practice. For example, /providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction
ID *string `json:"id,omitempty"`
// Type - READ-ONLY; The type of the resource. For example, Microsoft.Automanage/bestPractices
Type *string `json:"type,omitempty"`
// Name - READ-ONLY; The name of the best practice. For example, azureBestPracticesProduction
Name *string `json:"name,omitempty"`
// ConfigurationProfileProperties - Properties of the best practice.
*ConfigurationProfileProperties `json:"properties,omitempty"`
// SystemData - READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData `json:"systemData,omitempty"`
}
// MarshalJSON is the custom marshaler for BestPractice.
func (bp BestPractice) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if bp.ConfigurationProfileProperties != nil {
objectMap["properties"] = bp.ConfigurationProfileProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for BestPractice struct.
func (bp *BestPractice) 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 "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
bp.ID = &ID
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
bp.Type = &typeVar
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
bp.Name = &name
}
case "properties":
if v != nil {
var configurationProfileProperties ConfigurationProfileProperties
err = json.Unmarshal(*v, &configurationProfileProperties)
if err != nil {
return err
}
bp.ConfigurationProfileProperties = &configurationProfileProperties
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
bp.SystemData = &systemData
}
}
}
return nil
}
// BestPracticeList the response of the list best practice operation.
type BestPracticeList struct {
autorest.Response `json:"-"`
// Value - Result of the list best practice operation.
Value *[]BestPractice `json:"value,omitempty"`
}
// ConfigurationProfile definition of the configuration profile.
type ConfigurationProfile struct {
autorest.Response `json:"-"`
// Properties - Properties of the configuration profile.
Properties *ConfigurationProfileProperties `json:"properties,omitempty"`
// SystemData - READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData `json:"systemData,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 ConfigurationProfile.
func (cp ConfigurationProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cp.Properties != nil {
objectMap["properties"] = cp.Properties
}
if cp.Tags != nil {
objectMap["tags"] = cp.Tags
}
if cp.Location != nil {
objectMap["location"] = cp.Location
}
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"`
// SystemData - READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData `json:"systemData,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)
}
// 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 - The Automanage configurationProfile ARM Resource URI.
ConfigurationProfile *string `json:"configurationProfile,omitempty"`
// TargetID - The target VM resource URI
TargetID *string `json:"targetId,omitempty"`
// Status - READ-ONLY; The status of onboarding, which only appears in the response.
Status *string `json:"status,omitempty"`
// ProfileOverrides - The profileOverrides setting for the configuration profile assignment.
ProfileOverrides map[string]interface{} `json:"profileOverrides"`
}
// MarshalJSON is the custom marshaler for ConfigurationProfileAssignmentProperties.
func (cpap ConfigurationProfileAssignmentProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cpap.ConfigurationProfile != nil {
objectMap["configurationProfile"] = cpap.ConfigurationProfile
}
if cpap.TargetID != nil {
objectMap["targetId"] = cpap.TargetID
}
if cpap.ProfileOverrides != nil {
objectMap["profileOverrides"] = cpap.ProfileOverrides
}
return json.Marshal(objectMap)
}
// ConfigurationProfileList the response of the list configuration profile operation.
type ConfigurationProfileList struct {
autorest.Response `json:"-"`
// Value - Result of the list ConfigurationProfile operation.
Value *[]ConfigurationProfile `json:"value,omitempty"`
}
// ConfigurationProfileProperties automanage configuration profile properties.
type ConfigurationProfileProperties struct {
// Configuration - configuration dictionary of the configuration profile.
Configuration interface{} `json:"configuration,omitempty"`
// Overrides - overrides of the configuration profile.
Overrides *[]interface{} `json:"overrides,omitempty"`
}
// ConfigurationProfileUpdate definition of the configuration profile.
type ConfigurationProfileUpdate struct {
// Properties - Properties of the configuration profile.
Properties *ConfigurationProfileProperties `json:"properties,omitempty"`
// Tags - The tags of the resource.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for ConfigurationProfileUpdate.
func (CPU ConfigurationProfileUpdate) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if CPU.Properties != nil {
objectMap["properties"] = CPU.Properties
}
if CPU.Tags != nil {
objectMap["tags"] = CPU.Tags
}
return json.Marshal(objectMap)
}
// 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 details of a REST API operation, returned from the Resource Provider Operations API
type Operation struct {
// Name - READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
Name *string `json:"name,omitempty"`
// IsDataAction - READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations.
IsDataAction *bool `json:"isDataAction,omitempty"`
// Display - Localized display information for this particular operation.
Display *OperationDisplay `json:"display,omitempty"`
// Origin - READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". Possible values include: 'OriginUser', 'OriginSystem', 'OriginUsersystem'
Origin Origin `json:"origin,omitempty"`
// ActionType - READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. Possible values include: 'ActionTypeInternal'
ActionType ActionType `json:"actionType,omitempty"`
}
// MarshalJSON is the custom marshaler for Operation.
func (o Operation) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if o.Display != nil {
objectMap["display"] = o.Display
}
return json.Marshal(objectMap)
}
// OperationDisplay localized display information for this particular operation.
type OperationDisplay struct {
// Provider - READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
Provider *string `json:"provider,omitempty"`
// Resource - READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
Resource *string `json:"resource,omitempty"`
// Operation - READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine".
Operation *string `json:"operation,omitempty"`
// Description - READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
Description *string `json:"description,omitempty"`
}
// MarshalJSON is the custom marshaler for OperationDisplay.
func (o OperationDisplay) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// OperationListResult a list of REST API operations supported by an Azure Resource Provider. It contains
// an URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; List of operations supported by the resource provider
Value *[]Operation `json:"value,omitempty"`
// NextLink - READ-ONLY; URL to get the next set of operation list results (if there are any).
NextLink *string `json:"nextLink,omitempty"`
}
// MarshalJSON is the custom marshaler for OperationListResult.
func (olr OperationListResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
// have tags and a location
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)
}
// Report definition of the report.
type Report struct {
autorest.Response `json:"-"`
// AssignmentReportProperties - The properties for the report.
*AssignmentReportProperties `json:"properties,omitempty"`
// SystemData - READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData `json:"systemData,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 Report.
func (r Report) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if r.AssignmentReportProperties != nil {
objectMap["properties"] = r.AssignmentReportProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Report struct.
func (r *Report) 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 "properties":
if v != nil {
var assignmentReportProperties AssignmentReportProperties
err = json.Unmarshal(*v, &assignmentReportProperties)
if err != nil {
return err
}
r.AssignmentReportProperties = &assignmentReportProperties
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
r.SystemData = &systemData
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
r.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
r.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
r.Type = &typeVar
}
}
}
return nil
}
// ReportList the response of the list report operation.
type ReportList struct {
autorest.Response `json:"-"`
// Value - Result of the list report operation.
Value *[]Report `json:"value,omitempty"`
}
// ReportResource details about the resource processed by the configuration profile assignment
type ReportResource struct {
// Name - READ-ONLY; Name of the resource.
Name *string `json:"name,omitempty"`
// ID - READ-ONLY; ARM id of the resource.
ID *string `json:"id,omitempty"`
// Type - READ-ONLY; Type of the resource.
Type *string `json:"type,omitempty"`
// Status - READ-ONLY; Status of the resource.
Status *string `json:"status,omitempty"`
// Error - READ-ONLY; Error message, if any, returned when deploying the resource.
Error *ErrorDetail `json:"error,omitempty"`
}
// MarshalJSON is the custom marshaler for ReportResource.
func (rr ReportResource) 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)
}
// SystemData metadata pertaining to creation and last modification of the resource.
type SystemData struct {
// CreatedBy - The identity that created the resource.
CreatedBy *string `json:"createdBy,omitempty"`
// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
CreatedByType CreatedByType `json:"createdByType,omitempty"`
// CreatedAt - The timestamp of resource creation (UTC).
CreatedAt *date.Time `json:"createdAt,omitempty"`
// LastModifiedBy - The identity that last modified the resource.
LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
// LastModifiedAt - The timestamp of resource last modification (UTC)
LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
}
// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
// which has 'tags' and a 'location'
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)
}