-
Notifications
You must be signed in to change notification settings - Fork 806
/
models.go
271 lines (242 loc) · 11.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
package storageimportexport
// 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.
// 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/to"
"net/http"
)
// DriveState enumerates the values for drive state.
type DriveState string
const (
// Completed specifies the completed state for drive state.
Completed DriveState = "Completed"
// CompletedMoreInfo specifies the completed more info state for drive state.
CompletedMoreInfo DriveState = "CompletedMoreInfo"
// NeverReceived specifies the never received state for drive state.
NeverReceived DriveState = "NeverReceived"
// Received specifies the received state for drive state.
Received DriveState = "Received"
// ShippedBack specifies the shipped back state for drive state.
ShippedBack DriveState = "ShippedBack"
// Specified specifies the specified state for drive state.
Specified DriveState = "Specified"
// Transferring specifies the transferring state for drive state.
Transferring DriveState = "Transferring"
)
// DriveBitLockerKey is bitLocker recovery key or password to the specified drive
type DriveBitLockerKey struct {
BitLockerKey *string `json:"bitLockerKey,omitempty"`
DriveID *string `json:"driveId,omitempty"`
}
// DriveStatus is provides information about the drive's status
type DriveStatus struct {
DriveID *string `json:"driveId,omitempty"`
BitLockerKey *string `json:"bitLockerKey,omitempty"`
ManifestFile *string `json:"manifestFile,omitempty"`
ManifestHash *string `json:"manifestHash,omitempty"`
DriveHeaderHash *string `json:"driveHeaderHash,omitempty"`
State DriveState `json:"state,omitempty"`
CopyStatus *string `json:"copyStatus,omitempty"`
PercentComplete *int32 `json:"percentComplete,omitempty"`
VerboseLogURI *string `json:"verboseLogUri,omitempty"`
ErrorLogURI *string `json:"errorLogUri,omitempty"`
ManifestURI *string `json:"manifestUri,omitempty"`
BytesSucceeded *int64 `json:"bytesSucceeded,omitempty"`
}
// ErrorResponse is response when errors occurred
type ErrorResponse struct {
*ErrorResponseError `json:"error,omitempty"`
}
// ErrorResponseError is describes the error information.
type ErrorResponseError struct {
Code *string `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Target *string `json:"target,omitempty"`
Details *[]ErrorResponseErrorDetailsItem `json:"details,omitempty"`
Innererror *map[string]interface{} `json:"innererror,omitempty"`
}
// ErrorResponseErrorDetailsItem is
type ErrorResponseErrorDetailsItem struct {
Code *string `json:"code,omitempty"`
Target *string `json:"target,omitempty"`
Message *string `json:"message,omitempty"`
}
// Export is a property containing information about the blobs to be exported for an export job. This property is
// required for export jobs, but must not be specified for import jobs.
type Export struct {
*ExportBlobList `json:"blobList,omitempty"`
BlobListblobPath *string `json:"blobListblobPath,omitempty"`
}
// ExportBlobList is a list of the blobs to be exported.
type ExportBlobList struct {
BlobPath *[]string `json:"blobPath,omitempty"`
BlobPathPrefix *[]string `json:"blobPathPrefix,omitempty"`
}
// GetBitLockerKeysResponse is getBitLockerKeys response
type GetBitLockerKeysResponse struct {
autorest.Response `json:"-"`
Value *[]DriveBitLockerKey `json:"value,omitempty"`
}
// JobDetails is specifies the job properties
type JobDetails struct {
StorageAccountID *string `json:"storageAccountId,omitempty"`
JobType *string `json:"jobType,omitempty"`
ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"`
ReturnShipping *ReturnShipping `json:"returnShipping,omitempty"`
ShippingInformation *ShippingInformation `json:"shippingInformation,omitempty"`
DeliveryPackage *PackageInfomation `json:"deliveryPackage,omitempty"`
ReturnPackage *PackageInfomation `json:"returnPackage,omitempty"`
DiagnosticsPath *string `json:"diagnosticsPath,omitempty"`
LogLevel *string `json:"logLevel,omitempty"`
BackupDriveManifest *bool `json:"backupDriveManifest,omitempty"`
State *string `json:"state,omitempty"`
CancelRequested *bool `json:"cancelRequested,omitempty"`
PercentComplete *int32 `json:"percentComplete,omitempty"`
IncompleteBlobListURI *string `json:"incompleteBlobListUri,omitempty"`
DriveList *[]DriveStatus `json:"driveList,omitempty"`
Export *Export `json:"export,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// JobResponse is contains the job information.
type JobResponse 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]interface{} `json:"tags,omitempty"`
Properties *JobDetails `json:"properties,omitempty"`
}
// ListJobsResponse is list jobs response
type ListJobsResponse struct {
autorest.Response `json:"-"`
NextLink *string `json:"nextLink,omitempty"`
Value *[]JobResponse `json:"value,omitempty"`
}
// ListJobsResponsePreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client ListJobsResponse) ListJobsResponsePreparer() (*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)))
}
// ListOperationsResponse is list operations response
type ListOperationsResponse struct {
autorest.Response `json:"-"`
Value *[]Operation `json:"value,omitempty"`
}
// Location is provides information about an Azure data center location.
type Location struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
*LocationProperties `json:"properties,omitempty"`
}
// LocationProperties is location properties
type LocationProperties struct {
RecipientName *string `json:"recipientName,omitempty"`
StreetAddress1 *string `json:"streetAddress1,omitempty"`
StreetAddress2 *string `json:"streetAddress2,omitempty"`
City *string `json:"city,omitempty"`
StateOrProvince *string `json:"stateOrProvince,omitempty"`
PostalCode *string `json:"postalCode,omitempty"`
CountryOrRegion *string `json:"countryOrRegion,omitempty"`
Phone *string `json:"phone,omitempty"`
SupportedCarriers *[]string `json:"supportedCarriers,omitempty"`
AlternateLocations *[]string `json:"alternateLocations,omitempty"`
}
// LocationsResponse is locations response
type LocationsResponse struct {
autorest.Response `json:"-"`
Value *[]Location `json:"value,omitempty"`
}
// Operation is describes a supported operation by the Storage Import/Export job API.
type Operation struct {
Name *string `json:"name,omitempty"`
*OperationDisplay `json:"display,omitempty"`
}
// OperationDisplay is operation display properties
type OperationDisplay struct {
Provider *string `json:"provider,omitempty"`
Resource *string `json:"resource,omitempty"`
Operation *string `json:"operation,omitempty"`
Description *string `json:"description,omitempty"`
}
// PackageInfomation is contains information about the package being shipped by the customer to the Microsoft data
// center.
type PackageInfomation struct {
CarrierName *string `json:"carrierName,omitempty"`
TrackingNumber *string `json:"trackingNumber,omitempty"`
DriveCount *int32 `json:"driveCount,omitempty"`
ShipDate *string `json:"shipDate,omitempty"`
}
// PutJobParameters is put Job parameters
type PutJobParameters struct {
Location *string `json:"location,omitempty"`
Tags *map[string]interface{} `json:"tags,omitempty"`
Properties *JobDetails `json:"properties,omitempty"`
}
// ReturnAddress is specifies the return address information for the job.
type ReturnAddress struct {
RecipientName *string `json:"recipientName,omitempty"`
StreetAddress1 *string `json:"streetAddress1,omitempty"`
StreetAddress2 *string `json:"streetAddress2,omitempty"`
City *string `json:"city,omitempty"`
StateOrProvince *string `json:"stateOrProvince,omitempty"`
PostalCode *string `json:"postalCode,omitempty"`
CountryOrRegion *string `json:"countryOrRegion,omitempty"`
Phone *string `json:"phone,omitempty"`
Email *string `json:"email,omitempty"`
}
// ReturnShipping is specifies the return carrier and customer's account with the carrier.
type ReturnShipping struct {
CarrierName *string `json:"carrierName,omitempty"`
CarrierAccountNumber *string `json:"carrierAccountNumber,omitempty"`
}
// ShippingInformation is contains information about the Microsoft datacenter to which the drives should be shipped.
type ShippingInformation struct {
RecipientName *string `json:"recipientName,omitempty"`
StreetAddress1 *string `json:"streetAddress1,omitempty"`
StreetAddress2 *string `json:"streetAddress2,omitempty"`
City *string `json:"city,omitempty"`
StateOrProvince *string `json:"stateOrProvince,omitempty"`
PostalCode *string `json:"postalCode,omitempty"`
CountryOrRegion *string `json:"countryOrRegion,omitempty"`
Phone *string `json:"phone,omitempty"`
}
// UpdateJobParameters is update Job parameters
type UpdateJobParameters struct {
Tags *map[string]interface{} `json:"tags,omitempty"`
*UpdateJobParametersProperties `json:"properties,omitempty"`
}
// UpdateJobParametersProperties is specifies the properties of a UpdateJob.
type UpdateJobParametersProperties struct {
CancelRequested *bool `json:"cancelRequested,omitempty"`
State *string `json:"state,omitempty"`
ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"`
ReturnShipping *ReturnShipping `json:"returnShipping,omitempty"`
DeliveryPackage *PackageInfomation `json:"deliveryPackage,omitempty"`
LogLevel *string `json:"logLevel,omitempty"`
BackupDriveManifest *bool `json:"backupDriveManifest,omitempty"`
DriveList *[]DriveStatus `json:"driveList,omitempty"`
}