-
Notifications
You must be signed in to change notification settings - Fork 802
/
models.go
253 lines (223 loc) · 9.71 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
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"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps"
// Account an Azure resource which represents access to a suite of Maps REST APIs.
type Account struct {
autorest.Response `json:"-"`
// Location - READ-ONLY; The location of the resource.
Location *string `json:"location,omitempty"`
// Tags - READ-ONLY; Gets 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 - READ-ONLY; The SKU of this account.
Sku *Sku `json:"sku,omitempty"`
// Properties - READ-ONLY; The map account properties.
Properties *AccountProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The fully qualified Maps Account resource identifier.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the Maps Account, which is unique within a Resource Group.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Azure resource type.
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for Account.
func (a Account) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
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). 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 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)
}
// AccountsMoveRequest the description of what resources to move between resource groups.
type AccountsMoveRequest struct {
// TargetResourceGroup - The name of the destination resource group.
TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
// ResourceIds - A list of resource names to move from the source resource group.
ResourceIds *[]string `json:"resourceIds,omitempty"`
}
// 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)
}
// Error this object is returned when an error occurs in the Maps API
type Error struct {
// Code - READ-ONLY; Error code.
Code *string `json:"code,omitempty"`
// Message - READ-ONLY; If available, a human readable description of the error.
Message *string `json:"message,omitempty"`
// Target - READ-ONLY; If available, the component generating the error.
Target *string `json:"target,omitempty"`
// Details - READ-ONLY; If available, a list of additional details about the error.
Details *[]ErrorDetailsItem `json:"details,omitempty"`
}
// MarshalJSON is the custom marshaler for Error.
func (e Error) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ErrorDetailsItem ...
type ErrorDetailsItem struct {
// Code - READ-ONLY; Error code.
Code *string `json:"code,omitempty"`
// Message - READ-ONLY; If available, a human readable description of the error.
Message *string `json:"message,omitempty"`
// Target - READ-ONLY; If available, the component generating the error.
Target *string `json:"target,omitempty"`
}
// MarshalJSON is the custom marshaler for ErrorDetailsItem.
func (eI ErrorDetailsItem) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// 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)
}
// Resource an Azure resource
type Resource struct {
// ID - READ-ONLY; The fully qualified Maps Account resource identifier.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the Maps Account, which is unique within a Resource Group.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Azure resource type.
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)
}