1package storagesync 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "context" 22 "encoding/json" 23 "github.com/Azure/go-autorest/autorest" 24 "github.com/Azure/go-autorest/autorest/azure" 25 "github.com/Azure/go-autorest/autorest/date" 26 "github.com/Azure/go-autorest/autorest/to" 27 "github.com/Azure/go-autorest/tracing" 28 "net/http" 29) 30 31// The package's fully qualified name. 32const fqdn = "github.com/Azure/azure-sdk-for-go/services/storagesync/mgmt/2019-06-01/storagesync" 33 34// APIError error type 35type APIError struct { 36 // Code - Error code of the given entry. 37 Code *string `json:"code,omitempty"` 38 // Message - Error message of the given entry. 39 Message *string `json:"message,omitempty"` 40 // Target - Target of the given error entry. 41 Target *string `json:"target,omitempty"` 42 // Details - Error details of the given entry. 43 Details *ErrorDetails `json:"details,omitempty"` 44} 45 46// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. 47type AzureEntityResource struct { 48 // Etag - READ-ONLY; Resource Etag. 49 Etag *string `json:"etag,omitempty"` 50 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 51 ID *string `json:"id,omitempty"` 52 // Name - READ-ONLY; The name of the resource 53 Name *string `json:"name,omitempty"` 54 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 55 Type *string `json:"type,omitempty"` 56} 57 58// BackupRequest backup request 59type BackupRequest struct { 60 // AzureFileShare - Azure File Share. 61 AzureFileShare *string `json:"azureFileShare,omitempty"` 62} 63 64// CheckNameAvailabilityParameters parameters for a check name availability request. 65type CheckNameAvailabilityParameters struct { 66 // Name - The name to check for availability 67 Name *string `json:"name,omitempty"` 68 // Type - The resource type. Must be set to Microsoft.StorageSync/storageSyncServices 69 Type *string `json:"type,omitempty"` 70} 71 72// CheckNameAvailabilityResult the CheckNameAvailability operation response. 73type CheckNameAvailabilityResult struct { 74 autorest.Response `json:"-"` 75 // NameAvailable - READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used. 76 NameAvailable *bool `json:"nameAvailable,omitempty"` 77 // Reason - READ-ONLY; Gets the reason that a Storage Sync Service name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'Invalid', 'AlreadyExists' 78 Reason NameAvailabilityReason `json:"reason,omitempty"` 79 // Message - READ-ONLY; Gets an error message explaining the Reason value in more detail. 80 Message *string `json:"message,omitempty"` 81} 82 83// CloudEndpoint cloud Endpoint object. 84type CloudEndpoint struct { 85 autorest.Response `json:"-"` 86 // CloudEndpointProperties - Cloud Endpoint properties. 87 *CloudEndpointProperties `json:"properties,omitempty"` 88 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 89 ID *string `json:"id,omitempty"` 90 // Name - READ-ONLY; The name of the resource 91 Name *string `json:"name,omitempty"` 92 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 93 Type *string `json:"type,omitempty"` 94} 95 96// MarshalJSON is the custom marshaler for CloudEndpoint. 97func (ce CloudEndpoint) MarshalJSON() ([]byte, error) { 98 objectMap := make(map[string]interface{}) 99 if ce.CloudEndpointProperties != nil { 100 objectMap["properties"] = ce.CloudEndpointProperties 101 } 102 return json.Marshal(objectMap) 103} 104 105// UnmarshalJSON is the custom unmarshaler for CloudEndpoint struct. 106func (ce *CloudEndpoint) UnmarshalJSON(body []byte) error { 107 var m map[string]*json.RawMessage 108 err := json.Unmarshal(body, &m) 109 if err != nil { 110 return err 111 } 112 for k, v := range m { 113 switch k { 114 case "properties": 115 if v != nil { 116 var cloudEndpointProperties CloudEndpointProperties 117 err = json.Unmarshal(*v, &cloudEndpointProperties) 118 if err != nil { 119 return err 120 } 121 ce.CloudEndpointProperties = &cloudEndpointProperties 122 } 123 case "id": 124 if v != nil { 125 var ID string 126 err = json.Unmarshal(*v, &ID) 127 if err != nil { 128 return err 129 } 130 ce.ID = &ID 131 } 132 case "name": 133 if v != nil { 134 var name string 135 err = json.Unmarshal(*v, &name) 136 if err != nil { 137 return err 138 } 139 ce.Name = &name 140 } 141 case "type": 142 if v != nil { 143 var typeVar string 144 err = json.Unmarshal(*v, &typeVar) 145 if err != nil { 146 return err 147 } 148 ce.Type = &typeVar 149 } 150 } 151 } 152 153 return nil 154} 155 156// CloudEndpointArray array of CloudEndpoint 157type CloudEndpointArray struct { 158 autorest.Response `json:"-"` 159 // Value - Collection of CloudEndpoint. 160 Value *[]CloudEndpoint `json:"value,omitempty"` 161} 162 163// CloudEndpointCreateParameters the parameters used when creating a cloud endpoint. 164type CloudEndpointCreateParameters struct { 165 // CloudEndpointCreateParametersProperties - The parameters used to create the cloud endpoint. 166 *CloudEndpointCreateParametersProperties `json:"properties,omitempty"` 167 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 168 ID *string `json:"id,omitempty"` 169 // Name - READ-ONLY; The name of the resource 170 Name *string `json:"name,omitempty"` 171 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 172 Type *string `json:"type,omitempty"` 173} 174 175// MarshalJSON is the custom marshaler for CloudEndpointCreateParameters. 176func (cecp CloudEndpointCreateParameters) MarshalJSON() ([]byte, error) { 177 objectMap := make(map[string]interface{}) 178 if cecp.CloudEndpointCreateParametersProperties != nil { 179 objectMap["properties"] = cecp.CloudEndpointCreateParametersProperties 180 } 181 return json.Marshal(objectMap) 182} 183 184// UnmarshalJSON is the custom unmarshaler for CloudEndpointCreateParameters struct. 185func (cecp *CloudEndpointCreateParameters) UnmarshalJSON(body []byte) error { 186 var m map[string]*json.RawMessage 187 err := json.Unmarshal(body, &m) 188 if err != nil { 189 return err 190 } 191 for k, v := range m { 192 switch k { 193 case "properties": 194 if v != nil { 195 var cloudEndpointCreateParametersProperties CloudEndpointCreateParametersProperties 196 err = json.Unmarshal(*v, &cloudEndpointCreateParametersProperties) 197 if err != nil { 198 return err 199 } 200 cecp.CloudEndpointCreateParametersProperties = &cloudEndpointCreateParametersProperties 201 } 202 case "id": 203 if v != nil { 204 var ID string 205 err = json.Unmarshal(*v, &ID) 206 if err != nil { 207 return err 208 } 209 cecp.ID = &ID 210 } 211 case "name": 212 if v != nil { 213 var name string 214 err = json.Unmarshal(*v, &name) 215 if err != nil { 216 return err 217 } 218 cecp.Name = &name 219 } 220 case "type": 221 if v != nil { 222 var typeVar string 223 err = json.Unmarshal(*v, &typeVar) 224 if err != nil { 225 return err 226 } 227 cecp.Type = &typeVar 228 } 229 } 230 } 231 232 return nil 233} 234 235// CloudEndpointCreateParametersProperties cloudEndpoint Properties object. 236type CloudEndpointCreateParametersProperties struct { 237 // StorageAccountResourceID - Storage Account Resource Id 238 StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` 239 // AzureFileShareName - Azure file share name 240 AzureFileShareName *string `json:"azureFileShareName,omitempty"` 241 // StorageAccountTenantID - Storage Account Tenant Id 242 StorageAccountTenantID *string `json:"storageAccountTenantId,omitempty"` 243 // FriendlyName - Friendly Name 244 FriendlyName *string `json:"friendlyName,omitempty"` 245} 246 247// CloudEndpointProperties cloudEndpoint Properties object. 248type CloudEndpointProperties struct { 249 // StorageAccountResourceID - Storage Account Resource Id 250 StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` 251 // AzureFileShareName - Azure file share name 252 AzureFileShareName *string `json:"azureFileShareName,omitempty"` 253 // StorageAccountTenantID - Storage Account Tenant Id 254 StorageAccountTenantID *string `json:"storageAccountTenantId,omitempty"` 255 // PartnershipID - Partnership Id 256 PartnershipID *string `json:"partnershipId,omitempty"` 257 // FriendlyName - Friendly Name 258 FriendlyName *string `json:"friendlyName,omitempty"` 259 // BackupEnabled - READ-ONLY; Backup Enabled 260 BackupEnabled *string `json:"backupEnabled,omitempty"` 261 // ProvisioningState - CloudEndpoint Provisioning State 262 ProvisioningState *string `json:"provisioningState,omitempty"` 263 // LastWorkflowID - CloudEndpoint lastWorkflowId 264 LastWorkflowID *string `json:"lastWorkflowId,omitempty"` 265 // LastOperationName - Resource Last Operation Name 266 LastOperationName *string `json:"lastOperationName,omitempty"` 267} 268 269// MarshalJSON is the custom marshaler for CloudEndpointProperties. 270func (cep CloudEndpointProperties) MarshalJSON() ([]byte, error) { 271 objectMap := make(map[string]interface{}) 272 if cep.StorageAccountResourceID != nil { 273 objectMap["storageAccountResourceId"] = cep.StorageAccountResourceID 274 } 275 if cep.AzureFileShareName != nil { 276 objectMap["azureFileShareName"] = cep.AzureFileShareName 277 } 278 if cep.StorageAccountTenantID != nil { 279 objectMap["storageAccountTenantId"] = cep.StorageAccountTenantID 280 } 281 if cep.PartnershipID != nil { 282 objectMap["partnershipId"] = cep.PartnershipID 283 } 284 if cep.FriendlyName != nil { 285 objectMap["friendlyName"] = cep.FriendlyName 286 } 287 if cep.ProvisioningState != nil { 288 objectMap["provisioningState"] = cep.ProvisioningState 289 } 290 if cep.LastWorkflowID != nil { 291 objectMap["lastWorkflowId"] = cep.LastWorkflowID 292 } 293 if cep.LastOperationName != nil { 294 objectMap["lastOperationName"] = cep.LastOperationName 295 } 296 return json.Marshal(objectMap) 297} 298 299// CloudEndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running 300// operation. 301type CloudEndpointsCreateFuture struct { 302 azure.FutureAPI 303 // Result returns the result of the asynchronous operation. 304 // If the operation has not completed it will return an error. 305 Result func(CloudEndpointsClient) (CloudEndpoint, error) 306} 307 308// CloudEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 309// operation. 310type CloudEndpointsDeleteFuture struct { 311 azure.FutureAPI 312 // Result returns the result of the asynchronous operation. 313 // If the operation has not completed it will return an error. 314 Result func(CloudEndpointsClient) (autorest.Response, error) 315} 316 317// CloudEndpointsPostBackupFuture an abstraction for monitoring and retrieving the results of a 318// long-running operation. 319type CloudEndpointsPostBackupFuture struct { 320 azure.FutureAPI 321 // Result returns the result of the asynchronous operation. 322 // If the operation has not completed it will return an error. 323 Result func(CloudEndpointsClient) (PostBackupResponse, error) 324} 325 326// CloudEndpointsPostRestoreFuture an abstraction for monitoring and retrieving the results of a 327// long-running operation. 328type CloudEndpointsPostRestoreFuture struct { 329 azure.FutureAPI 330 // Result returns the result of the asynchronous operation. 331 // If the operation has not completed it will return an error. 332 Result func(CloudEndpointsClient) (autorest.Response, error) 333} 334 335// CloudEndpointsPreBackupFuture an abstraction for monitoring and retrieving the results of a long-running 336// operation. 337type CloudEndpointsPreBackupFuture struct { 338 azure.FutureAPI 339 // Result returns the result of the asynchronous operation. 340 // If the operation has not completed it will return an error. 341 Result func(CloudEndpointsClient) (autorest.Response, error) 342} 343 344// CloudEndpointsPreRestoreFuture an abstraction for monitoring and retrieving the results of a 345// long-running operation. 346type CloudEndpointsPreRestoreFuture struct { 347 azure.FutureAPI 348 // Result returns the result of the asynchronous operation. 349 // If the operation has not completed it will return an error. 350 Result func(CloudEndpointsClient) (autorest.Response, error) 351} 352 353// CloudEndpointsTriggerChangeDetectionFuture an abstraction for monitoring and retrieving the results of a 354// long-running operation. 355type CloudEndpointsTriggerChangeDetectionFuture struct { 356 azure.FutureAPI 357 // Result returns the result of the asynchronous operation. 358 // If the operation has not completed it will return an error. 359 Result func(CloudEndpointsClient) (autorest.Response, error) 360} 361 362// Error error type 363type Error struct { 364 // Error - Error details of the given entry. 365 Error *APIError `json:"error,omitempty"` 366 // Innererror - Error details of the given entry. 367 Innererror *APIError `json:"innererror,omitempty"` 368} 369 370// ErrorDetails error Details object. 371type ErrorDetails struct { 372 // Code - Error code of the given entry. 373 Code *string `json:"code,omitempty"` 374 // Message - Error message of the given entry. 375 Message *string `json:"message,omitempty"` 376 // Target - Target of the given entry. 377 Target *string `json:"target,omitempty"` 378} 379 380// OperationDisplayInfo the operation supported by storage sync. 381type OperationDisplayInfo struct { 382 // Description - The description of the operation. 383 Description *string `json:"description,omitempty"` 384 // Operation - The action that users can perform, based on their permission level. 385 Operation *string `json:"operation,omitempty"` 386 // Provider - Service provider: Microsoft StorageSync. 387 Provider *string `json:"provider,omitempty"` 388 // Resource - Resource on which the operation is performed. 389 Resource *string `json:"resource,omitempty"` 390} 391 392// OperationDisplayResource operation Display Resource object. 393type OperationDisplayResource struct { 394 // Provider - Operation Display Resource Provider. 395 Provider *string `json:"provider,omitempty"` 396 // Resource - Operation Display Resource. 397 Resource *string `json:"resource,omitempty"` 398 // Operation - Operation Display Resource Operation. 399 Operation *string `json:"operation,omitempty"` 400 // Description - Operation Display Resource Description. 401 Description *string `json:"description,omitempty"` 402} 403 404// OperationEntity the operation supported by storage sync. 405type OperationEntity struct { 406 // Name - Operation name: {provider}/{resource}/{operation}. 407 Name *string `json:"name,omitempty"` 408 // Display - The operation supported by storage sync. 409 Display *OperationDisplayInfo `json:"display,omitempty"` 410 // Origin - The origin. 411 Origin *string `json:"origin,omitempty"` 412} 413 414// OperationEntityListResult the list of storage sync operations. 415type OperationEntityListResult struct { 416 autorest.Response `json:"-"` 417 // NextLink - The link used to get the next page of operations. 418 NextLink *string `json:"nextLink,omitempty"` 419 // Value - The list of operations. 420 Value *[]OperationEntity `json:"value,omitempty"` 421} 422 423// OperationEntityListResultIterator provides access to a complete listing of OperationEntity values. 424type OperationEntityListResultIterator struct { 425 i int 426 page OperationEntityListResultPage 427} 428 429// NextWithContext advances to the next value. If there was an error making 430// the request the iterator does not advance and the error is returned. 431func (iter *OperationEntityListResultIterator) NextWithContext(ctx context.Context) (err error) { 432 if tracing.IsEnabled() { 433 ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultIterator.NextWithContext") 434 defer func() { 435 sc := -1 436 if iter.Response().Response.Response != nil { 437 sc = iter.Response().Response.Response.StatusCode 438 } 439 tracing.EndSpan(ctx, sc, err) 440 }() 441 } 442 iter.i++ 443 if iter.i < len(iter.page.Values()) { 444 return nil 445 } 446 err = iter.page.NextWithContext(ctx) 447 if err != nil { 448 iter.i-- 449 return err 450 } 451 iter.i = 0 452 return nil 453} 454 455// Next advances to the next value. If there was an error making 456// the request the iterator does not advance and the error is returned. 457// Deprecated: Use NextWithContext() instead. 458func (iter *OperationEntityListResultIterator) Next() error { 459 return iter.NextWithContext(context.Background()) 460} 461 462// NotDone returns true if the enumeration should be started or is not yet complete. 463func (iter OperationEntityListResultIterator) NotDone() bool { 464 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 465} 466 467// Response returns the raw server response from the last page request. 468func (iter OperationEntityListResultIterator) Response() OperationEntityListResult { 469 return iter.page.Response() 470} 471 472// Value returns the current value or a zero-initialized value if the 473// iterator has advanced beyond the end of the collection. 474func (iter OperationEntityListResultIterator) Value() OperationEntity { 475 if !iter.page.NotDone() { 476 return OperationEntity{} 477 } 478 return iter.page.Values()[iter.i] 479} 480 481// Creates a new instance of the OperationEntityListResultIterator type. 482func NewOperationEntityListResultIterator(page OperationEntityListResultPage) OperationEntityListResultIterator { 483 return OperationEntityListResultIterator{page: page} 484} 485 486// IsEmpty returns true if the ListResult contains no values. 487func (oelr OperationEntityListResult) IsEmpty() bool { 488 return oelr.Value == nil || len(*oelr.Value) == 0 489} 490 491// hasNextLink returns true if the NextLink is not empty. 492func (oelr OperationEntityListResult) hasNextLink() bool { 493 return oelr.NextLink != nil && len(*oelr.NextLink) != 0 494} 495 496// operationEntityListResultPreparer prepares a request to retrieve the next set of results. 497// It returns nil if no more results exist. 498func (oelr OperationEntityListResult) operationEntityListResultPreparer(ctx context.Context) (*http.Request, error) { 499 if !oelr.hasNextLink() { 500 return nil, nil 501 } 502 return autorest.Prepare((&http.Request{}).WithContext(ctx), 503 autorest.AsJSON(), 504 autorest.AsGet(), 505 autorest.WithBaseURL(to.String(oelr.NextLink))) 506} 507 508// OperationEntityListResultPage contains a page of OperationEntity values. 509type OperationEntityListResultPage struct { 510 fn func(context.Context, OperationEntityListResult) (OperationEntityListResult, error) 511 oelr OperationEntityListResult 512} 513 514// NextWithContext advances to the next page of values. If there was an error making 515// the request the page does not advance and the error is returned. 516func (page *OperationEntityListResultPage) NextWithContext(ctx context.Context) (err error) { 517 if tracing.IsEnabled() { 518 ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultPage.NextWithContext") 519 defer func() { 520 sc := -1 521 if page.Response().Response.Response != nil { 522 sc = page.Response().Response.Response.StatusCode 523 } 524 tracing.EndSpan(ctx, sc, err) 525 }() 526 } 527 for { 528 next, err := page.fn(ctx, page.oelr) 529 if err != nil { 530 return err 531 } 532 page.oelr = next 533 if !next.hasNextLink() || !next.IsEmpty() { 534 break 535 } 536 } 537 return nil 538} 539 540// Next advances to the next page of values. If there was an error making 541// the request the page does not advance and the error is returned. 542// Deprecated: Use NextWithContext() instead. 543func (page *OperationEntityListResultPage) Next() error { 544 return page.NextWithContext(context.Background()) 545} 546 547// NotDone returns true if the page enumeration should be started or is not yet complete. 548func (page OperationEntityListResultPage) NotDone() bool { 549 return !page.oelr.IsEmpty() 550} 551 552// Response returns the raw server response from the last page request. 553func (page OperationEntityListResultPage) Response() OperationEntityListResult { 554 return page.oelr 555} 556 557// Values returns the slice of values for the current page or nil if there are no values. 558func (page OperationEntityListResultPage) Values() []OperationEntity { 559 if page.oelr.IsEmpty() { 560 return nil 561 } 562 return *page.oelr.Value 563} 564 565// Creates a new instance of the OperationEntityListResultPage type. 566func NewOperationEntityListResultPage(cur OperationEntityListResult, getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage { 567 return OperationEntityListResultPage{ 568 fn: getNextPage, 569 oelr: cur, 570 } 571} 572 573// OperationStatus operation status object 574type OperationStatus struct { 575 autorest.Response `json:"-"` 576 // Name - READ-ONLY; Operation Id 577 Name *string `json:"name,omitempty"` 578 // Status - READ-ONLY; Operation status 579 Status *string `json:"status,omitempty"` 580 // StartTime - READ-ONLY; Start time of the operation 581 StartTime *date.Time `json:"startTime,omitempty"` 582 // EndTime - READ-ONLY; End time of the operation 583 EndTime *date.Time `json:"endTime,omitempty"` 584 // Error - READ-ONLY; Error details. 585 Error *APIError `json:"error,omitempty"` 586} 587 588// PostBackupResponse post Backup Response 589type PostBackupResponse struct { 590 autorest.Response `json:"-"` 591 // PostBackupResponseProperties - Post Backup Response Properties 592 *PostBackupResponseProperties `json:"backupMetadata,omitempty"` 593} 594 595// MarshalJSON is the custom marshaler for PostBackupResponse. 596func (pbr PostBackupResponse) MarshalJSON() ([]byte, error) { 597 objectMap := make(map[string]interface{}) 598 if pbr.PostBackupResponseProperties != nil { 599 objectMap["backupMetadata"] = pbr.PostBackupResponseProperties 600 } 601 return json.Marshal(objectMap) 602} 603 604// UnmarshalJSON is the custom unmarshaler for PostBackupResponse struct. 605func (pbr *PostBackupResponse) UnmarshalJSON(body []byte) error { 606 var m map[string]*json.RawMessage 607 err := json.Unmarshal(body, &m) 608 if err != nil { 609 return err 610 } 611 for k, v := range m { 612 switch k { 613 case "backupMetadata": 614 if v != nil { 615 var postBackupResponseProperties PostBackupResponseProperties 616 err = json.Unmarshal(*v, &postBackupResponseProperties) 617 if err != nil { 618 return err 619 } 620 pbr.PostBackupResponseProperties = &postBackupResponseProperties 621 } 622 } 623 } 624 625 return nil 626} 627 628// PostBackupResponseProperties post Backup Response Properties object. 629type PostBackupResponseProperties struct { 630 // CloudEndpointName - READ-ONLY; cloud endpoint Name. 631 CloudEndpointName *string `json:"cloudEndpointName,omitempty"` 632} 633 634// PostRestoreRequest post Restore Request 635type PostRestoreRequest struct { 636 // Partition - Post Restore partition. 637 Partition *string `json:"partition,omitempty"` 638 // ReplicaGroup - Post Restore replica group. 639 ReplicaGroup *string `json:"replicaGroup,omitempty"` 640 // RequestID - Post Restore request id. 641 RequestID *string `json:"requestId,omitempty"` 642 // AzureFileShareURI - Post Restore Azure file share uri. 643 AzureFileShareURI *string `json:"azureFileShareUri,omitempty"` 644 // Status - Post Restore Azure status. 645 Status *string `json:"status,omitempty"` 646 // SourceAzureFileShareURI - Post Restore Azure source azure file share uri. 647 SourceAzureFileShareURI *string `json:"sourceAzureFileShareUri,omitempty"` 648 // FailedFileList - Post Restore Azure failed file list. 649 FailedFileList *string `json:"failedFileList,omitempty"` 650 // RestoreFileSpec - Post Restore restore file spec array. 651 RestoreFileSpec *[]RestoreFileSpec `json:"restoreFileSpec,omitempty"` 652} 653 654// PreRestoreRequest pre Restore request object. 655type PreRestoreRequest struct { 656 // Partition - Pre Restore partition. 657 Partition *string `json:"partition,omitempty"` 658 // ReplicaGroup - Pre Restore replica group. 659 ReplicaGroup *string `json:"replicaGroup,omitempty"` 660 // RequestID - Pre Restore request id. 661 RequestID *string `json:"requestId,omitempty"` 662 // AzureFileShareURI - Pre Restore Azure file share uri. 663 AzureFileShareURI *string `json:"azureFileShareUri,omitempty"` 664 // Status - Pre Restore Azure status. 665 Status *string `json:"status,omitempty"` 666 // SourceAzureFileShareURI - Pre Restore Azure source azure file share uri. 667 SourceAzureFileShareURI *string `json:"sourceAzureFileShareUri,omitempty"` 668 // BackupMetadataPropertyBag - Pre Restore backup metadata property bag. 669 BackupMetadataPropertyBag *string `json:"backupMetadataPropertyBag,omitempty"` 670 // RestoreFileSpec - Pre Restore restore file spec array. 671 RestoreFileSpec *[]RestoreFileSpec `json:"restoreFileSpec,omitempty"` 672 // PauseWaitForSyncDrainTimePeriodInSeconds - Pre Restore pause wait for sync drain time period in seconds. 673 PauseWaitForSyncDrainTimePeriodInSeconds *int32 `json:"pauseWaitForSyncDrainTimePeriodInSeconds,omitempty"` 674} 675 676// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not 677// have tags and a location 678type ProxyResource struct { 679 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 680 ID *string `json:"id,omitempty"` 681 // Name - READ-ONLY; The name of the resource 682 Name *string `json:"name,omitempty"` 683 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 684 Type *string `json:"type,omitempty"` 685} 686 687// RecallActionParameters the parameters used when calling recall action on server endpoint. 688type RecallActionParameters struct { 689 // Pattern - Pattern of the files. 690 Pattern *string `json:"pattern,omitempty"` 691 // RecallPath - Recall path. 692 RecallPath *string `json:"recallPath,omitempty"` 693} 694 695// RegisteredServer registered Server resource. 696type RegisteredServer struct { 697 autorest.Response `json:"-"` 698 // RegisteredServerProperties - RegisteredServer properties. 699 *RegisteredServerProperties `json:"properties,omitempty"` 700 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 701 ID *string `json:"id,omitempty"` 702 // Name - READ-ONLY; The name of the resource 703 Name *string `json:"name,omitempty"` 704 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 705 Type *string `json:"type,omitempty"` 706} 707 708// MarshalJSON is the custom marshaler for RegisteredServer. 709func (rs RegisteredServer) MarshalJSON() ([]byte, error) { 710 objectMap := make(map[string]interface{}) 711 if rs.RegisteredServerProperties != nil { 712 objectMap["properties"] = rs.RegisteredServerProperties 713 } 714 return json.Marshal(objectMap) 715} 716 717// UnmarshalJSON is the custom unmarshaler for RegisteredServer struct. 718func (rs *RegisteredServer) UnmarshalJSON(body []byte) error { 719 var m map[string]*json.RawMessage 720 err := json.Unmarshal(body, &m) 721 if err != nil { 722 return err 723 } 724 for k, v := range m { 725 switch k { 726 case "properties": 727 if v != nil { 728 var registeredServerProperties RegisteredServerProperties 729 err = json.Unmarshal(*v, ®isteredServerProperties) 730 if err != nil { 731 return err 732 } 733 rs.RegisteredServerProperties = ®isteredServerProperties 734 } 735 case "id": 736 if v != nil { 737 var ID string 738 err = json.Unmarshal(*v, &ID) 739 if err != nil { 740 return err 741 } 742 rs.ID = &ID 743 } 744 case "name": 745 if v != nil { 746 var name string 747 err = json.Unmarshal(*v, &name) 748 if err != nil { 749 return err 750 } 751 rs.Name = &name 752 } 753 case "type": 754 if v != nil { 755 var typeVar string 756 err = json.Unmarshal(*v, &typeVar) 757 if err != nil { 758 return err 759 } 760 rs.Type = &typeVar 761 } 762 } 763 } 764 765 return nil 766} 767 768// RegisteredServerArray array of RegisteredServer 769type RegisteredServerArray struct { 770 autorest.Response `json:"-"` 771 // Value - Collection of Registered Server. 772 Value *[]RegisteredServer `json:"value,omitempty"` 773} 774 775// RegisteredServerCreateParameters the parameters used when creating a registered server. 776type RegisteredServerCreateParameters struct { 777 // RegisteredServerCreateParametersProperties - The parameters used to create the registered server. 778 *RegisteredServerCreateParametersProperties `json:"properties,omitempty"` 779 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 780 ID *string `json:"id,omitempty"` 781 // Name - READ-ONLY; The name of the resource 782 Name *string `json:"name,omitempty"` 783 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 784 Type *string `json:"type,omitempty"` 785} 786 787// MarshalJSON is the custom marshaler for RegisteredServerCreateParameters. 788func (rscp RegisteredServerCreateParameters) MarshalJSON() ([]byte, error) { 789 objectMap := make(map[string]interface{}) 790 if rscp.RegisteredServerCreateParametersProperties != nil { 791 objectMap["properties"] = rscp.RegisteredServerCreateParametersProperties 792 } 793 return json.Marshal(objectMap) 794} 795 796// UnmarshalJSON is the custom unmarshaler for RegisteredServerCreateParameters struct. 797func (rscp *RegisteredServerCreateParameters) UnmarshalJSON(body []byte) error { 798 var m map[string]*json.RawMessage 799 err := json.Unmarshal(body, &m) 800 if err != nil { 801 return err 802 } 803 for k, v := range m { 804 switch k { 805 case "properties": 806 if v != nil { 807 var registeredServerCreateParametersProperties RegisteredServerCreateParametersProperties 808 err = json.Unmarshal(*v, ®isteredServerCreateParametersProperties) 809 if err != nil { 810 return err 811 } 812 rscp.RegisteredServerCreateParametersProperties = ®isteredServerCreateParametersProperties 813 } 814 case "id": 815 if v != nil { 816 var ID string 817 err = json.Unmarshal(*v, &ID) 818 if err != nil { 819 return err 820 } 821 rscp.ID = &ID 822 } 823 case "name": 824 if v != nil { 825 var name string 826 err = json.Unmarshal(*v, &name) 827 if err != nil { 828 return err 829 } 830 rscp.Name = &name 831 } 832 case "type": 833 if v != nil { 834 var typeVar string 835 err = json.Unmarshal(*v, &typeVar) 836 if err != nil { 837 return err 838 } 839 rscp.Type = &typeVar 840 } 841 } 842 } 843 844 return nil 845} 846 847// RegisteredServerCreateParametersProperties ... 848type RegisteredServerCreateParametersProperties struct { 849 // ServerCertificate - Registered Server Certificate 850 ServerCertificate *string `json:"serverCertificate,omitempty"` 851 // AgentVersion - Registered Server Agent Version 852 AgentVersion *string `json:"agentVersion,omitempty"` 853 // ServerOSVersion - Registered Server OS Version 854 ServerOSVersion *string `json:"serverOSVersion,omitempty"` 855 // LastHeartBeat - Registered Server last heart beat 856 LastHeartBeat *string `json:"lastHeartBeat,omitempty"` 857 // ServerRole - Registered Server serverRole 858 ServerRole *string `json:"serverRole,omitempty"` 859 // ClusterID - Registered Server clusterId 860 ClusterID *string `json:"clusterId,omitempty"` 861 // ClusterName - Registered Server clusterName 862 ClusterName *string `json:"clusterName,omitempty"` 863 // ServerID - Registered Server serverId 864 ServerID *string `json:"serverId,omitempty"` 865 // FriendlyName - Friendly Name 866 FriendlyName *string `json:"friendlyName,omitempty"` 867} 868 869// RegisteredServerProperties registeredServer Properties object. 870type RegisteredServerProperties struct { 871 // ServerCertificate - Registered Server Certificate 872 ServerCertificate *string `json:"serverCertificate,omitempty"` 873 // AgentVersion - Registered Server Agent Version 874 AgentVersion *string `json:"agentVersion,omitempty"` 875 // ServerOSVersion - Registered Server OS Version 876 ServerOSVersion *string `json:"serverOSVersion,omitempty"` 877 // ServerManagementErrorCode - Registered Server Management Error Code 878 ServerManagementErrorCode *int32 `json:"serverManagementErrorCode,omitempty"` 879 // LastHeartBeat - Registered Server last heart beat 880 LastHeartBeat *string `json:"lastHeartBeat,omitempty"` 881 // ProvisioningState - Registered Server Provisioning State 882 ProvisioningState *string `json:"provisioningState,omitempty"` 883 // ServerRole - Registered Server serverRole 884 ServerRole *string `json:"serverRole,omitempty"` 885 // ClusterID - Registered Server clusterId 886 ClusterID *string `json:"clusterId,omitempty"` 887 // ClusterName - Registered Server clusterName 888 ClusterName *string `json:"clusterName,omitempty"` 889 // ServerID - Registered Server serverId 890 ServerID *string `json:"serverId,omitempty"` 891 // StorageSyncServiceUID - Registered Server storageSyncServiceUid 892 StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"` 893 // LastWorkflowID - Registered Server lastWorkflowId 894 LastWorkflowID *string `json:"lastWorkflowId,omitempty"` 895 // LastOperationName - Resource Last Operation Name 896 LastOperationName *string `json:"lastOperationName,omitempty"` 897 // DiscoveryEndpointURI - Resource discoveryEndpointUri 898 DiscoveryEndpointURI *string `json:"discoveryEndpointUri,omitempty"` 899 // ResourceLocation - Resource Location 900 ResourceLocation *string `json:"resourceLocation,omitempty"` 901 // ServiceLocation - Service Location 902 ServiceLocation *string `json:"serviceLocation,omitempty"` 903 // FriendlyName - Friendly Name 904 FriendlyName *string `json:"friendlyName,omitempty"` 905 // ManagementEndpointURI - Management Endpoint Uri 906 ManagementEndpointURI *string `json:"managementEndpointUri,omitempty"` 907 // MonitoringConfiguration - Monitoring Configuration 908 MonitoringConfiguration *string `json:"monitoringConfiguration,omitempty"` 909} 910 911// RegisteredServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running 912// operation. 913type RegisteredServersCreateFuture struct { 914 azure.FutureAPI 915 // Result returns the result of the asynchronous operation. 916 // If the operation has not completed it will return an error. 917 Result func(RegisteredServersClient) (RegisteredServer, error) 918} 919 920// RegisteredServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 921// operation. 922type RegisteredServersDeleteFuture struct { 923 azure.FutureAPI 924 // Result returns the result of the asynchronous operation. 925 // If the operation has not completed it will return an error. 926 Result func(RegisteredServersClient) (autorest.Response, error) 927} 928 929// RegisteredServersTriggerRolloverFuture an abstraction for monitoring and retrieving the results of a 930// long-running operation. 931type RegisteredServersTriggerRolloverFuture struct { 932 azure.FutureAPI 933 // Result returns the result of the asynchronous operation. 934 // If the operation has not completed it will return an error. 935 Result func(RegisteredServersClient) (autorest.Response, error) 936} 937 938// Resource common fields that are returned in the response for all Azure Resource Manager resources 939type Resource struct { 940 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 941 ID *string `json:"id,omitempty"` 942 // Name - READ-ONLY; The name of the resource 943 Name *string `json:"name,omitempty"` 944 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 945 Type *string `json:"type,omitempty"` 946} 947 948// ResourcesMoveInfo resource Move Info. 949type ResourcesMoveInfo struct { 950 // TargetResourceGroup - Target resource group. 951 TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` 952 // Resources - Collection of Resources. 953 Resources *[]string `json:"resources,omitempty"` 954} 955 956// RestoreFileSpec restore file spec. 957type RestoreFileSpec struct { 958 // Path - Restore file spec path 959 Path *string `json:"path,omitempty"` 960 // Isdir - Restore file spec isdir 961 Isdir *bool `json:"isdir,omitempty"` 962} 963 964// ServerEndpoint server Endpoint object. 965type ServerEndpoint struct { 966 autorest.Response `json:"-"` 967 // ServerEndpointProperties - Server Endpoint properties. 968 *ServerEndpointProperties `json:"properties,omitempty"` 969 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 970 ID *string `json:"id,omitempty"` 971 // Name - READ-ONLY; The name of the resource 972 Name *string `json:"name,omitempty"` 973 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 974 Type *string `json:"type,omitempty"` 975} 976 977// MarshalJSON is the custom marshaler for ServerEndpoint. 978func (se ServerEndpoint) MarshalJSON() ([]byte, error) { 979 objectMap := make(map[string]interface{}) 980 if se.ServerEndpointProperties != nil { 981 objectMap["properties"] = se.ServerEndpointProperties 982 } 983 return json.Marshal(objectMap) 984} 985 986// UnmarshalJSON is the custom unmarshaler for ServerEndpoint struct. 987func (se *ServerEndpoint) UnmarshalJSON(body []byte) error { 988 var m map[string]*json.RawMessage 989 err := json.Unmarshal(body, &m) 990 if err != nil { 991 return err 992 } 993 for k, v := range m { 994 switch k { 995 case "properties": 996 if v != nil { 997 var serverEndpointProperties ServerEndpointProperties 998 err = json.Unmarshal(*v, &serverEndpointProperties) 999 if err != nil { 1000 return err 1001 } 1002 se.ServerEndpointProperties = &serverEndpointProperties 1003 } 1004 case "id": 1005 if v != nil { 1006 var ID string 1007 err = json.Unmarshal(*v, &ID) 1008 if err != nil { 1009 return err 1010 } 1011 se.ID = &ID 1012 } 1013 case "name": 1014 if v != nil { 1015 var name string 1016 err = json.Unmarshal(*v, &name) 1017 if err != nil { 1018 return err 1019 } 1020 se.Name = &name 1021 } 1022 case "type": 1023 if v != nil { 1024 var typeVar string 1025 err = json.Unmarshal(*v, &typeVar) 1026 if err != nil { 1027 return err 1028 } 1029 se.Type = &typeVar 1030 } 1031 } 1032 } 1033 1034 return nil 1035} 1036 1037// ServerEndpointArray array of ServerEndpoint 1038type ServerEndpointArray struct { 1039 autorest.Response `json:"-"` 1040 // Value - Collection of ServerEndpoint. 1041 Value *[]ServerEndpoint `json:"value,omitempty"` 1042} 1043 1044// ServerEndpointCloudTieringStatus server endpoint cloud tiering status object. 1045type ServerEndpointCloudTieringStatus struct { 1046 // Health - READ-ONLY; Cloud tiering health state. Possible values include: 'HealthHealthy', 'HealthError' 1047 Health Health `json:"health,omitempty"` 1048 // LastUpdatedTimestamp - READ-ONLY; Last updated timestamp 1049 LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"` 1050 // LastCloudTieringResult - READ-ONLY; Last cloud tiering result (HResult) 1051 LastCloudTieringResult *int32 `json:"lastCloudTieringResult,omitempty"` 1052 // LastSuccessTimestamp - READ-ONLY; Last cloud tiering success timestamp 1053 LastSuccessTimestamp *date.Time `json:"lastSuccessTimestamp,omitempty"` 1054} 1055 1056// ServerEndpointCreateParameters the parameters used when creating a server endpoint. 1057type ServerEndpointCreateParameters struct { 1058 // ServerEndpointCreateParametersProperties - The parameters used to create the server endpoint. 1059 *ServerEndpointCreateParametersProperties `json:"properties,omitempty"` 1060 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1061 ID *string `json:"id,omitempty"` 1062 // Name - READ-ONLY; The name of the resource 1063 Name *string `json:"name,omitempty"` 1064 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1065 Type *string `json:"type,omitempty"` 1066} 1067 1068// MarshalJSON is the custom marshaler for ServerEndpointCreateParameters. 1069func (secp ServerEndpointCreateParameters) MarshalJSON() ([]byte, error) { 1070 objectMap := make(map[string]interface{}) 1071 if secp.ServerEndpointCreateParametersProperties != nil { 1072 objectMap["properties"] = secp.ServerEndpointCreateParametersProperties 1073 } 1074 return json.Marshal(objectMap) 1075} 1076 1077// UnmarshalJSON is the custom unmarshaler for ServerEndpointCreateParameters struct. 1078func (secp *ServerEndpointCreateParameters) UnmarshalJSON(body []byte) error { 1079 var m map[string]*json.RawMessage 1080 err := json.Unmarshal(body, &m) 1081 if err != nil { 1082 return err 1083 } 1084 for k, v := range m { 1085 switch k { 1086 case "properties": 1087 if v != nil { 1088 var serverEndpointCreateParametersProperties ServerEndpointCreateParametersProperties 1089 err = json.Unmarshal(*v, &serverEndpointCreateParametersProperties) 1090 if err != nil { 1091 return err 1092 } 1093 secp.ServerEndpointCreateParametersProperties = &serverEndpointCreateParametersProperties 1094 } 1095 case "id": 1096 if v != nil { 1097 var ID string 1098 err = json.Unmarshal(*v, &ID) 1099 if err != nil { 1100 return err 1101 } 1102 secp.ID = &ID 1103 } 1104 case "name": 1105 if v != nil { 1106 var name string 1107 err = json.Unmarshal(*v, &name) 1108 if err != nil { 1109 return err 1110 } 1111 secp.Name = &name 1112 } 1113 case "type": 1114 if v != nil { 1115 var typeVar string 1116 err = json.Unmarshal(*v, &typeVar) 1117 if err != nil { 1118 return err 1119 } 1120 secp.Type = &typeVar 1121 } 1122 } 1123 } 1124 1125 return nil 1126} 1127 1128// ServerEndpointCreateParametersProperties serverEndpoint Properties object. 1129type ServerEndpointCreateParametersProperties struct { 1130 // ServerLocalPath - Server Local path. 1131 ServerLocalPath *string `json:"serverLocalPath,omitempty"` 1132 // CloudTiering - Cloud Tiering. Possible values include: 'On', 'Off' 1133 CloudTiering CloudTiering `json:"cloudTiering,omitempty"` 1134 // VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled. 1135 VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"` 1136 // TierFilesOlderThanDays - Tier files older than days. 1137 TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"` 1138 // FriendlyName - Friendly Name 1139 FriendlyName *string `json:"friendlyName,omitempty"` 1140 // ServerResourceID - Server Resource Id. 1141 ServerResourceID *string `json:"serverResourceId,omitempty"` 1142 // OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransferOn', 'OfflineDataTransferOff' 1143 OfflineDataTransfer OfflineDataTransfer `json:"offlineDataTransfer,omitempty"` 1144 // OfflineDataTransferShareName - Offline data transfer share name 1145 OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"` 1146} 1147 1148// ServerEndpointFilesNotSyncingError files not syncing error object 1149type ServerEndpointFilesNotSyncingError struct { 1150 // ErrorCode - READ-ONLY; Error code (HResult) 1151 ErrorCode *int32 `json:"errorCode,omitempty"` 1152 // PersistentCount - READ-ONLY; Count of persistent files not syncing with the specified error code 1153 PersistentCount *int64 `json:"persistentCount,omitempty"` 1154 // TransientCount - READ-ONLY; Count of transient files not syncing with the specified error code 1155 TransientCount *int64 `json:"transientCount,omitempty"` 1156} 1157 1158// ServerEndpointProperties serverEndpoint Properties object. 1159type ServerEndpointProperties struct { 1160 // ServerLocalPath - Server Local path. 1161 ServerLocalPath *string `json:"serverLocalPath,omitempty"` 1162 // CloudTiering - Cloud Tiering. Possible values include: 'CloudTiering2On', 'CloudTiering2Off' 1163 CloudTiering CloudTiering2 `json:"cloudTiering,omitempty"` 1164 // VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled. 1165 VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"` 1166 // TierFilesOlderThanDays - Tier files older than days. 1167 TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"` 1168 // FriendlyName - Friendly Name 1169 FriendlyName *string `json:"friendlyName,omitempty"` 1170 // ServerResourceID - Server Resource Id. 1171 ServerResourceID *string `json:"serverResourceId,omitempty"` 1172 // ProvisioningState - READ-ONLY; ServerEndpoint Provisioning State 1173 ProvisioningState *string `json:"provisioningState,omitempty"` 1174 // LastWorkflowID - READ-ONLY; ServerEndpoint lastWorkflowId 1175 LastWorkflowID *string `json:"lastWorkflowId,omitempty"` 1176 // LastOperationName - READ-ONLY; Resource Last Operation Name 1177 LastOperationName *string `json:"lastOperationName,omitempty"` 1178 // SyncStatus - READ-ONLY; Server Endpoint sync status 1179 SyncStatus *ServerEndpointSyncStatus `json:"syncStatus,omitempty"` 1180 // OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransfer2On', 'OfflineDataTransfer2Off' 1181 OfflineDataTransfer OfflineDataTransfer2 `json:"offlineDataTransfer,omitempty"` 1182 // OfflineDataTransferStorageAccountResourceID - READ-ONLY; Offline data transfer storage account resource ID 1183 OfflineDataTransferStorageAccountResourceID *string `json:"offlineDataTransferStorageAccountResourceId,omitempty"` 1184 // OfflineDataTransferStorageAccountTenantID - READ-ONLY; Offline data transfer storage account tenant ID 1185 OfflineDataTransferStorageAccountTenantID *string `json:"offlineDataTransferStorageAccountTenantId,omitempty"` 1186 // OfflineDataTransferShareName - Offline data transfer share name 1187 OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"` 1188 // CloudTieringStatus - READ-ONLY; Cloud tiering status. Only populated if cloud tiering is enabled. 1189 CloudTieringStatus *ServerEndpointCloudTieringStatus `json:"cloudTieringStatus,omitempty"` 1190 // RecallStatus - READ-ONLY; Recall status. Only populated if cloud tiering is enabled. 1191 RecallStatus *ServerEndpointRecallStatus `json:"recallStatus,omitempty"` 1192} 1193 1194// MarshalJSON is the custom marshaler for ServerEndpointProperties. 1195func (sep ServerEndpointProperties) MarshalJSON() ([]byte, error) { 1196 objectMap := make(map[string]interface{}) 1197 if sep.ServerLocalPath != nil { 1198 objectMap["serverLocalPath"] = sep.ServerLocalPath 1199 } 1200 if sep.CloudTiering != "" { 1201 objectMap["cloudTiering"] = sep.CloudTiering 1202 } 1203 if sep.VolumeFreeSpacePercent != nil { 1204 objectMap["volumeFreeSpacePercent"] = sep.VolumeFreeSpacePercent 1205 } 1206 if sep.TierFilesOlderThanDays != nil { 1207 objectMap["tierFilesOlderThanDays"] = sep.TierFilesOlderThanDays 1208 } 1209 if sep.FriendlyName != nil { 1210 objectMap["friendlyName"] = sep.FriendlyName 1211 } 1212 if sep.ServerResourceID != nil { 1213 objectMap["serverResourceId"] = sep.ServerResourceID 1214 } 1215 if sep.OfflineDataTransfer != "" { 1216 objectMap["offlineDataTransfer"] = sep.OfflineDataTransfer 1217 } 1218 if sep.OfflineDataTransferShareName != nil { 1219 objectMap["offlineDataTransferShareName"] = sep.OfflineDataTransferShareName 1220 } 1221 return json.Marshal(objectMap) 1222} 1223 1224// ServerEndpointRecallError server endpoint recall error object 1225type ServerEndpointRecallError struct { 1226 // ErrorCode - READ-ONLY; Error code (HResult) 1227 ErrorCode *int32 `json:"errorCode,omitempty"` 1228 // Count - READ-ONLY; Count of occurences of the error 1229 Count *int64 `json:"count,omitempty"` 1230} 1231 1232// ServerEndpointRecallStatus server endpoint recall status object. 1233type ServerEndpointRecallStatus struct { 1234 // LastUpdatedTimestamp - READ-ONLY; Last updated timestamp 1235 LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"` 1236 // TotalRecallErrorsCount - READ-ONLY; Total count of recall errors. 1237 TotalRecallErrorsCount *int64 `json:"totalRecallErrorsCount,omitempty"` 1238 // RecallErrors - READ-ONLY; Array of recall errors 1239 RecallErrors *[]ServerEndpointRecallError `json:"recallErrors,omitempty"` 1240} 1241 1242// ServerEndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running 1243// operation. 1244type ServerEndpointsCreateFuture struct { 1245 azure.FutureAPI 1246 // Result returns the result of the asynchronous operation. 1247 // If the operation has not completed it will return an error. 1248 Result func(ServerEndpointsClient) (ServerEndpoint, error) 1249} 1250 1251// ServerEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 1252// operation. 1253type ServerEndpointsDeleteFuture struct { 1254 azure.FutureAPI 1255 // Result returns the result of the asynchronous operation. 1256 // If the operation has not completed it will return an error. 1257 Result func(ServerEndpointsClient) (autorest.Response, error) 1258} 1259 1260// ServerEndpointsRecallActionFuture an abstraction for monitoring and retrieving the results of a 1261// long-running operation. 1262type ServerEndpointsRecallActionFuture struct { 1263 azure.FutureAPI 1264 // Result returns the result of the asynchronous operation. 1265 // If the operation has not completed it will return an error. 1266 Result func(ServerEndpointsClient) (autorest.Response, error) 1267} 1268 1269// ServerEndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 1270// operation. 1271type ServerEndpointsUpdateFuture struct { 1272 azure.FutureAPI 1273 // Result returns the result of the asynchronous operation. 1274 // If the operation has not completed it will return an error. 1275 Result func(ServerEndpointsClient) (ServerEndpoint, error) 1276} 1277 1278// ServerEndpointSyncActivityStatus sync Session status object. 1279type ServerEndpointSyncActivityStatus struct { 1280 // Timestamp - READ-ONLY; Timestamp when properties were updated 1281 Timestamp *date.Time `json:"timestamp,omitempty"` 1282 // PerItemErrorCount - READ-ONLY; Per item error count 1283 PerItemErrorCount *int64 `json:"perItemErrorCount,omitempty"` 1284 // AppliedItemCount - READ-ONLY; Applied item count. 1285 AppliedItemCount *int64 `json:"appliedItemCount,omitempty"` 1286 // TotalItemCount - READ-ONLY; Total item count (if available) 1287 TotalItemCount *int64 `json:"totalItemCount,omitempty"` 1288 // AppliedBytes - READ-ONLY; Applied bytes 1289 AppliedBytes *int64 `json:"appliedBytes,omitempty"` 1290 // TotalBytes - READ-ONLY; Total bytes (if available) 1291 TotalBytes *int64 `json:"totalBytes,omitempty"` 1292} 1293 1294// ServerEndpointSyncSessionStatus sync Session status object. 1295type ServerEndpointSyncSessionStatus struct { 1296 // LastSyncResult - READ-ONLY; Last sync result (HResult) 1297 LastSyncResult *int32 `json:"lastSyncResult,omitempty"` 1298 // LastSyncTimestamp - READ-ONLY; Last sync timestamp 1299 LastSyncTimestamp *date.Time `json:"lastSyncTimestamp,omitempty"` 1300 // LastSyncSuccessTimestamp - READ-ONLY; Last sync success timestamp 1301 LastSyncSuccessTimestamp *date.Time `json:"lastSyncSuccessTimestamp,omitempty"` 1302 // LastSyncPerItemErrorCount - READ-ONLY; Last sync per item error count. 1303 LastSyncPerItemErrorCount *int64 `json:"lastSyncPerItemErrorCount,omitempty"` 1304 // PersistentFilesNotSyncingCount - READ-ONLY; Count of persistent files not syncing. 1305 PersistentFilesNotSyncingCount *int64 `json:"persistentFilesNotSyncingCount,omitempty"` 1306 // TransientFilesNotSyncingCount - READ-ONLY; Count of transient files not syncing. 1307 TransientFilesNotSyncingCount *int64 `json:"transientFilesNotSyncingCount,omitempty"` 1308 // FilesNotSyncingErrors - READ-ONLY; Array of per-item errors coming from the last sync session. 1309 FilesNotSyncingErrors *[]ServerEndpointFilesNotSyncingError `json:"filesNotSyncingErrors,omitempty"` 1310} 1311 1312// ServerEndpointSyncStatus server Endpoint sync status 1313type ServerEndpointSyncStatus struct { 1314 // DownloadHealth - READ-ONLY; Download Health Status. Possible values include: 'DownloadHealthHealthy', 'DownloadHealthError', 'DownloadHealthSyncBlockedForRestore', 'DownloadHealthSyncBlockedForChangeDetectionPostRestore', 'DownloadHealthNoActivity' 1315 DownloadHealth DownloadHealth `json:"downloadHealth,omitempty"` 1316 // UploadHealth - READ-ONLY; Upload Health Status. Possible values include: 'UploadHealthHealthy', 'UploadHealthError', 'UploadHealthSyncBlockedForRestore', 'UploadHealthSyncBlockedForChangeDetectionPostRestore', 'UploadHealthNoActivity' 1317 UploadHealth UploadHealth `json:"uploadHealth,omitempty"` 1318 // CombinedHealth - READ-ONLY; Combined Health Status. Possible values include: 'CombinedHealthHealthy', 'CombinedHealthError', 'CombinedHealthSyncBlockedForRestore', 'CombinedHealthSyncBlockedForChangeDetectionPostRestore', 'CombinedHealthNoActivity' 1319 CombinedHealth CombinedHealth `json:"combinedHealth,omitempty"` 1320 // SyncActivity - READ-ONLY; Sync activity. Possible values include: 'Upload', 'Download', 'UploadAndDownload' 1321 SyncActivity SyncActivity `json:"syncActivity,omitempty"` 1322 // TotalPersistentFilesNotSyncingCount - READ-ONLY; Total count of persistent files not syncing (combined upload + download). 1323 TotalPersistentFilesNotSyncingCount *int64 `json:"totalPersistentFilesNotSyncingCount,omitempty"` 1324 // LastUpdatedTimestamp - READ-ONLY; Last Updated Timestamp 1325 LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"` 1326 // UploadStatus - READ-ONLY; Upload Status 1327 UploadStatus *ServerEndpointSyncSessionStatus `json:"uploadStatus,omitempty"` 1328 // DownloadStatus - READ-ONLY; Download Status 1329 DownloadStatus *ServerEndpointSyncSessionStatus `json:"downloadStatus,omitempty"` 1330 // UploadActivity - READ-ONLY; Upload sync activity 1331 UploadActivity *ServerEndpointSyncActivityStatus `json:"uploadActivity,omitempty"` 1332 // DownloadActivity - READ-ONLY; Download sync activity 1333 DownloadActivity *ServerEndpointSyncActivityStatus `json:"downloadActivity,omitempty"` 1334 // OfflineDataTransferStatus - READ-ONLY; Offline Data Transfer State. Possible values include: 'InProgress', 'Stopping', 'NotRunning', 'Complete' 1335 OfflineDataTransferStatus OfflineDataTransferStatus `json:"offlineDataTransferStatus,omitempty"` 1336} 1337 1338// ServerEndpointUpdateParameters parameters for updating an Server Endpoint. 1339type ServerEndpointUpdateParameters struct { 1340 // ServerEndpointUpdateProperties - The properties of the server endpoint. 1341 *ServerEndpointUpdateProperties `json:"properties,omitempty"` 1342} 1343 1344// MarshalJSON is the custom marshaler for ServerEndpointUpdateParameters. 1345func (seup ServerEndpointUpdateParameters) MarshalJSON() ([]byte, error) { 1346 objectMap := make(map[string]interface{}) 1347 if seup.ServerEndpointUpdateProperties != nil { 1348 objectMap["properties"] = seup.ServerEndpointUpdateProperties 1349 } 1350 return json.Marshal(objectMap) 1351} 1352 1353// UnmarshalJSON is the custom unmarshaler for ServerEndpointUpdateParameters struct. 1354func (seup *ServerEndpointUpdateParameters) UnmarshalJSON(body []byte) error { 1355 var m map[string]*json.RawMessage 1356 err := json.Unmarshal(body, &m) 1357 if err != nil { 1358 return err 1359 } 1360 for k, v := range m { 1361 switch k { 1362 case "properties": 1363 if v != nil { 1364 var serverEndpointUpdateProperties ServerEndpointUpdateProperties 1365 err = json.Unmarshal(*v, &serverEndpointUpdateProperties) 1366 if err != nil { 1367 return err 1368 } 1369 seup.ServerEndpointUpdateProperties = &serverEndpointUpdateProperties 1370 } 1371 } 1372 } 1373 1374 return nil 1375} 1376 1377// ServerEndpointUpdateProperties serverEndpoint Update Properties object. 1378type ServerEndpointUpdateProperties struct { 1379 // CloudTiering - Cloud Tiering. Possible values include: 'CloudTiering1On', 'CloudTiering1Off' 1380 CloudTiering CloudTiering1 `json:"cloudTiering,omitempty"` 1381 // VolumeFreeSpacePercent - Level of free space to be maintained by Cloud Tiering if it is enabled. 1382 VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"` 1383 // TierFilesOlderThanDays - Tier files older than days. 1384 TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"` 1385 // OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransfer1On', 'OfflineDataTransfer1Off' 1386 OfflineDataTransfer OfflineDataTransfer1 `json:"offlineDataTransfer,omitempty"` 1387 // OfflineDataTransferShareName - Offline data transfer share name 1388 OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"` 1389} 1390 1391// Service storage Sync Service object. 1392type Service struct { 1393 autorest.Response `json:"-"` 1394 // ServiceProperties - Storage Sync Service properties. 1395 *ServiceProperties `json:"properties,omitempty"` 1396 // Tags - Resource tags. 1397 Tags map[string]*string `json:"tags"` 1398 // Location - The geo-location where the resource lives 1399 Location *string `json:"location,omitempty"` 1400 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1401 ID *string `json:"id,omitempty"` 1402 // Name - READ-ONLY; The name of the resource 1403 Name *string `json:"name,omitempty"` 1404 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1405 Type *string `json:"type,omitempty"` 1406} 1407 1408// MarshalJSON is the custom marshaler for Service. 1409func (s Service) MarshalJSON() ([]byte, error) { 1410 objectMap := make(map[string]interface{}) 1411 if s.ServiceProperties != nil { 1412 objectMap["properties"] = s.ServiceProperties 1413 } 1414 if s.Tags != nil { 1415 objectMap["tags"] = s.Tags 1416 } 1417 if s.Location != nil { 1418 objectMap["location"] = s.Location 1419 } 1420 return json.Marshal(objectMap) 1421} 1422 1423// UnmarshalJSON is the custom unmarshaler for Service struct. 1424func (s *Service) UnmarshalJSON(body []byte) error { 1425 var m map[string]*json.RawMessage 1426 err := json.Unmarshal(body, &m) 1427 if err != nil { 1428 return err 1429 } 1430 for k, v := range m { 1431 switch k { 1432 case "properties": 1433 if v != nil { 1434 var serviceProperties ServiceProperties 1435 err = json.Unmarshal(*v, &serviceProperties) 1436 if err != nil { 1437 return err 1438 } 1439 s.ServiceProperties = &serviceProperties 1440 } 1441 case "tags": 1442 if v != nil { 1443 var tags map[string]*string 1444 err = json.Unmarshal(*v, &tags) 1445 if err != nil { 1446 return err 1447 } 1448 s.Tags = tags 1449 } 1450 case "location": 1451 if v != nil { 1452 var location string 1453 err = json.Unmarshal(*v, &location) 1454 if err != nil { 1455 return err 1456 } 1457 s.Location = &location 1458 } 1459 case "id": 1460 if v != nil { 1461 var ID string 1462 err = json.Unmarshal(*v, &ID) 1463 if err != nil { 1464 return err 1465 } 1466 s.ID = &ID 1467 } 1468 case "name": 1469 if v != nil { 1470 var name string 1471 err = json.Unmarshal(*v, &name) 1472 if err != nil { 1473 return err 1474 } 1475 s.Name = &name 1476 } 1477 case "type": 1478 if v != nil { 1479 var typeVar string 1480 err = json.Unmarshal(*v, &typeVar) 1481 if err != nil { 1482 return err 1483 } 1484 s.Type = &typeVar 1485 } 1486 } 1487 } 1488 1489 return nil 1490} 1491 1492// ServiceArray array of StorageSyncServices 1493type ServiceArray struct { 1494 autorest.Response `json:"-"` 1495 // Value - Collection of StorageSyncServices. 1496 Value *[]Service `json:"value,omitempty"` 1497} 1498 1499// ServiceCreateParameters the parameters used when creating a storage sync service. 1500type ServiceCreateParameters struct { 1501 // Location - Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. 1502 Location *string `json:"location,omitempty"` 1503 // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used for 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 with a length no greater than 128 characters and a value with a length no greater than 256 characters. 1504 Tags map[string]*string `json:"tags"` 1505 Properties interface{} `json:"properties,omitempty"` 1506} 1507 1508// MarshalJSON is the custom marshaler for ServiceCreateParameters. 1509func (scp ServiceCreateParameters) MarshalJSON() ([]byte, error) { 1510 objectMap := make(map[string]interface{}) 1511 if scp.Location != nil { 1512 objectMap["location"] = scp.Location 1513 } 1514 if scp.Tags != nil { 1515 objectMap["tags"] = scp.Tags 1516 } 1517 if scp.Properties != nil { 1518 objectMap["properties"] = scp.Properties 1519 } 1520 return json.Marshal(objectMap) 1521} 1522 1523// ServiceProperties storage Sync Service Properties object. 1524type ServiceProperties struct { 1525 // StorageSyncServiceStatus - READ-ONLY; Storage Sync service status. 1526 StorageSyncServiceStatus *int32 `json:"storageSyncServiceStatus,omitempty"` 1527 // StorageSyncServiceUID - READ-ONLY; Storage Sync service Uid 1528 StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"` 1529} 1530 1531// ServiceUpdateParameters parameters for updating an Storage sync service. 1532type ServiceUpdateParameters struct { 1533 // Tags - The user-specified tags associated with the storage sync service. 1534 Tags map[string]*string `json:"tags"` 1535 // Properties - The properties of the storage sync service. 1536 Properties interface{} `json:"properties,omitempty"` 1537} 1538 1539// MarshalJSON is the custom marshaler for ServiceUpdateParameters. 1540func (sup ServiceUpdateParameters) MarshalJSON() ([]byte, error) { 1541 objectMap := make(map[string]interface{}) 1542 if sup.Tags != nil { 1543 objectMap["tags"] = sup.Tags 1544 } 1545 if sup.Properties != nil { 1546 objectMap["properties"] = sup.Properties 1547 } 1548 return json.Marshal(objectMap) 1549} 1550 1551// SubscriptionState subscription State object. 1552type SubscriptionState struct { 1553 // State - State of Azure Subscription. Possible values include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted' 1554 State Reason `json:"state,omitempty"` 1555 // Istransitioning - READ-ONLY; Is Transitioning 1556 Istransitioning *bool `json:"istransitioning,omitempty"` 1557 // Properties - Subscription state properties. 1558 Properties interface{} `json:"properties,omitempty"` 1559} 1560 1561// MarshalJSON is the custom marshaler for SubscriptionState. 1562func (ss SubscriptionState) MarshalJSON() ([]byte, error) { 1563 objectMap := make(map[string]interface{}) 1564 if ss.State != "" { 1565 objectMap["state"] = ss.State 1566 } 1567 if ss.Properties != nil { 1568 objectMap["properties"] = ss.Properties 1569 } 1570 return json.Marshal(objectMap) 1571} 1572 1573// SyncGroup sync Group object. 1574type SyncGroup struct { 1575 autorest.Response `json:"-"` 1576 // SyncGroupProperties - SyncGroup properties. 1577 *SyncGroupProperties `json:"properties,omitempty"` 1578 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1579 ID *string `json:"id,omitempty"` 1580 // Name - READ-ONLY; The name of the resource 1581 Name *string `json:"name,omitempty"` 1582 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1583 Type *string `json:"type,omitempty"` 1584} 1585 1586// MarshalJSON is the custom marshaler for SyncGroup. 1587func (sg SyncGroup) MarshalJSON() ([]byte, error) { 1588 objectMap := make(map[string]interface{}) 1589 if sg.SyncGroupProperties != nil { 1590 objectMap["properties"] = sg.SyncGroupProperties 1591 } 1592 return json.Marshal(objectMap) 1593} 1594 1595// UnmarshalJSON is the custom unmarshaler for SyncGroup struct. 1596func (sg *SyncGroup) UnmarshalJSON(body []byte) error { 1597 var m map[string]*json.RawMessage 1598 err := json.Unmarshal(body, &m) 1599 if err != nil { 1600 return err 1601 } 1602 for k, v := range m { 1603 switch k { 1604 case "properties": 1605 if v != nil { 1606 var syncGroupProperties SyncGroupProperties 1607 err = json.Unmarshal(*v, &syncGroupProperties) 1608 if err != nil { 1609 return err 1610 } 1611 sg.SyncGroupProperties = &syncGroupProperties 1612 } 1613 case "id": 1614 if v != nil { 1615 var ID string 1616 err = json.Unmarshal(*v, &ID) 1617 if err != nil { 1618 return err 1619 } 1620 sg.ID = &ID 1621 } 1622 case "name": 1623 if v != nil { 1624 var name string 1625 err = json.Unmarshal(*v, &name) 1626 if err != nil { 1627 return err 1628 } 1629 sg.Name = &name 1630 } 1631 case "type": 1632 if v != nil { 1633 var typeVar string 1634 err = json.Unmarshal(*v, &typeVar) 1635 if err != nil { 1636 return err 1637 } 1638 sg.Type = &typeVar 1639 } 1640 } 1641 } 1642 1643 return nil 1644} 1645 1646// SyncGroupArray array of SyncGroup 1647type SyncGroupArray struct { 1648 autorest.Response `json:"-"` 1649 // Value - Collection of SyncGroup. 1650 Value *[]SyncGroup `json:"value,omitempty"` 1651} 1652 1653// SyncGroupCreateParameters the parameters used when creating a sync group. 1654type SyncGroupCreateParameters struct { 1655 // Properties - The parameters used to create the sync group 1656 Properties interface{} `json:"properties,omitempty"` 1657 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1658 ID *string `json:"id,omitempty"` 1659 // Name - READ-ONLY; The name of the resource 1660 Name *string `json:"name,omitempty"` 1661 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1662 Type *string `json:"type,omitempty"` 1663} 1664 1665// MarshalJSON is the custom marshaler for SyncGroupCreateParameters. 1666func (sgcp SyncGroupCreateParameters) MarshalJSON() ([]byte, error) { 1667 objectMap := make(map[string]interface{}) 1668 if sgcp.Properties != nil { 1669 objectMap["properties"] = sgcp.Properties 1670 } 1671 return json.Marshal(objectMap) 1672} 1673 1674// SyncGroupProperties syncGroup Properties object. 1675type SyncGroupProperties struct { 1676 // UniqueID - READ-ONLY; Unique Id 1677 UniqueID *string `json:"uniqueId,omitempty"` 1678 // SyncGroupStatus - READ-ONLY; Sync group status 1679 SyncGroupStatus *string `json:"syncGroupStatus,omitempty"` 1680} 1681 1682// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource 1683// which has 'tags' and a 'location' 1684type TrackedResource struct { 1685 // Tags - Resource tags. 1686 Tags map[string]*string `json:"tags"` 1687 // Location - The geo-location where the resource lives 1688 Location *string `json:"location,omitempty"` 1689 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1690 ID *string `json:"id,omitempty"` 1691 // Name - READ-ONLY; The name of the resource 1692 Name *string `json:"name,omitempty"` 1693 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1694 Type *string `json:"type,omitempty"` 1695} 1696 1697// MarshalJSON is the custom marshaler for TrackedResource. 1698func (tr TrackedResource) MarshalJSON() ([]byte, error) { 1699 objectMap := make(map[string]interface{}) 1700 if tr.Tags != nil { 1701 objectMap["tags"] = tr.Tags 1702 } 1703 if tr.Location != nil { 1704 objectMap["location"] = tr.Location 1705 } 1706 return json.Marshal(objectMap) 1707} 1708 1709// TriggerChangeDetectionParameters the parameters used when calling trigger change detection action on 1710// cloud endpoint. 1711type TriggerChangeDetectionParameters struct { 1712 // DirectoryPath - Relative path to a directory Azure File share for which change detection is to be performed. 1713 DirectoryPath *string `json:"directoryPath,omitempty"` 1714 // ChangeDetectionMode - Change Detection Mode. Applies to a directory specified in directoryPath parameter. Possible values include: 'Default', 'Recursive' 1715 ChangeDetectionMode ChangeDetectionMode `json:"changeDetectionMode,omitempty"` 1716 // Paths - Array of relative paths on the Azure File share to be included in the change detection. Can be files and directories. 1717 Paths *[]string `json:"paths,omitempty"` 1718} 1719 1720// TriggerRolloverRequest trigger Rollover Request. 1721type TriggerRolloverRequest struct { 1722 // ServerCertificate - Certificate Data 1723 ServerCertificate *string `json:"serverCertificate,omitempty"` 1724} 1725 1726// Workflow workflow resource. 1727type Workflow struct { 1728 autorest.Response `json:"-"` 1729 // WorkflowProperties - Workflow properties. 1730 *WorkflowProperties `json:"properties,omitempty"` 1731 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1732 ID *string `json:"id,omitempty"` 1733 // Name - READ-ONLY; The name of the resource 1734 Name *string `json:"name,omitempty"` 1735 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1736 Type *string `json:"type,omitempty"` 1737} 1738 1739// MarshalJSON is the custom marshaler for Workflow. 1740func (w Workflow) MarshalJSON() ([]byte, error) { 1741 objectMap := make(map[string]interface{}) 1742 if w.WorkflowProperties != nil { 1743 objectMap["properties"] = w.WorkflowProperties 1744 } 1745 return json.Marshal(objectMap) 1746} 1747 1748// UnmarshalJSON is the custom unmarshaler for Workflow struct. 1749func (w *Workflow) UnmarshalJSON(body []byte) error { 1750 var m map[string]*json.RawMessage 1751 err := json.Unmarshal(body, &m) 1752 if err != nil { 1753 return err 1754 } 1755 for k, v := range m { 1756 switch k { 1757 case "properties": 1758 if v != nil { 1759 var workflowProperties WorkflowProperties 1760 err = json.Unmarshal(*v, &workflowProperties) 1761 if err != nil { 1762 return err 1763 } 1764 w.WorkflowProperties = &workflowProperties 1765 } 1766 case "id": 1767 if v != nil { 1768 var ID string 1769 err = json.Unmarshal(*v, &ID) 1770 if err != nil { 1771 return err 1772 } 1773 w.ID = &ID 1774 } 1775 case "name": 1776 if v != nil { 1777 var name string 1778 err = json.Unmarshal(*v, &name) 1779 if err != nil { 1780 return err 1781 } 1782 w.Name = &name 1783 } 1784 case "type": 1785 if v != nil { 1786 var typeVar string 1787 err = json.Unmarshal(*v, &typeVar) 1788 if err != nil { 1789 return err 1790 } 1791 w.Type = &typeVar 1792 } 1793 } 1794 } 1795 1796 return nil 1797} 1798 1799// WorkflowArray array of Workflow 1800type WorkflowArray struct { 1801 autorest.Response `json:"-"` 1802 // Value - Collection of workflow items. 1803 Value *[]Workflow `json:"value,omitempty"` 1804} 1805 1806// WorkflowProperties workflow Properties object. 1807type WorkflowProperties struct { 1808 // LastStepName - last step name 1809 LastStepName *string `json:"lastStepName,omitempty"` 1810 // Status - workflow status. Possible values include: 'Active', 'Expired', 'Succeeded', 'Aborted', 'Failed' 1811 Status Status `json:"status,omitempty"` 1812 // Operation - operation direction. Possible values include: 'Do', 'Undo', 'Cancel' 1813 Operation Operation `json:"operation,omitempty"` 1814 // Steps - workflow steps 1815 Steps *string `json:"steps,omitempty"` 1816 // LastOperationID - workflow last operation identifier. 1817 LastOperationID *string `json:"lastOperationId,omitempty"` 1818} 1819