forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
512 lines (457 loc) · 20.9 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
package maps
// 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/maps/mgmt/2020-02-01-preview/maps"
// Account an Azure resource which represents access to a suite of Maps REST APIs.
type Account struct {
autorest.Response `json:"-"`
// Sku - READ-ONLY; The SKU of this account.
Sku *Sku `json:"sku,omitempty"`
// SystemData - READ-ONLY; The system meta data relating to this resource.
SystemData *SystemData `json:"systemData,omitempty"`
// Properties - READ-ONLY; The map account properties.
Properties *AccountProperties `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 Account.
func (a Account) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if a.Tags != nil {
objectMap["tags"] = a.Tags
}
if a.Location != nil {
objectMap["location"] = a.Location
}
return json.Marshal(objectMap)
}
// AccountCreateParameters parameters used to create a new Maps Account.
type AccountCreateParameters struct {
// Location - The location of the resource.
Location *string `json:"location,omitempty"`
// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
Tags map[string]*string `json:"tags"`
// Sku - The SKU of this account.
Sku *Sku `json:"sku,omitempty"`
}
// MarshalJSON is the custom marshaler for AccountCreateParameters.
func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if acp.Location != nil {
objectMap["location"] = acp.Location
}
if acp.Tags != nil {
objectMap["tags"] = acp.Tags
}
if acp.Sku != nil {
objectMap["sku"] = acp.Sku
}
return json.Marshal(objectMap)
}
// AccountKeys the set of keys which can be used to access the Maps REST APIs. Two keys are provided for
// key rotation without interruption.
type AccountKeys struct {
autorest.Response `json:"-"`
// ID - READ-ONLY; The full Azure resource identifier of the Maps Account.
ID *string `json:"id,omitempty"`
// PrimaryKey - READ-ONLY; The primary key for accessing the Maps REST APIs.
PrimaryKey *string `json:"primaryKey,omitempty"`
// SecondaryKey - READ-ONLY; The secondary key for accessing the Maps REST APIs.
SecondaryKey *string `json:"secondaryKey,omitempty"`
}
// MarshalJSON is the custom marshaler for AccountKeys.
func (ak AccountKeys) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// AccountProperties additional Map account properties
type AccountProperties struct {
// XMsClientID - A unique identifier for the maps account
XMsClientID *string `json:"x-ms-client-id,omitempty"`
}
// Accounts a list of Maps Accounts.
type Accounts struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; a Maps Account.
Value *[]Account `json:"value,omitempty"`
}
// MarshalJSON is the custom marshaler for Accounts.
func (a Accounts) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// AccountUpdateParameters parameters used to update an existing Maps Account.
type AccountUpdateParameters struct {
// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
Tags map[string]*string `json:"tags"`
// Sku - The SKU of this account.
Sku *Sku `json:"sku,omitempty"`
}
// MarshalJSON is the custom marshaler for AccountUpdateParameters.
func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if aup.Tags != nil {
objectMap["tags"] = aup.Tags
}
if aup.Sku != nil {
objectMap["sku"] = aup.Sku
}
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)
}
// Creator an Azure resource which represents Maps Creator product and provides ability to manage private
// location data.
type Creator struct {
autorest.Response `json:"-"`
// Properties - The Creator resource properties.
Properties *CreatorProperties `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 Creator.
func (c Creator) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if c.Properties != nil {
objectMap["properties"] = c.Properties
}
if c.Tags != nil {
objectMap["tags"] = c.Tags
}
if c.Location != nil {
objectMap["location"] = c.Location
}
return json.Marshal(objectMap)
}
// CreatorCreateParameters parameters used to create a new Maps Creator resource.
type CreatorCreateParameters struct {
// Location - The location of the resource.
Location *string `json:"location,omitempty"`
// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for CreatorCreateParameters.
func (ccp CreatorCreateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ccp.Location != nil {
objectMap["location"] = ccp.Location
}
if ccp.Tags != nil {
objectMap["tags"] = ccp.Tags
}
return json.Marshal(objectMap)
}
// CreatorList a list of Creator resources.
type CreatorList struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; a Creator account.
Value *[]Creator `json:"value,omitempty"`
}
// MarshalJSON is the custom marshaler for CreatorList.
func (cl CreatorList) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// CreatorProperties creator resource properties
type CreatorProperties struct {
// ProvisioningState - The state of the resource provisioning, terminal states: Succeeded, Failed, Canceled
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// CreatorUpdateParameters parameters used to update an existing Creator resource.
type CreatorUpdateParameters struct {
// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for CreatorUpdateParameters.
func (cup CreatorUpdateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cup.Tags != nil {
objectMap["tags"] = cup.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"`
}
// KeySpecification whether the operation refers to the primary or secondary key.
type KeySpecification struct {
// KeyType - Whether the operation refers to the primary or secondary key. Possible values include: 'Primary', 'Secondary'
KeyType KeyType `json:"keyType,omitempty"`
}
// Operations the set of operations available for Maps.
type Operations struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; An operation available for Maps.
Value *[]OperationsValueItem `json:"value,omitempty"`
}
// MarshalJSON is the custom marshaler for Operations.
func (o Operations) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// OperationsValueItem ...
type OperationsValueItem struct {
// Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}.
Name *string `json:"name,omitempty"`
// Display - The human-readable description of the operation.
Display *OperationsValueItemDisplay `json:"display,omitempty"`
// Origin - READ-ONLY; The origin of the operation.
Origin *string `json:"origin,omitempty"`
}
// MarshalJSON is the custom marshaler for OperationsValueItem.
func (oI OperationsValueItem) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if oI.Display != nil {
objectMap["display"] = oI.Display
}
return json.Marshal(objectMap)
}
// OperationsValueItemDisplay the human-readable description of the operation.
type OperationsValueItemDisplay struct {
// Provider - READ-ONLY; Service provider: Microsoft Maps.
Provider *string `json:"provider,omitempty"`
// Resource - READ-ONLY; Resource on which the operation is performed.
Resource *string `json:"resource,omitempty"`
// Operation - READ-ONLY; The action that users can perform, based on their permission level.
Operation *string `json:"operation,omitempty"`
// Description - READ-ONLY; The description of the operation.
Description *string `json:"description,omitempty"`
}
// MarshalJSON is the custom marshaler for OperationsValueItemDisplay.
func (oI OperationsValueItemDisplay) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// PrivateAtlas an Azure resource which represents which will provision the ability to create private
// location data.
type PrivateAtlas struct {
autorest.Response `json:"-"`
// Properties - The Private Atlas resource properties.
Properties *PrivateAtlasProperties `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 PrivateAtlas.
func (pa PrivateAtlas) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if pa.Properties != nil {
objectMap["properties"] = pa.Properties
}
if pa.Tags != nil {
objectMap["tags"] = pa.Tags
}
if pa.Location != nil {
objectMap["location"] = pa.Location
}
return json.Marshal(objectMap)
}
// PrivateAtlasCreateParameters parameters used to create a new Private Atlas resource.
type PrivateAtlasCreateParameters struct {
// Location - The location of the resource.
Location *string `json:"location,omitempty"`
// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for PrivateAtlasCreateParameters.
func (pacp PrivateAtlasCreateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if pacp.Location != nil {
objectMap["location"] = pacp.Location
}
if pacp.Tags != nil {
objectMap["tags"] = pacp.Tags
}
return json.Marshal(objectMap)
}
// PrivateAtlasList a list of Private Atlas resources.
type PrivateAtlasList struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; a Private Atlas.
Value *[]PrivateAtlas `json:"value,omitempty"`
}
// MarshalJSON is the custom marshaler for PrivateAtlasList.
func (pal PrivateAtlasList) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// PrivateAtlasProperties private Atlas resource properties
type PrivateAtlasProperties struct {
// ProvisioningState - The state of the resource provisioning, terminal states: Succeeded, Failed, Canceled
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// PrivateAtlasUpdateParameters parameters used to update an existing Private Atlas resource.
type PrivateAtlasUpdateParameters struct {
// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for PrivateAtlasUpdateParameters.
func (paup PrivateAtlasUpdateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if paup.Tags != nil {
objectMap["tags"] = paup.Tags
}
return json.Marshal(objectMap)
}
// 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)
}
// Sku the SKU of the Maps Account.
type Sku struct {
// Name - The name of the SKU, in standard format (such as S0).
Name *string `json:"name,omitempty"`
// Tier - READ-ONLY; Gets the sku tier. This is based on the SKU name.
Tier *string `json:"tier,omitempty"`
}
// MarshalJSON is the custom marshaler for Sku.
func (s Sku) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if s.Name != nil {
objectMap["name"] = s.Name
}
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: 'User', 'Application', 'ManagedIdentity', 'Key'
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: 'User', 'Application', 'ManagedIdentity', 'Key'
LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
// LastModifiedAt - The type of identity that last modified the resource.
LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
}
// 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)
}