forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
244 lines (214 loc) · 9.22 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
package batch
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"net/http"
)
// AccountKeyType enumerates the values for account key type.
type AccountKeyType string
const (
// Primary specifies the primary state for account key type.
Primary AccountKeyType = "Primary"
// Secondary specifies the secondary state for account key type.
Secondary AccountKeyType = "Secondary"
)
// PackageState enumerates the values for package state.
type PackageState string
const (
// Active specifies the active state for package state.
Active PackageState = "active"
// Pending specifies the pending state for package state.
Pending PackageState = "pending"
// Unmapped specifies the unmapped state for package state.
Unmapped PackageState = "unmapped"
)
// ProvisioningState enumerates the values for provisioning state.
type ProvisioningState string
const (
// Cancelled specifies the cancelled state for provisioning state.
Cancelled ProvisioningState = "Cancelled"
// Creating specifies the creating state for provisioning state.
Creating ProvisioningState = "Creating"
// Deleting specifies the deleting state for provisioning state.
Deleting ProvisioningState = "Deleting"
// Failed specifies the failed state for provisioning state.
Failed ProvisioningState = "Failed"
// Invalid specifies the invalid state for provisioning state.
Invalid ProvisioningState = "Invalid"
// Succeeded specifies the succeeded state for provisioning state.
Succeeded ProvisioningState = "Succeeded"
)
// Account is contains information about an Azure Batch account.
type Account struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
*AccountProperties `json:"properties,omitempty"`
}
// AccountBaseProperties is the properties of a Batch account.
type AccountBaseProperties struct {
AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"`
}
// AccountCreateParameters is parameters supplied to the Create operation.
type AccountCreateParameters struct {
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
*AccountBaseProperties `json:"properties,omitempty"`
}
// AccountKeys is a set of Azure Batch account keys.
type AccountKeys struct {
autorest.Response `json:"-"`
Primary *string `json:"primary,omitempty"`
Secondary *string `json:"secondary,omitempty"`
}
// AccountListResult is values returned by the List operation.
type AccountListResult struct {
autorest.Response `json:"-"`
Value *[]Account `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// AccountListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client AccountListResult) AccountListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// AccountProperties is account specific properties.
type AccountProperties struct {
AccountEndpoint *string `json:"accountEndpoint,omitempty"`
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
AutoStorage *AutoStorageProperties `json:"autoStorage,omitempty"`
CoreQuota *int32 `json:"coreQuota,omitempty"`
PoolQuota *int32 `json:"poolQuota,omitempty"`
ActiveJobAndJobScheduleQuota *int32 `json:"activeJobAndJobScheduleQuota,omitempty"`
}
// AccountRegenerateKeyParameters is parameters supplied to the RegenerateKey
// operation.
type AccountRegenerateKeyParameters struct {
KeyName AccountKeyType `json:"keyName,omitempty"`
}
// AccountUpdateParameters is parameters supplied to the Update operation.
type AccountUpdateParameters struct {
Tags *map[string]*string `json:"tags,omitempty"`
*AccountBaseProperties `json:"properties,omitempty"`
}
// ActivateApplicationPackageParameters is parameters for an
// ApplicationOperations.ActivateApplicationPackage request.
type ActivateApplicationPackageParameters struct {
Format *string `json:"format,omitempty"`
}
// AddApplicationParameters is parameters for an
// ApplicationOperations.AddApplication request.
type AddApplicationParameters struct {
AllowUpdates *bool `json:"allowUpdates,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
}
// Application is contains information about an application in a Batch account.
type Application struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
Packages *[]ApplicationPackage `json:"packages,omitempty"`
AllowUpdates *bool `json:"allowUpdates,omitempty"`
DefaultVersion *string `json:"defaultVersion,omitempty"`
}
// ApplicationPackage is an application package which represents a particular
// version of an application.
type ApplicationPackage struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Version *string `json:"version,omitempty"`
State PackageState `json:"state,omitempty"`
Format *string `json:"format,omitempty"`
StorageURL *string `json:"storageUrl,omitempty"`
StorageURLExpiry *date.Time `json:"storageUrlExpiry,omitempty"`
LastActivationTime *date.Time `json:"lastActivationTime,omitempty"`
}
// AutoStorageBaseProperties is the properties related to auto storage account.
type AutoStorageBaseProperties struct {
StorageAccountID *string `json:"storageAccountId,omitempty"`
}
// AutoStorageProperties is contains information about the auto storage
// account associated with a Batch account.
type AutoStorageProperties struct {
StorageAccountID *string `json:"storageAccountId,omitempty"`
LastKeySync *date.Time `json:"lastKeySync,omitempty"`
}
// ErrorBody is an error response from the Batch service.
type ErrorBody struct {
Code *string `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Target *string `json:"target,omitempty"`
Details *[]ErrorDetail `json:"details,omitempty"`
}
// ErrorDetail is specific detail about an error.
type ErrorDetail struct {
Code *string `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Target *string `json:"target,omitempty"`
}
// ListApplicationsResult is response to an
// ApplicationOperations.ListApplications request.
type ListApplicationsResult struct {
autorest.Response `json:"-"`
Value *[]Application `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// ListApplicationsResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client ListApplicationsResult) ListApplicationsResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// LocationQuota is quotas associated with a Batch region for a particular
// subscription.
type LocationQuota struct {
autorest.Response `json:"-"`
AccountQuota *int32 `json:"accountQuota,omitempty"`
}
// Resource is a definition of an Azure resource.
type Resource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
}
// UpdateApplicationParameters is parameters for an
// ApplicationOperations.UpdateApplication request.
type UpdateApplicationParameters struct {
AllowUpdates *bool `json:"allowUpdates,omitempty"`
DefaultVersion *string `json:"defaultVersion,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
}