From dee13073bc53c8c612e64519e7cf2ff15d1d8c95 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 26 Apr 2023 03:20:06 +0000 Subject: [PATCH] CodeGen from PR 23711 in Azure/azure-rest-api-specs Merge 4d04b6c6248cb7975421cd5b76c74db81088f79a into b73e2d320f1ae530ea5e78625dfe14a921dcf011 --- .../databox/armdatabox/CHANGELOG.md | 33 + .../databox/armdatabox/autorest.md | 6 +- .../databox/armdatabox/constants.go | 65 +- sdk/resourcemanager/databox/armdatabox/go.mod | 16 +- sdk/resourcemanager/databox/armdatabox/go.sum | 22 +- .../databox/armdatabox/jobs_client.go | 46 +- .../armdatabox/jobs_client_example_test.go | 3084 ----------------- .../databox/armdatabox/management_client.go | 4 +- .../management_client_example_test.go | 38 - .../databox/armdatabox/models.go | 119 +- .../databox/armdatabox/models_serde.go | 188 +- .../databox/armdatabox/operations_client.go | 4 +- .../operations_client_example_test.go | 250 -- .../databox/armdatabox/service_client.go | 24 +- .../armdatabox/service_client_example_test.go | 763 ---- 15 files changed, 446 insertions(+), 4216 deletions(-) delete mode 100644 sdk/resourcemanager/databox/armdatabox/jobs_client_example_test.go delete mode 100644 sdk/resourcemanager/databox/armdatabox/management_client_example_test.go delete mode 100644 sdk/resourcemanager/databox/armdatabox/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/databox/armdatabox/service_client_example_test.go diff --git a/sdk/resourcemanager/databox/armdatabox/CHANGELOG.md b/sdk/resourcemanager/databox/armdatabox/CHANGELOG.md index 9c0b3948d829..f39089ae4004 100644 --- a/sdk/resourcemanager/databox/armdatabox/CHANGELOG.md +++ b/sdk/resourcemanager/databox/armdatabox/CHANGELOG.md @@ -1,5 +1,38 @@ # Release History +## 2.0.0 (2023-04-26) +### Breaking Changes + +- Field `AccountName` of struct `DiskGranularCopyLogDetails` has been removed + +### Features Added + +- New enum type `HardwareEncryption` with values `HardwareEncryptionDisabled`, `HardwareEncryptionEnabled` +- New enum type `ReverseShippingDetailsEditStatus` with values `ReverseShippingDetailsEditStatusDisabled`, `ReverseShippingDetailsEditStatusEnabled`, `ReverseShippingDetailsEditStatusNotSupported` +- New enum type `ReverseTransportPreferenceEditStatus` with values `ReverseTransportPreferenceEditStatusDisabled`, `ReverseTransportPreferenceEditStatusEnabled`, `ReverseTransportPreferenceEditStatusNotSupported` +- New struct `ContactInfo` +- New struct `ReverseShippingDetails` +- New field `ReverseShippingDetails` in struct `CommonJobDetails` +- New field `Actions`, `Error` in struct `CopyProgress` +- New field `Actions`, `Error` in struct `CustomerDiskCopyProgress` +- New field `ReverseShippingDetails` in struct `CustomerDiskJobDetails` +- New field `Actions`, `Error` in struct `DiskCopyProgress` +- New field `AccountID` in struct `DiskGranularCopyLogDetails` +- New field `Actions`, `Error` in struct `DiskGranularCopyProgress` +- New field `GranularCopyLogDetails`, `ReverseShippingDetails` in struct `DiskJobDetails` +- New field `HardwareEncryption` in struct `EncryptionPreferences` +- New field `Actions`, `Error` in struct `GranularCopyProgress` +- New field `ReverseShippingDetails` in struct `HeavyJobDetails` +- New field `ReverseShippingDetails` in struct `JobDetails` +- New field `ReverseShippingDetailsUpdate`, `ReverseTransportPreferenceUpdate` in struct `JobProperties` +- New field `SerialNumberCustomerResolutionMap` in struct `MitigateJobRequest` +- New field `ReverseTransportPreferences` in struct `Preferences` +- New field `CountriesWithinCommerceBoundary` in struct `SKUProperties` +- New field `SkipAddressValidation`, `TaxIdentificationNumber` in struct `ShippingAddress` +- New field `IsUpdated` in struct `TransportPreferences` +- New field `Preferences`, `ReverseShippingDetails` in struct `UpdateJobDetails` + + ## 1.1.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/databox/armdatabox/autorest.md b/sdk/resourcemanager/databox/armdatabox/autorest.md index fd4ac7a2558b..b7cadea698fc 100644 --- a/sdk/resourcemanager/databox/armdatabox/autorest.md +++ b/sdk/resourcemanager/databox/armdatabox/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/databox/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/databox/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 2.0.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/databox/armdatabox/constants.go b/sdk/resourcemanager/databox/armdatabox/constants.go index 71fb4a1838b4..7d18da0505b4 100644 --- a/sdk/resourcemanager/databox/armdatabox/constants.go +++ b/sdk/resourcemanager/databox/armdatabox/constants.go @@ -11,7 +11,7 @@ package armdatabox const ( moduleName = "armdatabox" - moduleVersion = "v1.1.1" + moduleVersion = "v2.0.0" ) type AccessProtocol string @@ -163,7 +163,6 @@ func PossibleCopyStatusValues() []CopyStatus { } } -// CustomerResolutionCode - Resolution code provided by customer type CustomerResolutionCode string const ( @@ -392,6 +391,24 @@ func PossibleFilterFileTypeValues() []FilterFileType { } } +// HardwareEncryption - Defines Hardware level encryption (Only for disk) +type HardwareEncryption string + +const ( + // HardwareEncryptionEnabled - Hardware-based encryption is enabled. + HardwareEncryptionEnabled HardwareEncryption = "Enabled" + // HardwareEncryptionDisabled - Hardware-based encryption is enabled. + HardwareEncryptionDisabled HardwareEncryption = "Disabled" +) + +// PossibleHardwareEncryptionValues returns the possible values for the HardwareEncryption const type. +func PossibleHardwareEncryptionValues() []HardwareEncryption { + return []HardwareEncryption{ + HardwareEncryptionEnabled, + HardwareEncryptionDisabled, + } +} + // JobDeliveryType - Delivery type of Job. type JobDeliveryType string @@ -503,6 +520,50 @@ func PossibleOverallValidationStatusValues() []OverallValidationStatus { } } +// ReverseShippingDetailsEditStatus - The Editable status for Reverse Shipping Address and Contact Info +type ReverseShippingDetailsEditStatus string + +const ( + // ReverseShippingDetailsEditStatusEnabled - Reverse shipping details can be edited. + ReverseShippingDetailsEditStatusEnabled ReverseShippingDetailsEditStatus = "Enabled" + // ReverseShippingDetailsEditStatusDisabled - Edit is disabled for Reverse shipping details. + ReverseShippingDetailsEditStatusDisabled ReverseShippingDetailsEditStatus = "Disabled" + // ReverseShippingDetailsEditStatusNotSupported - Edit is not supported for Reverse shipping details. Either subscription + // feature is not available or SKU doesn't support this feature. + ReverseShippingDetailsEditStatusNotSupported ReverseShippingDetailsEditStatus = "NotSupported" +) + +// PossibleReverseShippingDetailsEditStatusValues returns the possible values for the ReverseShippingDetailsEditStatus const type. +func PossibleReverseShippingDetailsEditStatusValues() []ReverseShippingDetailsEditStatus { + return []ReverseShippingDetailsEditStatus{ + ReverseShippingDetailsEditStatusEnabled, + ReverseShippingDetailsEditStatusDisabled, + ReverseShippingDetailsEditStatusNotSupported, + } +} + +// ReverseTransportPreferenceEditStatus - The Editable status for Reverse Transport preferences +type ReverseTransportPreferenceEditStatus string + +const ( + // ReverseTransportPreferenceEditStatusEnabled - Reverse Transport Preferences can be edited. + ReverseTransportPreferenceEditStatusEnabled ReverseTransportPreferenceEditStatus = "Enabled" + // ReverseTransportPreferenceEditStatusDisabled - Edit is disabled for Reverse Transport Preferences. + ReverseTransportPreferenceEditStatusDisabled ReverseTransportPreferenceEditStatus = "Disabled" + // ReverseTransportPreferenceEditStatusNotSupported - Edit is not supported for Reverse Transport Preferences. Either subscription + // feature is not available or SKU doesn't support this feature. + ReverseTransportPreferenceEditStatusNotSupported ReverseTransportPreferenceEditStatus = "NotSupported" +) + +// PossibleReverseTransportPreferenceEditStatusValues returns the possible values for the ReverseTransportPreferenceEditStatus const type. +func PossibleReverseTransportPreferenceEditStatusValues() []ReverseTransportPreferenceEditStatus { + return []ReverseTransportPreferenceEditStatus{ + ReverseTransportPreferenceEditStatusEnabled, + ReverseTransportPreferenceEditStatusDisabled, + ReverseTransportPreferenceEditStatusNotSupported, + } +} + // SKUDisabledReason - Reason why the Sku is disabled. type SKUDisabledReason string diff --git a/sdk/resourcemanager/databox/armdatabox/go.mod b/sdk/resourcemanager/databox/armdatabox/go.mod index 78456fa0c54a..d5a2036abbea 100644 --- a/sdk/resourcemanager/databox/armdatabox/go.mod +++ b/sdk/resourcemanager/databox/armdatabox/go.mod @@ -1,21 +1,13 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databox/armdatabox +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databox/armdatabox/v2 go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/databox/armdatabox/go.sum b/sdk/resourcemanager/databox/armdatabox/go.sum index 8ba445a8c4da..b6bd7eaad1ba 100644 --- a/sdk/resourcemanager/databox/armdatabox/go.sum +++ b/sdk/resourcemanager/databox/armdatabox/go.sum @@ -1,31 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/databox/armdatabox/jobs_client.go b/sdk/resourcemanager/databox/armdatabox/jobs_client.go index 7937e9daceb1..16819c5d9dfa 100644 --- a/sdk/resourcemanager/databox/armdatabox/jobs_client.go +++ b/sdk/resourcemanager/databox/armdatabox/jobs_client.go @@ -47,7 +47,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // BookShipmentPickUp - Book shipment pick up. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only @@ -88,7 +88,7 @@ func (client *JobsClient) bookShipmentPickUpCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, shipmentPickUpRequest) @@ -106,7 +106,7 @@ func (client *JobsClient) bookShipmentPickUpHandleResponse(resp *http.Response) // Cancel - CancelJob. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only @@ -147,7 +147,7 @@ func (client *JobsClient) cancelCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, cancellationReason) @@ -157,7 +157,7 @@ func (client *JobsClient) cancelCreateRequest(ctx context.Context, resourceGroup // instead be updated with the Update job API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only @@ -179,7 +179,7 @@ func (client *JobsClient) BeginCreate(ctx context.Context, resourceGroupName str // be updated with the Update job API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 func (client *JobsClient) create(ctx context.Context, resourceGroupName string, jobName string, jobResource JobResource, options *JobsClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, jobName, jobResource, options) if err != nil { @@ -215,7 +215,7 @@ func (client *JobsClient) createCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, jobResource) @@ -224,7 +224,7 @@ func (client *JobsClient) createCreateRequest(ctx context.Context, resourceGroup // BeginDelete - Deletes a job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only @@ -244,7 +244,7 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Deletes a job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 func (client *JobsClient) deleteOperation(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { @@ -280,7 +280,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -289,7 +289,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Gets information about the specified job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only @@ -329,7 +329,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -349,7 +349,7 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR // NewListPager - Lists all the jobs available under the subscription. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - options - JobsClientListOptions contains the optional parameters for the JobsClient.NewListPager method. func (client *JobsClient) NewListPager(options *JobsClientListOptions) *runtime.Pager[JobsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[JobsClientListResponse]{ @@ -391,7 +391,7 @@ func (client *JobsClient) listCreateRequest(ctx context.Context, options *JobsCl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } @@ -411,7 +411,7 @@ func (client *JobsClient) listHandleResponse(resp *http.Response) (JobsClientLis // NewListByResourceGroupPager - Lists all the jobs available under the given resource group. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - options - JobsClientListByResourceGroupOptions contains the optional parameters for the JobsClient.NewListByResourceGroupPager // method. @@ -459,7 +459,7 @@ func (client *JobsClient) listByResourceGroupCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } @@ -479,7 +479,7 @@ func (client *JobsClient) listByResourceGroupHandleResponse(resp *http.Response) // NewListCredentialsPager - This method gets the unencrypted secrets related to the job. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only @@ -527,7 +527,7 @@ func (client *JobsClient) listCredentialsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -545,7 +545,7 @@ func (client *JobsClient) listCredentialsHandleResponse(resp *http.Response) (Jo // MarkDevicesShipped - Request to mark devices for a given job as shipped // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only // - resourceGroupName - The Resource Group Name @@ -586,7 +586,7 @@ func (client *JobsClient) markDevicesShippedCreateRequest(ctx context.Context, j return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, markDevicesShippedRequest) @@ -595,7 +595,7 @@ func (client *JobsClient) markDevicesShippedCreateRequest(ctx context.Context, j // BeginUpdate - Updates the properties of an existing job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only @@ -616,7 +616,7 @@ func (client *JobsClient) BeginUpdate(ctx context.Context, resourceGroupName str // Update - Updates the properties of an existing job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 func (client *JobsClient) update(ctx context.Context, resourceGroupName string, jobName string, jobResourceUpdateParameter JobResourceUpdateParameter, options *JobsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, jobName, jobResourceUpdateParameter, options) if err != nil { @@ -652,7 +652,7 @@ func (client *JobsClient) updateCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} diff --git a/sdk/resourcemanager/databox/armdatabox/jobs_client_example_test.go b/sdk/resourcemanager/databox/armdatabox/jobs_client_example_test.go deleted file mode 100644 index 31ae11c01cb7..000000000000 --- a/sdk/resourcemanager/databox/armdatabox/jobs_client_example_test.go +++ /dev/null @@ -1,3084 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armdatabox_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databox/armdatabox" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsList.json -func ExampleJobsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobsClient().NewListPager(&armdatabox.JobsClientListOptions{SkipToken: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.JobResourceList = armdatabox.JobResourceList{ - // Value: []*armdatabox.JobResource{ - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("australiaeast"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBoxDisk), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("mnaustest"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/ausresgrpmn/providers/Microsoft.DataBox/jobs/mnaustest"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-30T14:44:39.77401+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("australiaeast"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBoxDisk), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("portalcontractAUS"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/ausresgrpmn/providers/Microsoft.DataBox/jobs/portalcontractAUS"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-10T18:03:22.2578238+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("australiaeast"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBoxDisk), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("testBB-diskAU"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/testBB/providers/Microsoft.DataBox/jobs/testBB-diskAU"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-30T15:17:17.3753642+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("allXML"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat12/providers/Microsoft.DataBox/jobs/allXML"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-04T11:12:15.5972523+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("bothExportAllxml"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat12/providers/Microsoft.DataBox/jobs/bothExportAllxml"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-07T15:51:08.4479315+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("exportAll"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat12/providers/Microsoft.DataBox/jobs/exportAll"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-04T19:44:59.2410723+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("importRegressnTest"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat12/providers/Microsoft.DataBox/jobs/importRegressnTest"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-04T18:31:05.3036028+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("testBotthXMLAndAll"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat12/providers/Microsoft.DataBox/jobs/testBotthXMLAndAll"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-09T01:57:03.8985885+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("testExportAllOrder"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat12/providers/Microsoft.DataBox/jobs/testExportAllOrder"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-05T15:56:52.6983398+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("testPayload"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat12/providers/Microsoft.DataBox/jobs/testPayload"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-04T17:45:25.464989+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("xmlOnlyOrder"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat12/providers/Microsoft.DataBox/jobs/xmlOnlyOrder"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-04T10:43:04.8775864+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("testbadresourcegroup"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat3198inh0-9)inh(il(h)_fyoin)(upf(yLASD0-FJ(hal-DSNWP0JDS0P3-0SJ93/providers/Microsoft.DataBox/jobs/testbadresourcegroup"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-27T15:17:49.0760408+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("andipodtest4jan"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/andipodtest4jan"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-04T09:08:49.9928621+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("dbtest1"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/dbtest1"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("NoLongerNeeded null"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-28T15:20:48.1058546+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("degautam14-04-Clone"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/degautam14-04-Clone"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("IncorrectOrder null"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-14T08:51:18.2067875+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("degautamtestexport"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/degautamtestexport"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-27T18:08:30.6622356+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("DegautamTestExportOrder"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/DegautamTestExportOrder"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-21T20:41:02.3837388+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("degautamtestorder"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/degautamtestorder"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-24T07:56:23.6839464+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("degautamTestOrder14-04"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/degautamTestOrder14-04"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("IncorrectOrder null"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-14T08:48:21.2260174+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("export"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/export"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-12T12:19:19.8627264+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("exportTestResource"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.DataBox/jobs/exportTestResource"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-05T19:50:20.9692355+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("sanakTestImportNew"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.DataBox/jobs/sanakTestImportNew"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-10T15:09:45.7080012+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("sanakTestImportOld"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.DataBox/jobs/sanakTestImportOld"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-10T15:13:02.5724966+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("sanakTestImportOld1"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.DataBox/jobs/sanakTestImportOld1"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-20T13:39:28.1940929+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("sanakTestImportOld2"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.DataBox/jobs/sanakTestImportOld2"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-10T15:14:59.6879599+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("saranyagorder"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/saranyagorder"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-07-21T23:43:34.513148+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("testdeepak04-07"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/testdeepak04-07"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("IncorrectOrder null"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-04T14:01:50.9232807+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBoxHeavy), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("testdurga-heavy"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/akvenkat/providers/Microsoft.DataBox/jobs/testdurga-heavy"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("Old job which is still in ordered state cancelled by the service"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-02-11T12:33:16.6231232+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/MarkDevicesShipped.json -func ExampleJobsClient_MarkDevicesShipped() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewJobsClient().MarkDevicesShipped(ctx, "SdkJob8367", "SdkRg9836", armdatabox.MarkDevicesShippedRequest{ - DeliverToDcPackageDetails: &armdatabox.PackageCarrierInfo{ - CarrierName: to.Ptr("DHL"), - TrackingID: to.Ptr("123456"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsListByResourceGroup.json -func ExampleJobsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobsClient().NewListByResourceGroupPager("SdkRg5154", &armdatabox.JobsClientListByResourceGroupOptions{SkipToken: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.JobResourceList = armdatabox.JobResourceList{ - // Value: []*armdatabox.JobResource{ - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("SystemAssigned"), - // PrincipalID: to.Ptr("fac84c35-5490-4b11-81b9-770053ccbe3b"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob5928"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg5154/providers/Microsoft.DataBox/jobs/SdkJob5928"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-07-03T11:55:54.463792+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }, - // { - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob952"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg5154/providers/Microsoft.DataBox/jobs/SdkJob952"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-07T10:50:36.3341513+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsGet.json -func ExampleJobsClient_Get_jobsGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobsClient().Get(ctx, "SdkRg5154", "SdkJob952", &armdatabox.JobsClientGetOptions{Expand: to.Ptr("details")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob952"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg5154/providers/Microsoft.DataBox/jobs/SdkJob952"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-07T10:50:36.3341513+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // Details: &armdatabox.JobDetails{ - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Public SDK Test"), - // EmailList: []*string{ - // to.Ptr("testing@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // }, - // DataImportDetails: []*armdatabox.DataImportDetails{ - // { - // AccountDetails: &armdatabox.StorageAccountDetails{ - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - // }, - // }}, - // DeliveryPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr(""), - // TrackingID: to.Ptr(""), - // TrackingURL: to.Ptr(""), - // }, - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-07T10:50:40.1872217+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Completed"), - // StageName: to.Ptr(armdatabox.StageNameCompleted), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }}, - // KeyEncryptionKey: &armdatabox.KeyEncryptionKey{ - // KekType: to.Ptr(armdatabox.KekTypeMicrosoftManaged), - // }, - // ReturnPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr(""), - // TrackingID: to.Ptr(""), - // TrackingURL: to.Ptr(""), - // }, - // ReverseShipmentLabelSasKey: to.Ptr("https://wusbeta.blob.core.windows.net/customer-reverse-shipment-instructions/CustomerShipmentInstructions_MicrosoftManaged.PDF?sv=2018-03-28&sr=b&sig=urwfAELvNV69IGHdcXlRCn6o3O3dWZQKaRipmoAdrI0%3D&st=2020-08-07T05%3A10%3A58Z&se=2020-08-08T05%3A20%3A58Z&sp=r"), - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsGetCmk.json -func ExampleJobsClient_Get_jobsGetCmk() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobsClient().Get(ctx, "SdkRg7937", "SdkJob1735", &armdatabox.JobsClientGetOptions{Expand: to.Ptr("details")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("SystemAssigned"), - // PrincipalID: to.Ptr("9a68a7c4-0a18-4d06-a5fb-7058e9e98458"), - // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob1735"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg7937/providers/Microsoft.DataBox/jobs/SdkJob1735"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-07T10:47:42.0009935+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // Details: &armdatabox.JobDetails{ - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Public SDK Test"), - // EmailList: []*string{ - // to.Ptr("testing@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // }, - // DataImportDetails: []*armdatabox.DataImportDetails{ - // { - // AccountDetails: &armdatabox.StorageAccountDetails{ - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"), - // }, - // }}, - // DeliveryPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr(""), - // TrackingID: to.Ptr(""), - // TrackingURL: to.Ptr(""), - // }, - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-07T10:47:44.8736499+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Completed"), - // StageName: to.Ptr(armdatabox.StageNameCompleted), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }}, - // KeyEncryptionKey: &armdatabox.KeyEncryptionKey{ - // KekType: to.Ptr(armdatabox.KekTypeCustomerManaged), - // KekURL: to.Ptr("https://sdkkeyvault.vault.azure.net/keys/SSDKEY/"), - // KekVaultResourceID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault"), - // }, - // ReturnPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr(""), - // TrackingID: to.Ptr(""), - // TrackingURL: to.Ptr(""), - // }, - // ReverseShipmentLabelSasKey: to.Ptr("https://wusbeta.blob.core.windows.net/customer-reverse-shipment-instructions/CustomerShipmentInstructions_MicrosoftManaged.PDF?sv=2018-03-28&sr=b&sig=JSZSeKrFrrwWbZ4zd7PNdGdNYKExKpxa98vRDDH6ZIk%3D&st=2020-08-07T05%3A08%3A51Z&se=2020-08-08T05%3A18%3A51Z&sp=r"), - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsGetCopyStuck.json -func ExampleJobsClient_Get_jobsGetCopyStuck() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobsClient().Get(ctx, "dmstestresource", "TJx-637505258985313014", &armdatabox.JobsClientGetOptions{Expand: to.Ptr("details")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // "defaultTagsKey": to.Ptr("defaultTagsValue"), - // }, - // Name: to.Ptr("TJx-637505258985313014"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/dmstestresource/providers/Microsoft.DataBox/jobs/TJx-637505258985313014"), - // Properties: &armdatabox.JobProperties{ - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T12:56:12.6384315+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCompletedWithWarnings), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // Details: &armdatabox.JobDetails{ - // Actions: []*armdatabox.CustomerResolutionCode{ - // }, - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Andrew Tribone"), - // EmailList: []*string{ - // to.Ptr("ssemmail@microsoft.com"), - // to.Ptr("vishwamdir@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // &armdatabox.AccountCopyLogDetails{ - // CopyLogDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // AccountName: to.Ptr("databoxbvttestaccount"), - // CopyLogLink: to.Ptr("databoxcopylog/strtrinidad01_ZTS18520041_CopyLog_8425fb8f9c2b447288caa4dd6f5d34bb.xml"), - // }}, - // DataImportDetails: []*armdatabox.DataImportDetails{ - // { - // AccountDetails: &armdatabox.StorageAccountDetails{ - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - // }, - // }}, - // DeliveryPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr("Ups"), - // TrackingID: to.Ptr("5fb6965e-0b80-4f38-b21a-32673fed2d84"), - // TrackingURL: to.Ptr("https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=5fb6965e-0b80-4f38-b21a-32673fed2d84"), - // }, - // ExpectedDataSizeInTeraBytes: to.Ptr[int32](0), - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T12:56:25.3911023+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T13:07:49.676421+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T02:21:06+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T02:21:13+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T02:23:10+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T02:23:17+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T13:34:20.1497635+05:30"); return t}()), - // }, - // { - // StageName: to.Ptr(armdatabox.StageNameCompletedWithWarnings), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T14:08:38.250614+05:30"); return t}()), - // }}, - // KeyEncryptionKey: &armdatabox.KeyEncryptionKey{ - // KekType: to.Ptr(armdatabox.KekTypeMicrosoftManaged), - // }, - // LastMitigationActionOnJob: &armdatabox.LastMitigationActionOnJob{ - // ActionDateTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-05T08:28:18.8107951Z"); return t}()), - // CustomerResolution: to.Ptr(armdatabox.CustomerResolutionCodeMoveToCleanUpDevice), - // IsPerformedByCustomer: to.Ptr(true), - // }, - // Preferences: &armdatabox.Preferences{ - // }, - // ReturnPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr("Ups"), - // TrackingID: to.Ptr("b3875a34-aad6-4dbe-83a9-3f39cb21b0e8"), - // TrackingURL: to.Ptr("https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=b3875a34-aad6-4dbe-83a9-3f39cb21b0e8"), - // }, - // ReverseShipmentLabelSasKey: to.Ptr("http://wusbeta.blob.core.windows.net/devstoreaccount1/f6be6ea8-77da-419b-9f6b-3043c28b04e4/ReverseShipment/b3875a34-aad6-4dbe-83a9-3f39cb21b0e8.PDF?sv=2018-03-28&sr=b&sig=%2BJmOyIkG0ALrKQp%2F7NCOBYccQ80DRLvN%2FHtb6Z97heg%3D&st=2021-03-05T09%3A45%3A05Z&se=2021-03-05T10%3A15%3A05Z&sp=r"), - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeNone), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("164 TOWNSEND ST"), - // StreetAddress2: to.Ptr("UNIT 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // { - // AccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - // BytesProcessed: to.Ptr[int64](2000), - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // DirectoriesErroredOut: to.Ptr[int64](0), - // FilesErroredOut: to.Ptr[int64](0), - // FilesProcessed: to.Ptr[int64](100), - // InvalidDirectoriesProcessed: to.Ptr[int64](0), - // InvalidFileBytesUploaded: to.Ptr[int64](10), - // InvalidFilesProcessed: to.Ptr[int64](10), - // IsEnumerationInProgress: to.Ptr(false), - // RenamedContainerCount: to.Ptr[int64](60), - // StorageAccountName: to.Ptr("databoxbvttestaccount"), - // TotalBytesToProcess: to.Ptr[int64](2000), - // TotalFilesToProcess: to.Ptr[int64](110), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsGetExport.json -func ExampleJobsClient_Get_jobsGetExport() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobsClient().Get(ctx, "SdkRg8091", "SdkJob6429", &armdatabox.JobsClientGetOptions{Expand: to.Ptr("details")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob6429"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg8091/providers/Microsoft.DataBox/jobs/SdkJob6429"), - // Properties: &armdatabox.JobProperties{ - // CancellationReason: to.Ptr("CancelTest"), - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(true), - // IsPrepareToShipEnabled: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-07T10:49:08.7195419+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameCancelled), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // Details: &armdatabox.JobDetails{ - // ChainOfCustodySasKey: to.Ptr("https://wusbeta.blob.core.windows.net/chainofcustody/9a6ee052-bcff-4b5e-a478-7dcbfb86e9fb.txt?sv=2018-03-28&sr=b&sig=JbBBXZKharvfg35ZfmrhowO1DuOpzcZCNUdeFzklvWs%3D&st=2020-08-07T05%3A10%3A05Z&se=2020-08-07T05%3A40%3A05Z&sp=r"), - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr(" "), - // EmailList: []*string{ - // }, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // }, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // }, - // DataExportDetails: []*armdatabox.DataExportDetails{ - // { - // AccountDetails: &armdatabox.StorageAccountDetails{ - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.Storage/storageAccounts/aaaaaa2"), - // }, - // LogCollectionLevel: to.Ptr(armdatabox.LogCollectionLevelError), - // TransferConfiguration: &armdatabox.TransferConfiguration{ - // TransferAllDetails: &armdatabox.TransferConfigurationTransferAllDetails{ - // Include: &armdatabox.TransferAllDetails{ - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // TransferAllBlobs: to.Ptr(true), - // TransferAllFiles: to.Ptr(true), - // }, - // }, - // TransferConfigurationType: to.Ptr(armdatabox.TransferConfigurationTypeTransferAll), - // TransferFilterDetails: &armdatabox.TransferConfigurationTransferFilterDetails{ - // }, - // }, - // }}, - // DataImportDetails: []*armdatabox.DataImportDetails{ - // }, - // DeliveryPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr(""), - // TrackingID: to.Ptr(""), - // TrackingURL: to.Ptr(""), - // }, - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-07T10:49:12.7675644+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Canceled"), - // StageName: to.Ptr(armdatabox.StageNameCancelled), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-07T10:49:57.2572438+05:30"); return t}()), - // }}, - // KeyEncryptionKey: &armdatabox.KeyEncryptionKey{ - // KekType: to.Ptr(armdatabox.KekTypeMicrosoftManaged), - // }, - // ReturnPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr(""), - // TrackingID: to.Ptr(""), - // TrackingURL: to.Ptr(""), - // }, - // ReverseShipmentLabelSasKey: to.Ptr("https://wusbeta.blob.core.windows.net/customer-reverse-shipment-instructions/CustomerShipmentInstructions_MicrosoftManaged.PDF?sv=2018-03-28&sr=b&sig=04aL%2FTe7998qQJlhmGI3C0Q%2FxsCVo1t0B4uQUIx7TmQ%3D&st=2020-08-07T05%3A10%3A05Z&se=2020-08-08T05%3A20%3A05Z&sp=r"), - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // { - // AccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.Storage/storageAccounts/aaaaaa2"), - // BytesProcessed: to.Ptr[int64](0), - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // IsEnumerationInProgress: to.Ptr(false), - // StorageAccountName: to.Ptr("aaaaaa2"), - // TotalBytesToProcess: to.Ptr[int64](0), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsGetWaitingForAction.json -func ExampleJobsClient_Get_jobsGetWaitingForAction() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobsClient().Get(ctx, "dmstestresource", "TJx-637505258985313014", &armdatabox.JobsClientGetOptions{Expand: to.Ptr("details")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Identity: &armdatabox.ResourceIdentity{ - // Type: to.Ptr("None"), - // }, - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // "defaultTagsKey": to.Ptr("defaultTagsValue"), - // }, - // Name: to.Ptr("TJx-637505258985313014"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/dmstestresource/providers/Microsoft.DataBox/jobs/TJx-637505258985313014"), - // Properties: &armdatabox.JobProperties{ - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("SsemUserCopyErrorWaitingForAction"), - // Message: to.Ptr("Job has an error in copy stage and is waiting for customer action. Please review the error and select one of the actions provided in the job's properties.details.actions"), - // Target: to.Ptr("CopyIntervention"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // IsCancellable: to.Ptr(false), - // IsCancellableWithoutFee: to.Ptr(false), - // IsDeletable: to.Ptr(false), - // IsPrepareToShipEnabled: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(false), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-14T23:49:49.5177298+00:00"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDataCopy), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // Details: &armdatabox.JobDetails{ - // Actions: []*armdatabox.CustomerResolutionCode{ - // to.Ptr(armdatabox.CustomerResolutionCodeMoveToCleanUpDevice)}, - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Andrew Tribone"), - // EmailList: []*string{ - // to.Ptr("ssemmail@microsoft.com"), - // to.Ptr("vishwamdir@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // &armdatabox.AccountCopyLogDetails{ - // CopyLogDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // AccountName: to.Ptr("databoxbvttestaccount"), - // CopyLogLink: to.Ptr("databoxcopylog/strtrinidad01_ZTS18520041_CopyLog_8425fb8f9c2b447288caa4dd6f5d34bb.xml"), - // }, - // &armdatabox.AccountCopyLogDetails{ - // CopyLogDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // AccountName: to.Ptr("akvenkat3198inh0-9)inh(il(h)_fyoin)(upf(yLASD0-FJ(hal-DSNWP0JDS0P3-0SJ94"), - // CopyLogLink: to.Ptr("databoxcopylog/strtrinidad01_ZTS18520041_CopyLog_8425fb8f9c2b447288caa4dd6f5d34bb.xml"), - // }}, - // DataImportDetails: []*armdatabox.DataImportDetails{ - // { - // AccountDetails: &armdatabox.StorageAccountDetails{ - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - // }, - // }, - // { - // AccountDetails: &armdatabox.ManagedDiskDetails{ - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeManagedDisk), - // ResourceGroupID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat3198inh0-9)inh(il(h)_fyoin)(upf(yLASD0-FJ(hal-DSNWP0JDS0P3-0SJ94"), - // StagingStorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/manageddisktest/providers/Microsoft.Storage/storageAccounts/sojainmanageddisk"), - // }, - // }}, - // DeliveryPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr("Ups"), - // TrackingID: to.Ptr("6f00fcce-1eec-4ee7-99a8-0acc68efd1c7"), - // TrackingURL: to.Ptr("https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=6f00fcce-1eec-4ee7-99a8-0acc68efd1c7"), - // }, - // ExpectedDataSizeInTeraBytes: to.Ptr[int32](0), - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-14T23:49:53.81509+00:00"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-15T00:05:18.7350971+00:00"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-15T00:25:19+00:00"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-15T00:25:26+00:00"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-15T00:30:22+00:00"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-15T00:30:29+00:00"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusWaitingForCustomerAction), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-15T00:45:26.2679756+00:00"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Completed"), - // StageName: to.Ptr(armdatabox.StageNameCompleted), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }}, - // KeyEncryptionKey: &armdatabox.KeyEncryptionKey{ - // KekType: to.Ptr(armdatabox.KekTypeMicrosoftManaged), - // }, - // LastMitigationActionOnJob: &armdatabox.LastMitigationActionOnJob{ - // ActionDateTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T05:00:22.5047578Z"); return t}()), - // CustomerResolution: to.Ptr(armdatabox.CustomerResolutionCodeMoveToCleanUpDevice), - // IsPerformedByCustomer: to.Ptr(true), - // }, - // Preferences: &armdatabox.Preferences{ - // EncryptionPreferences: &armdatabox.EncryptionPreferences{ - // DoubleEncryption: to.Ptr(armdatabox.DoubleEncryptionDisabled), - // }, - // }, - // ReturnPackage: &armdatabox.PackageShippingDetails{ - // CarrierName: to.Ptr("Ups"), - // TrackingID: to.Ptr("79148759-b772-4a90-933b-da5ae5ac6ebb"), - // TrackingURL: to.Ptr("https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=79148759-b772-4a90-933b-da5ae5ac6ebb"), - // }, - // ReverseShipmentLabelSasKey: to.Ptr("https://wusbeta.blob.core.windows.net/10dcd296-ed09-4037-ac19-2f16c4866452/ReverseShipment/79148759-b772-4a90-933b-da5ae5ac6ebb.PDF?sv=2018-03-28&sr=b&sig=bNtVcKRfYq1kiz0vxxSV%2FIZodCK8nUsCPu6MYK%2B6Erk%3D&st=2021-06-21T15%3A35%3A29Z&se=2021-06-21T16%3A05%3A29Z&sp=r"), - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeNone), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("164 TOWNSEND ST"), - // StreetAddress2: to.Ptr("UNIT 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // { - // AccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - // BytesProcessed: to.Ptr[int64](2000), - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // DirectoriesErroredOut: to.Ptr[int64](0), - // FilesErroredOut: to.Ptr[int64](0), - // FilesProcessed: to.Ptr[int64](100), - // InvalidDirectoriesProcessed: to.Ptr[int64](0), - // InvalidFileBytesUploaded: to.Ptr[int64](10), - // InvalidFilesProcessed: to.Ptr[int64](10), - // IsEnumerationInProgress: to.Ptr(false), - // RenamedContainerCount: to.Ptr[int64](60), - // StorageAccountName: to.Ptr("databoxbvttestaccount"), - // TotalBytesToProcess: to.Ptr[int64](2000), - // TotalFilesToProcess: to.Ptr[int64](110), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // { - // AccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat3198inh0-9)inh(il(h)_fyoin)(upf(yLASD0-FJ(hal-DSNWP0JDS0P3-0SJ94"), - // BytesProcessed: to.Ptr[int64](2000), - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeManagedDisk), - // DirectoriesErroredOut: to.Ptr[int64](0), - // FilesErroredOut: to.Ptr[int64](0), - // FilesProcessed: to.Ptr[int64](100), - // InvalidDirectoriesProcessed: to.Ptr[int64](0), - // InvalidFileBytesUploaded: to.Ptr[int64](10), - // InvalidFilesProcessed: to.Ptr[int64](10), - // IsEnumerationInProgress: to.Ptr(false), - // RenamedContainerCount: to.Ptr[int64](60), - // TotalBytesToProcess: to.Ptr[int64](2000), - // TotalFilesToProcess: to.Ptr[int64](110), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }}, - // }, - // }, - // SystemData: &armdatabox.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-14T23:49:48.349255+00:00"); return t}()), - // CreatedBy: to.Ptr("5ff6737b-7c50-45d1-b2cb-63a6cd723138"), - // CreatedByType: to.Ptr("Application"), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-14T23:49:48.349255+00:00"); return t}()), - // LastModifiedBy: to.Ptr("5ff6737b-7c50-45d1-b2cb-63a6cd723138"), - // LastModifiedByType: to.Ptr("Application"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsCreate.json -func ExampleJobsClient_BeginCreate_jobsCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginCreate(ctx, "SdkRg5154", "SdkJob952", armdatabox.JobResource{ - Location: to.Ptr("westus"), - SKU: &armdatabox.SKU{ - Name: to.Ptr(armdatabox.SKUNameDataBox), - }, - Properties: &armdatabox.JobProperties{ - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - Details: &armdatabox.JobDetails{ - ContactDetails: &armdatabox.ContactDetails{ - ContactName: to.Ptr("Public SDK Test"), - EmailList: []*string{ - to.Ptr("testing@microsoft.com")}, - Phone: to.Ptr("1234567890"), - PhoneExtension: to.Ptr("1234"), - }, - DataImportDetails: []*armdatabox.DataImportDetails{ - { - AccountDetails: &armdatabox.StorageAccountDetails{ - DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - }, - }}, - JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob952"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg5154/providers/Microsoft.DataBox/jobs/SdkJob952"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:49.0027611+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // Details: &armdatabox.JobDetails{ - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Public SDK Test"), - // EmailList: []*string{ - // to.Ptr("testing@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // }, - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:52.3995743+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Completed"), - // StageName: to.Ptr(armdatabox.StageNameCompleted), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }}, - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsCreateDevicePassword.json -func ExampleJobsClient_BeginCreate_jobsCreateDevicePassword() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginCreate(ctx, "SdkRg7478", "SdkJob9640", armdatabox.JobResource{ - Location: to.Ptr("westus"), - SKU: &armdatabox.SKU{ - Name: to.Ptr(armdatabox.SKUNameDataBox), - }, - Properties: &armdatabox.JobProperties{ - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - Details: &armdatabox.JobDetails{ - ContactDetails: &armdatabox.ContactDetails{ - ContactName: to.Ptr("Public SDK Test"), - EmailList: []*string{ - to.Ptr("testing@microsoft.com")}, - Phone: to.Ptr("1234567890"), - PhoneExtension: to.Ptr("1234"), - }, - DataImportDetails: []*armdatabox.DataImportDetails{ - { - AccountDetails: &armdatabox.StorageAccountDetails{ - DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - SharePassword: to.Ptr(""), - StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"), - }, - }}, - JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - DevicePassword: to.Ptr(""), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob9640"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg7478/providers/Microsoft.DataBox/jobs/SdkJob9640"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:49.0027611+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // Details: &armdatabox.JobDetails{ - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Public SDK Test"), - // EmailList: []*string{ - // to.Ptr("testing@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // }, - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:52.3995743+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Completed"), - // StageName: to.Ptr(armdatabox.StageNameCompleted), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }}, - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsCreateDoubleEncryption.json -func ExampleJobsClient_BeginCreate_jobsCreateDoubleEncryption() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginCreate(ctx, "SdkRg608", "SdkJob6599", armdatabox.JobResource{ - Location: to.Ptr("westus"), - SKU: &armdatabox.SKU{ - Name: to.Ptr(armdatabox.SKUNameDataBox), - }, - Properties: &armdatabox.JobProperties{ - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - Details: &armdatabox.JobDetails{ - ContactDetails: &armdatabox.ContactDetails{ - ContactName: to.Ptr("Public SDK Test"), - EmailList: []*string{ - to.Ptr("testing@microsoft.com")}, - Phone: to.Ptr("1234567890"), - PhoneExtension: to.Ptr("1234"), - }, - DataImportDetails: []*armdatabox.DataImportDetails{ - { - AccountDetails: &armdatabox.StorageAccountDetails{ - DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - }, - }}, - JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - Preferences: &armdatabox.Preferences{ - EncryptionPreferences: &armdatabox.EncryptionPreferences{ - DoubleEncryption: to.Ptr(armdatabox.DoubleEncryptionEnabled), - }, - }, - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob6599"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg608/providers/Microsoft.DataBox/jobs/SdkJob6599"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:49.0027611+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // Details: &armdatabox.JobDetails{ - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Public SDK Test"), - // EmailList: []*string{ - // to.Ptr("testing@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // }, - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:52.3995743+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Completed"), - // StageName: to.Ptr(armdatabox.StageNameCompleted), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }}, - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsCreateExport.json -func ExampleJobsClient_BeginCreate_jobsCreateExport() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginCreate(ctx, "SdkRg8091", "SdkJob6429", armdatabox.JobResource{ - Location: to.Ptr("westus"), - SKU: &armdatabox.SKU{ - Name: to.Ptr(armdatabox.SKUNameDataBox), - }, - Properties: &armdatabox.JobProperties{ - TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - Details: &armdatabox.JobDetails{ - ContactDetails: &armdatabox.ContactDetails{ - ContactName: to.Ptr("Public SDK Test"), - EmailList: []*string{ - to.Ptr("testing@microsoft.com")}, - Phone: to.Ptr("1234567890"), - PhoneExtension: to.Ptr("1234"), - }, - DataExportDetails: []*armdatabox.DataExportDetails{ - { - AccountDetails: &armdatabox.StorageAccountDetails{ - DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.Storage/storageAccounts/aaaaaa2"), - }, - TransferConfiguration: &armdatabox.TransferConfiguration{ - TransferAllDetails: &armdatabox.TransferConfigurationTransferAllDetails{ - Include: &armdatabox.TransferAllDetails{ - DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - TransferAllBlobs: to.Ptr(true), - TransferAllFiles: to.Ptr(true), - }, - }, - TransferConfigurationType: to.Ptr(armdatabox.TransferConfigurationTypeTransferAll), - }, - }}, - JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob6429"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg8091/providers/Microsoft.DataBox/jobs/SdkJob6429"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:49.0027611+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // Details: &armdatabox.JobDetails{ - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Public SDK Test"), - // EmailList: []*string{ - // to.Ptr("testing@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // }, - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:52.3995743+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Completed"), - // StageName: to.Ptr(armdatabox.StageNameCompleted), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }}, - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsCreateWithUserAssignedIdentity.json -func ExampleJobsClient_BeginCreate_jobsCreateWithUserAssignedIdentity() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginCreate(ctx, "SdkRg7552", "SdkJob5337", armdatabox.JobResource{ - Identity: &armdatabox.ResourceIdentity{ - Type: to.Ptr("UserAssigned"), - UserAssignedIdentities: map[string]*armdatabox.UserAssignedIdentity{ - "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity": {}, - }, - }, - Location: to.Ptr("westus"), - SKU: &armdatabox.SKU{ - Name: to.Ptr(armdatabox.SKUNameDataBox), - }, - Properties: &armdatabox.JobProperties{ - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - Details: &armdatabox.JobDetails{ - ContactDetails: &armdatabox.ContactDetails{ - ContactName: to.Ptr("Public SDK Test"), - EmailList: []*string{ - to.Ptr("testing@microsoft.com")}, - Phone: to.Ptr("1234567890"), - PhoneExtension: to.Ptr("1234"), - }, - DataImportDetails: []*armdatabox.DataImportDetails{ - { - AccountDetails: &armdatabox.StorageAccountDetails{ - DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"), - }, - }}, - JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob5337"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg7552/providers/Microsoft.DataBox/jobs/SdkJob5337"), - // Properties: &armdatabox.JobProperties{ - // DeliveryInfo: &armdatabox.JobDeliveryInfo{ - // ScheduledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T05:30:00+05:30"); return t}()), - // }, - // DeliveryType: to.Ptr(armdatabox.JobDeliveryTypeNonScheduled), - // IsCancellable: to.Ptr(true), - // IsCancellableWithoutFee: to.Ptr(true), - // IsDeletable: to.Ptr(false), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:49.0027611+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeExportFromAzure), - // Details: &armdatabox.JobDetails{ - // ContactDetails: &armdatabox.ContactDetails{ - // ContactName: to.Ptr("Public SDK Test"), - // EmailList: []*string{ - // to.Ptr("testing@microsoft.com")}, - // NotificationPreference: []*armdatabox.NotificationPreference{ - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDevicePrepared), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDataCopy), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDispatched), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameDelivered), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNamePickedUp), - // }, - // { - // SendNotification: to.Ptr(true), - // StageName: to.Ptr(armdatabox.NotificationStageNameAtAzureDC), - // }}, - // Phone: to.Ptr("1234567890"), - // PhoneExtension: to.Ptr("1234"), - // }, - // CopyLogDetails: []armdatabox.CopyLogDetailsClassification{ - // }, - // JobDetailsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // JobStages: []*armdatabox.JobStages{ - // { - // DisplayName: to.Ptr("Ordered"), - // StageName: to.Ptr(armdatabox.StageNameDeviceOrdered), - // StageStatus: to.Ptr(armdatabox.StageStatusSucceeded), - // StageTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T14:49:52.3995743+05:30"); return t}()), - // }, - // { - // DisplayName: to.Ptr("Processed"), - // StageName: to.Ptr(armdatabox.StageNameDevicePrepared), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Data copy in progress"), - // StageName: to.Ptr(armdatabox.StageNameDataCopy), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Dispatched"), - // StageName: to.Ptr(armdatabox.StageNameDispatched), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Delivered"), - // StageName: to.Ptr(armdatabox.StageNameDelivered), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Picked up"), - // StageName: to.Ptr(armdatabox.StageNamePickedUp), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Received"), - // StageName: to.Ptr(armdatabox.StageNameAtAzureDC), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }, - // { - // DisplayName: to.Ptr("Completed"), - // StageName: to.Ptr(armdatabox.StageNameCompleted), - // StageStatus: to.Ptr(armdatabox.StageStatusNone), - // }}, - // ShippingAddress: &armdatabox.ShippingAddress{ - // AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - // City: to.Ptr("San Francisco"), - // CompanyName: to.Ptr("Microsoft"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // }, - // CopyProgress: []*armdatabox.CopyProgress{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsDelete.json -func ExampleJobsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginDelete(ctx, "SdkRg5154", "SdkJob952", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsPatch.json -func ExampleJobsClient_BeginUpdate_jobsPatch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginUpdate(ctx, "SdkRg5154", "SdkJob952", armdatabox.JobResourceUpdateParameter{ - Properties: &armdatabox.UpdateJobProperties{ - Details: &armdatabox.UpdateJobDetails{ - ContactDetails: &armdatabox.ContactDetails{ - ContactName: to.Ptr("Update Job"), - EmailList: []*string{ - to.Ptr("testing@microsoft.com")}, - Phone: to.Ptr("1234567890"), - PhoneExtension: to.Ptr("1234"), - }, - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - }, - }, - }, &armdatabox.JobsClientBeginUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob952"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg5154/providers/Microsoft.DataBox/jobs/SdkJob952"), - // Properties: &armdatabox.JobProperties{ - // IsCancellable: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-13T16:28:38.9999793+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsPatchCmk.json -func ExampleJobsClient_BeginUpdate_jobsPatchCmk() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginUpdate(ctx, "SdkRg7937", "SdkJob1735", armdatabox.JobResourceUpdateParameter{ - Properties: &armdatabox.UpdateJobProperties{ - Details: &armdatabox.UpdateJobDetails{ - KeyEncryptionKey: &armdatabox.KeyEncryptionKey{ - KekType: to.Ptr(armdatabox.KekTypeCustomerManaged), - KekURL: to.Ptr("https://sdkkeyvault.vault.azure.net/keys/SSDKEY/"), - KekVaultResourceID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault"), - }, - }, - }, - }, &armdatabox.JobsClientBeginUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob1735"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg7937/providers/Microsoft.DataBox/jobs/SdkJob1735"), - // Properties: &armdatabox.JobProperties{ - // IsCancellable: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-13T16:28:38.9999793+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsPatchSystemAssignedToUserAssigned.json -func ExampleJobsClient_BeginUpdate_jobsPatchSystemAssignedToUserAssigned() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginUpdate(ctx, "SdkRg9765", "SdkJob2965", armdatabox.JobResourceUpdateParameter{ - Identity: &armdatabox.ResourceIdentity{ - Type: to.Ptr("SystemAssigned,UserAssigned"), - UserAssignedIdentities: map[string]*armdatabox.UserAssignedIdentity{ - "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity": {}, - }, - }, - Properties: &armdatabox.UpdateJobProperties{ - Details: &armdatabox.UpdateJobDetails{ - KeyEncryptionKey: &armdatabox.KeyEncryptionKey{ - IdentityProperties: &armdatabox.IdentityProperties{ - Type: to.Ptr("UserAssigned"), - UserAssigned: &armdatabox.UserAssignedProperties{ - ResourceID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity"), - }, - }, - KekType: to.Ptr(armdatabox.KekTypeCustomerManaged), - KekURL: to.Ptr("https://sdkkeyvault.vault.azure.net/keys/SSDKEY/"), - KekVaultResourceID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault"), - }, - }, - }, - }, &armdatabox.JobsClientBeginUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobResource = armdatabox.JobResource{ - // Location: to.Ptr("westus"), - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // Tags: map[string]*string{ - // }, - // Name: to.Ptr("SdkJob2965"), - // Type: to.Ptr("Microsoft.DataBox/jobs"), - // ID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/SdkRg9765/providers/Microsoft.DataBox/jobs/SdkJob2965"), - // Properties: &armdatabox.JobProperties{ - // IsCancellable: to.Ptr(true), - // IsShippingAddressEditable: to.Ptr(true), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-13T16:28:38.9999793+05:30"); return t}()), - // Status: to.Ptr(armdatabox.StageNameDeviceOrdered), - // TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/BookShipmentPickupPost.json -func ExampleJobsClient_BookShipmentPickUp() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobsClient().BookShipmentPickUp(ctx, "bvttoolrg6", "TJ-636646322037905056", armdatabox.ShipmentPickUpRequest{ - EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-22T18:30:00Z"); return t }()), - ShipmentLocation: to.Ptr("Front desk"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-20T18:30:00Z"); return t }()), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ShipmentPickUpResponse = armdatabox.ShipmentPickUpResponse{ - // ConfirmationNumber: to.Ptr("2929602E9CP"), - // ReadyByTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-20T18:30:00Z"); return t}()), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsCancelPost.json -func ExampleJobsClient_Cancel() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewJobsClient().Cancel(ctx, "SdkRg5154", "SdkJob952", armdatabox.CancellationReason{ - Reason: to.Ptr("CancelTest"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobsListCredentials.json -func ExampleJobsClient_NewListCredentialsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobsClient().NewListCredentialsPager("bvttoolrg6", "TJ-636646322037905056", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.UnencryptedCredentialsList = armdatabox.UnencryptedCredentialsList{ - // Value: []*armdatabox.UnencryptedCredentials{ - // { - // JobName: to.Ptr("TJ-636646322037905056"), - // JobSecrets: &armdatabox.JobSecrets{ - // DcAccessSecurityCode: &armdatabox.DcAccessSecurityCode{ - // }, - // JobSecretsType: to.Ptr(armdatabox.ClassDiscriminatorDataBox), - // PodSecrets: []*armdatabox.Secret{ - // { - // AccountCredentialDetails: []*armdatabox.AccountCredentialDetails{ - // { - // AccountConnectionString: to.Ptr(""), - // AccountName: to.Ptr("databoxbvttestaccount"), - // DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - // ShareCredentialDetails: []*armdatabox.ShareCredentialDetails{ - // { - // Password: to.Ptr(""), - // ShareName: to.Ptr("databoxbvttestaccount_PageBlob"), - // ShareType: to.Ptr(armdatabox.ShareDestinationFormatTypePageBlob), - // SupportedAccessProtocols: []*armdatabox.AccessProtocol{ - // to.Ptr(armdatabox.AccessProtocolSMB)}, - // UserName: to.Ptr("databoxbvttestac_903"), - // }, - // { - // Password: to.Ptr(""), - // ShareName: to.Ptr("databoxbvttestaccount_BlockBlob"), - // ShareType: to.Ptr(armdatabox.ShareDestinationFormatTypeBlockBlob), - // SupportedAccessProtocols: []*armdatabox.AccessProtocol{ - // to.Ptr(armdatabox.AccessProtocolSMB)}, - // UserName: to.Ptr("databoxbvttestac_903"), - // }, - // { - // Password: to.Ptr(""), - // ShareName: to.Ptr("databoxbvttestaccount_AzFile"), - // ShareType: to.Ptr(armdatabox.ShareDestinationFormatTypeAzureFile), - // SupportedAccessProtocols: []*armdatabox.AccessProtocol{ - // to.Ptr(armdatabox.AccessProtocolSMB)}, - // UserName: to.Ptr("databoxbvttestac_903"), - // }}, - // }}, - // DevicePassword: to.Ptr(""), - // DeviceSerialNumber: to.Ptr("testimolapod-3ecc44ce"), - // EncodedValidationCertPubKey: to.Ptr("5CYoAoVKEBa4WgPVis8keX94w30pon4jGMADSqcdE/NlHLChj6Cmhbl4q9QOFKSB/US4AwhS7zY1QS3YMDrkAPfOy7Hi6kWMBpJWZidTq3oXX8FAQjg+IqQESti/2jvAlcDpO2453rgd7Yb6XZ43P8MMTpTjcarI0ImCf//eITQWnFa3AzfIJ9C+hxCCaA7HTYhwQEPUBMwyQJsI6v6WuQysROtlBgx1YtbWFhDVbcqYRSLIbaj+RdzlvxvDJSo70kv+8em5upuDTpVE7xP+WePLlARdSPNwwfRzHnvCUqC2UqXHpRUhQlYnMqAJEcjjroRnyIGumPmmQ8O155X8aw=="), - // NetworkConfigurations: []*armdatabox.ApplianceNetworkConfiguration{ - // { - // Name: to.Ptr("DataPort3"), - // MacAddress: to.Ptr("D05099C1F439"), - // }, - // { - // Name: to.Ptr("DataPort1"), - // MacAddress: to.Ptr("EC0D9A21A6C0"), - // }, - // { - // Name: to.Ptr("DataPort2"), - // MacAddress: to.Ptr("EC0D9A21A6C1"), - // }}, - // }}, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/databox/armdatabox/management_client.go b/sdk/resourcemanager/databox/armdatabox/management_client.go index b9f2bc7ca75f..0e655cd95a85 100644 --- a/sdk/resourcemanager/databox/armdatabox/management_client.go +++ b/sdk/resourcemanager/databox/armdatabox/management_client.go @@ -47,7 +47,7 @@ func NewManagementClient(subscriptionID string, credential azcore.TokenCredentia // Mitigate - Request to mitigate for a given job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - jobName - The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters // in length and use any alphanumeric and underscore only // - resourceGroupName - The Resource Group Name @@ -88,7 +88,7 @@ func (client *ManagementClient) mitigateCreateRequest(ctx context.Context, jobNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, mitigateJobRequest) diff --git a/sdk/resourcemanager/databox/armdatabox/management_client_example_test.go b/sdk/resourcemanager/databox/armdatabox/management_client_example_test.go deleted file mode 100644 index 1f8ffb9ecdf4..000000000000 --- a/sdk/resourcemanager/databox/armdatabox/management_client_example_test.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armdatabox_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databox/armdatabox" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/JobMitigate.json -func ExampleManagementClient_Mitigate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewManagementClient().Mitigate(ctx, "SdkJob8367", "SdkRg9836", armdatabox.MitigateJobRequest{ - CustomerResolutionCode: to.Ptr(armdatabox.CustomerResolutionCodeMoveToCleanUpDevice), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/databox/armdatabox/models.go b/sdk/resourcemanager/databox/armdatabox/models.go index 00c89b0f163c..10d24e9c3070 100644 --- a/sdk/resourcemanager/databox/armdatabox/models.go +++ b/sdk/resourcemanager/databox/armdatabox/models.go @@ -216,6 +216,9 @@ type CommonJobDetails struct { // Preferences for the order. Preferences *Preferences + // Optional Reverse Shipping details for order. + ReverseShippingDetails *ReverseShippingDetails + // Shipping address of the customer. ShippingAddress *ShippingAddress @@ -328,6 +331,21 @@ type ContactDetails struct { PhoneExtension *string } +// ContactInfo - Contact Info. +type ContactInfo struct { + // REQUIRED; Contact name of the person. + ContactName *string + + // REQUIRED; Phone number of the contact person. + Phone *string + + // Mobile number of the contact person. + Mobile *string + + // Phone extension number of the contact person. + PhoneExtension *string +} + // CopyLogDetailsClassification provides polymorphic access to related types. // Call the interface's GetCopyLogDetails() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -351,6 +369,9 @@ type CopyProgress struct { // READ-ONLY; Id of the account where the data needs to be uploaded. AccountID *string + // READ-ONLY; Available actions on the job. + Actions []*CustomerResolutionCode + // READ-ONLY; To indicate bytes transferred. BytesProcessed *int64 @@ -360,6 +381,9 @@ type CopyProgress struct { // READ-ONLY; To indicate directories errored out in the job. DirectoriesErroredOut *int64 + // READ-ONLY; Error, if any, in the stage + Error *CloudError + // READ-ONLY; Number of files which could not be copied FilesErroredOut *int64 @@ -476,6 +500,9 @@ type CustomerDiskCopyProgress struct { // READ-ONLY; Id of the account where the data needs to be uploaded. AccountID *string + // READ-ONLY; Available actions on the job. + Actions []*CustomerResolutionCode + // READ-ONLY; To indicate bytes transferred. BytesProcessed *int64 @@ -488,6 +515,9 @@ type CustomerDiskCopyProgress struct { // READ-ONLY; To indicate directories errored out in the job. DirectoriesErroredOut *int64 + // READ-ONLY; Error, if any, in the stage + Error *CloudError + // READ-ONLY; Number of files which could not be copied FilesErroredOut *int64 @@ -557,6 +587,9 @@ type CustomerDiskJobDetails struct { // Preferences for the order. Preferences *Preferences + // Optional Reverse Shipping details for order. + ReverseShippingDetails *ReverseShippingDetails + // Shipping address of the customer. ShippingAddress *ShippingAddress @@ -615,6 +648,7 @@ func (c *CustomerDiskJobDetails) GetCommonJobDetails() *CommonJobDetails { DataExportDetails: c.DataExportDetails, JobDetailsType: c.JobDetailsType, Preferences: c.Preferences, + ReverseShippingDetails: c.ReverseShippingDetails, CopyLogDetails: c.CopyLogDetails, ReverseShipmentLabelSasKey: c.ReverseShipmentLabelSasKey, ChainOfCustodySasKey: c.ChainOfCustodySasKey, @@ -925,9 +959,15 @@ func (d *DiskCopyLogDetails) GetCopyLogDetails() *CopyLogDetails { // DiskCopyProgress - DataBox Disk Copy Progress type DiskCopyProgress struct { + // READ-ONLY; Available actions on the job. + Actions []*CustomerResolutionCode + // READ-ONLY; Bytes copied during the copy of disk. BytesCopied *int64 + // READ-ONLY; Error, if any, in the stage + Error *CloudError + // READ-ONLY; Indicates the percentage completed for the copy of the disk. PercentComplete *int32 @@ -943,8 +983,8 @@ type DiskGranularCopyLogDetails struct { // REQUIRED; Indicates the type of job details. CopyLogDetailsType *ClassDiscriminator - // READ-ONLY; Account name. - AccountName *string + // READ-ONLY; Account id. + AccountID *string // READ-ONLY; Link for copy error logs. ErrorLogLink *string @@ -968,6 +1008,9 @@ type DiskGranularCopyProgress struct { // READ-ONLY; Id of the account where the data needs to be uploaded. AccountID *string + // READ-ONLY; Available actions on the job. + Actions []*CustomerResolutionCode + // READ-ONLY; To indicate bytes transferred. BytesProcessed *int64 @@ -980,6 +1023,9 @@ type DiskGranularCopyProgress struct { // READ-ONLY; To indicate directories errored out in the job. DirectoriesErroredOut *int64 + // READ-ONLY; Error, if any, in the stage + Error *CloudError + // READ-ONLY; Number of files which could not be copied FilesErroredOut *int64 @@ -1047,6 +1093,9 @@ type DiskJobDetails struct { // means 5 disks of 2 TB size. Key is string but will be checked against an int. PreferredDisks map[string]*int32 + // Optional Reverse Shipping details for order. + ReverseShippingDetails *ReverseShippingDetails + // Shipping address of the customer. ShippingAddress *ShippingAddress @@ -1078,6 +1127,9 @@ type DiskJobDetails struct { // are shipped to the customer. DisksAndSizeDetails map[string]*int32 + // READ-ONLY; Copy progress per disk. + GranularCopyLogDetails []*DiskGranularCopyLogDetails + // READ-ONLY; Copy progress per disk. GranularCopyProgress []*DiskGranularCopyProgress @@ -1106,6 +1158,7 @@ func (d *DiskJobDetails) GetCommonJobDetails() *CommonJobDetails { DataExportDetails: d.DataExportDetails, JobDetailsType: d.JobDetailsType, Preferences: d.Preferences, + ReverseShippingDetails: d.ReverseShippingDetails, CopyLogDetails: d.CopyLogDetails, ReverseShipmentLabelSasKey: d.ReverseShipmentLabelSasKey, ChainOfCustodySasKey: d.ChainOfCustodySasKey, @@ -1187,6 +1240,9 @@ type DiskSecret struct { type EncryptionPreferences struct { // Defines secondary layer of software-based encryption enablement. DoubleEncryption *DoubleEncryption + + // Defines Hardware level encryption (Only for disk) + HardwareEncryption *HardwareEncryption } type ErrorDetail struct { @@ -1243,6 +1299,9 @@ type GranularCopyProgress struct { // READ-ONLY; Id of the account where the data needs to be uploaded. AccountID *string + // READ-ONLY; Available actions on the job. + Actions []*CustomerResolutionCode + // READ-ONLY; To indicate bytes transferred. BytesProcessed *int64 @@ -1252,6 +1311,9 @@ type GranularCopyProgress struct { // READ-ONLY; To indicate directories errored out in the job. DirectoriesErroredOut *int64 + // READ-ONLY; Error, if any, in the stage + Error *CloudError + // READ-ONLY; Number of files which could not be copied FilesErroredOut *int64 @@ -1338,6 +1400,9 @@ type HeavyJobDetails struct { // Preferences for the order. Preferences *Preferences + // Optional Reverse Shipping details for order. + ReverseShippingDetails *ReverseShippingDetails + // Shipping address of the customer. ShippingAddress *ShippingAddress @@ -1390,6 +1455,7 @@ func (h *HeavyJobDetails) GetCommonJobDetails() *CommonJobDetails { DataExportDetails: h.DataExportDetails, JobDetailsType: h.JobDetailsType, Preferences: h.Preferences, + ReverseShippingDetails: h.ReverseShippingDetails, CopyLogDetails: h.CopyLogDetails, ReverseShipmentLabelSasKey: h.ReverseShipmentLabelSasKey, ChainOfCustodySasKey: h.ChainOfCustodySasKey, @@ -1527,6 +1593,9 @@ type JobDetails struct { // Preferences for the order. Preferences *Preferences + // Optional Reverse Shipping details for order. + ReverseShippingDetails *ReverseShippingDetails + // Shipping address of the customer. ShippingAddress *ShippingAddress @@ -1579,6 +1648,7 @@ func (j *JobDetails) GetCommonJobDetails() *CommonJobDetails { DataExportDetails: j.DataExportDetails, JobDetailsType: j.JobDetailsType, Preferences: j.Preferences, + ReverseShippingDetails: j.ReverseShippingDetails, CopyLogDetails: j.CopyLogDetails, ReverseShipmentLabelSasKey: j.ReverseShipmentLabelSasKey, ChainOfCustodySasKey: j.ChainOfCustodySasKey, @@ -1627,6 +1697,12 @@ type JobProperties struct { // READ-ONLY; Describes whether the shipping address is editable or not. IsShippingAddressEditable *bool + // READ-ONLY; The Editable status for Reverse Shipping Address and Contact Info + ReverseShippingDetailsUpdate *ReverseShippingDetailsEditStatus + + // READ-ONLY; The Editable status for Reverse Transport preferences + ReverseTransportPreferenceUpdate *ReverseTransportPreferenceEditStatus + // READ-ONLY; Time at which the job was started in UTC ISO 8601 format. StartTime *time.Time @@ -1857,8 +1933,11 @@ type MarkDevicesShippedRequest struct { // MitigateJobRequest - The Mitigate Job captured from request body for Mitigate API type MitigateJobRequest struct { - // REQUIRED; Resolution code for the job + // Resolution code for the job CustomerResolutionCode *CustomerResolutionCode + + // Serial number and the customer resolution code corresponding to each serial number + SerialNumberCustomerResolutionMap map[string]*CustomerResolutionCode } // NotificationPreference - Notification preference for a job stage. @@ -1958,6 +2037,9 @@ type Preferences struct { // Preferred data center region. PreferredDataCenterRegion []*string + // Optional Preferences related to the reverse shipment logistics of the sku. + ReverseTransportPreferences *TransportPreferences + // Preferences related to the Access Tier of storage accounts. StorageAccountAccessTierPreferences []*string @@ -2061,6 +2143,19 @@ type ResourceIdentity struct { TenantID *string } +// ReverseShippingDetails - Reverse Shipping Address and contact details for a job. +type ReverseShippingDetails struct { + // Contact Info. + ContactDetails *ContactInfo + + // Shipping address where customer wishes to receive the device. + ShippingAddress *ShippingAddress + + // READ-ONLY; A flag to indicate whether Reverse Shipping details are updated or not after device has been prepared. Read + // only field + IsUpdated *bool +} + // SKU - The Sku. type SKU struct { // REQUIRED; The sku name. @@ -2163,6 +2258,9 @@ type SKUProperties struct { // READ-ONLY; Cost of the Sku. Costs []*SKUCost + // READ-ONLY; List of all the Countries in the SKU specific commerce boundary + CountriesWithinCommerceBoundary []*string + // READ-ONLY; The map of data location to service location. DataLocationToServiceLocationMap []*DataLocationToServiceLocationMap @@ -2314,6 +2412,9 @@ type ShippingAddress struct { // Postal code. PostalCode *string + // Flag to indicate if customer has chosen to skip default address validation + SkipAddressValidation *bool + // Name of the State or Province. StateOrProvince *string @@ -2323,6 +2424,9 @@ type ShippingAddress struct { // Street Address line 3. StreetAddress3 *string + // Tax Identification Number + TaxIdentificationNumber *string + // Extended Zip Code. ZipExtendedCode *string } @@ -2484,6 +2588,9 @@ type TransportAvailabilityResponse struct { type TransportPreferences struct { // REQUIRED; Indicates Shipment Logistics type that the customer preferred. PreferredShipmentType *TransportShipmentTypes + + // READ-ONLY; Read only property which indicates whether transport preferences has been updated or not after device is prepared. + IsUpdated *bool } // UnencryptedCredentials - Unencrypted credentials for accessing device. @@ -2512,9 +2619,15 @@ type UpdateJobDetails struct { // Key encryption key for the job. KeyEncryptionKey *KeyEncryptionKey + // Preferences related to the order + Preferences *Preferences + // Return package details of job. ReturnToCustomerPackageDetails *PackageCarrierDetails + // Reverse Shipping Address and contact details for a job. + ReverseShippingDetails *ReverseShippingDetails + // Shipping address of the customer. ShippingAddress *ShippingAddress } diff --git a/sdk/resourcemanager/databox/armdatabox/models_serde.go b/sdk/resourcemanager/databox/armdatabox/models_serde.go index 8a7161d2aeb8..9ade0e73e326 100644 --- a/sdk/resourcemanager/databox/armdatabox/models_serde.go +++ b/sdk/resourcemanager/databox/armdatabox/models_serde.go @@ -516,6 +516,7 @@ func (c CommonJobDetails) MarshalJSON() ([]byte, error) { populate(objectMap, "preferences", c.Preferences) populate(objectMap, "returnPackage", c.ReturnPackage) populate(objectMap, "reverseShipmentLabelSasKey", c.ReverseShipmentLabelSasKey) + populate(objectMap, "reverseShippingDetails", c.ReverseShippingDetails) populate(objectMap, "shippingAddress", c.ShippingAddress) return json.Marshal(objectMap) } @@ -583,6 +584,9 @@ func (c *CommonJobDetails) UnmarshalJSON(data []byte) error { case "reverseShipmentLabelSasKey": err = unpopulate(val, "ReverseShipmentLabelSasKey", &c.ReverseShipmentLabelSasKey) delete(rawMsg, key) + case "reverseShippingDetails": + err = unpopulate(val, "ReverseShippingDetails", &c.ReverseShippingDetails) + delete(rawMsg, key) case "shippingAddress": err = unpopulate(val, "ShippingAddress", &c.ShippingAddress) delete(rawMsg, key) @@ -711,6 +715,45 @@ func (c *ContactDetails) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ContactInfo. +func (c ContactInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contactName", c.ContactName) + populate(objectMap, "mobile", c.Mobile) + populate(objectMap, "phone", c.Phone) + populate(objectMap, "phoneExtension", c.PhoneExtension) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContactInfo. +func (c *ContactInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contactName": + err = unpopulate(val, "ContactName", &c.ContactName) + delete(rawMsg, key) + case "mobile": + err = unpopulate(val, "Mobile", &c.Mobile) + delete(rawMsg, key) + case "phone": + err = unpopulate(val, "Phone", &c.Phone) + delete(rawMsg, key) + case "phoneExtension": + err = unpopulate(val, "PhoneExtension", &c.PhoneExtension) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CopyLogDetails. func (c CopyLogDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -742,9 +785,11 @@ func (c *CopyLogDetails) UnmarshalJSON(data []byte) error { func (c CopyProgress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accountId", c.AccountID) + populate(objectMap, "actions", c.Actions) populate(objectMap, "bytesProcessed", c.BytesProcessed) populate(objectMap, "dataAccountType", c.DataAccountType) populate(objectMap, "directoriesErroredOut", c.DirectoriesErroredOut) + populate(objectMap, "error", c.Error) populate(objectMap, "filesErroredOut", c.FilesErroredOut) populate(objectMap, "filesProcessed", c.FilesProcessed) populate(objectMap, "invalidDirectoriesProcessed", c.InvalidDirectoriesProcessed) @@ -771,6 +816,9 @@ func (c *CopyProgress) UnmarshalJSON(data []byte) error { case "accountId": err = unpopulate(val, "AccountID", &c.AccountID) delete(rawMsg, key) + case "actions": + err = unpopulate(val, "Actions", &c.Actions) + delete(rawMsg, key) case "bytesProcessed": err = unpopulate(val, "BytesProcessed", &c.BytesProcessed) delete(rawMsg, key) @@ -780,6 +828,9 @@ func (c *CopyProgress) UnmarshalJSON(data []byte) error { case "directoriesErroredOut": err = unpopulate(val, "DirectoriesErroredOut", &c.DirectoriesErroredOut) delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) case "filesErroredOut": err = unpopulate(val, "FilesErroredOut", &c.FilesErroredOut) delete(rawMsg, key) @@ -961,10 +1012,12 @@ func (c *CustomerDiskCopyLogDetails) UnmarshalJSON(data []byte) error { func (c CustomerDiskCopyProgress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accountId", c.AccountID) + populate(objectMap, "actions", c.Actions) populate(objectMap, "bytesProcessed", c.BytesProcessed) populate(objectMap, "copyStatus", c.CopyStatus) populate(objectMap, "dataAccountType", c.DataAccountType) populate(objectMap, "directoriesErroredOut", c.DirectoriesErroredOut) + populate(objectMap, "error", c.Error) populate(objectMap, "filesErroredOut", c.FilesErroredOut) populate(objectMap, "filesProcessed", c.FilesProcessed) populate(objectMap, "invalidDirectoriesProcessed", c.InvalidDirectoriesProcessed) @@ -992,6 +1045,9 @@ func (c *CustomerDiskCopyProgress) UnmarshalJSON(data []byte) error { case "accountId": err = unpopulate(val, "AccountID", &c.AccountID) delete(rawMsg, key) + case "actions": + err = unpopulate(val, "Actions", &c.Actions) + delete(rawMsg, key) case "bytesProcessed": err = unpopulate(val, "BytesProcessed", &c.BytesProcessed) delete(rawMsg, key) @@ -1004,6 +1060,9 @@ func (c *CustomerDiskCopyProgress) UnmarshalJSON(data []byte) error { case "directoriesErroredOut": err = unpopulate(val, "DirectoriesErroredOut", &c.DirectoriesErroredOut) delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) case "filesErroredOut": err = unpopulate(val, "FilesErroredOut", &c.FilesErroredOut) delete(rawMsg, key) @@ -1075,6 +1134,7 @@ func (c CustomerDiskJobDetails) MarshalJSON() ([]byte, error) { populate(objectMap, "returnPackage", c.ReturnPackage) populate(objectMap, "returnToCustomerPackageDetails", c.ReturnToCustomerPackageDetails) populate(objectMap, "reverseShipmentLabelSasKey", c.ReverseShipmentLabelSasKey) + populate(objectMap, "reverseShippingDetails", c.ReverseShippingDetails) populate(objectMap, "shippingAddress", c.ShippingAddress) return json.Marshal(objectMap) } @@ -1160,6 +1220,9 @@ func (c *CustomerDiskJobDetails) UnmarshalJSON(data []byte) error { case "reverseShipmentLabelSasKey": err = unpopulate(val, "ReverseShipmentLabelSasKey", &c.ReverseShipmentLabelSasKey) delete(rawMsg, key) + case "reverseShippingDetails": + err = unpopulate(val, "ReverseShippingDetails", &c.ReverseShippingDetails) + delete(rawMsg, key) case "shippingAddress": err = unpopulate(val, "ShippingAddress", &c.ShippingAddress) delete(rawMsg, key) @@ -1747,7 +1810,9 @@ func (d *DiskCopyLogDetails) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiskCopyProgress. func (d DiskCopyProgress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "actions", d.Actions) populate(objectMap, "bytesCopied", d.BytesCopied) + populate(objectMap, "error", d.Error) populate(objectMap, "percentComplete", d.PercentComplete) populate(objectMap, "serialNumber", d.SerialNumber) populate(objectMap, "status", d.Status) @@ -1763,9 +1828,15 @@ func (d *DiskCopyProgress) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "actions": + err = unpopulate(val, "Actions", &d.Actions) + delete(rawMsg, key) case "bytesCopied": err = unpopulate(val, "BytesCopied", &d.BytesCopied) delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &d.Error) + delete(rawMsg, key) case "percentComplete": err = unpopulate(val, "PercentComplete", &d.PercentComplete) delete(rawMsg, key) @@ -1786,7 +1857,7 @@ func (d *DiskCopyProgress) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiskGranularCopyLogDetails. func (d DiskGranularCopyLogDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "accountName", d.AccountName) + populate(objectMap, "accountId", d.AccountID) objectMap["copyLogDetailsType"] = ClassDiscriminatorDataBoxCustomerDisk populate(objectMap, "errorLogLink", d.ErrorLogLink) populate(objectMap, "serialNumber", d.SerialNumber) @@ -1803,8 +1874,8 @@ func (d *DiskGranularCopyLogDetails) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "accountName": - err = unpopulate(val, "AccountName", &d.AccountName) + case "accountId": + err = unpopulate(val, "AccountID", &d.AccountID) delete(rawMsg, key) case "copyLogDetailsType": err = unpopulate(val, "CopyLogDetailsType", &d.CopyLogDetailsType) @@ -1830,10 +1901,12 @@ func (d *DiskGranularCopyLogDetails) UnmarshalJSON(data []byte) error { func (d DiskGranularCopyProgress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accountId", d.AccountID) + populate(objectMap, "actions", d.Actions) populate(objectMap, "bytesProcessed", d.BytesProcessed) populate(objectMap, "copyStatus", d.CopyStatus) populate(objectMap, "dataAccountType", d.DataAccountType) populate(objectMap, "directoriesErroredOut", d.DirectoriesErroredOut) + populate(objectMap, "error", d.Error) populate(objectMap, "filesErroredOut", d.FilesErroredOut) populate(objectMap, "filesProcessed", d.FilesProcessed) populate(objectMap, "invalidDirectoriesProcessed", d.InvalidDirectoriesProcessed) @@ -1861,6 +1934,9 @@ func (d *DiskGranularCopyProgress) UnmarshalJSON(data []byte) error { case "accountId": err = unpopulate(val, "AccountID", &d.AccountID) delete(rawMsg, key) + case "actions": + err = unpopulate(val, "Actions", &d.Actions) + delete(rawMsg, key) case "bytesProcessed": err = unpopulate(val, "BytesProcessed", &d.BytesProcessed) delete(rawMsg, key) @@ -1873,6 +1949,9 @@ func (d *DiskGranularCopyProgress) UnmarshalJSON(data []byte) error { case "directoriesErroredOut": err = unpopulate(val, "DirectoriesErroredOut", &d.DirectoriesErroredOut) delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &d.Error) + delete(rawMsg, key) case "filesErroredOut": err = unpopulate(val, "FilesErroredOut", &d.FilesErroredOut) delete(rawMsg, key) @@ -1933,6 +2012,7 @@ func (d DiskJobDetails) MarshalJSON() ([]byte, error) { populate(objectMap, "deviceErasureDetails", d.DeviceErasureDetails) populate(objectMap, "disksAndSizeDetails", d.DisksAndSizeDetails) populate(objectMap, "expectedDataSizeInTeraBytes", d.ExpectedDataSizeInTeraBytes) + populate(objectMap, "granularCopyLogDetails", d.GranularCopyLogDetails) populate(objectMap, "granularCopyProgress", d.GranularCopyProgress) objectMap["jobDetailsType"] = ClassDiscriminatorDataBoxDisk populate(objectMap, "jobStages", d.JobStages) @@ -1943,6 +2023,7 @@ func (d DiskJobDetails) MarshalJSON() ([]byte, error) { populate(objectMap, "preferredDisks", d.PreferredDisks) populate(objectMap, "returnPackage", d.ReturnPackage) populate(objectMap, "reverseShipmentLabelSasKey", d.ReverseShipmentLabelSasKey) + populate(objectMap, "reverseShippingDetails", d.ReverseShippingDetails) populate(objectMap, "shippingAddress", d.ShippingAddress) return json.Marshal(objectMap) } @@ -1995,6 +2076,9 @@ func (d *DiskJobDetails) UnmarshalJSON(data []byte) error { case "expectedDataSizeInTeraBytes": err = unpopulate(val, "ExpectedDataSizeInTeraBytes", &d.ExpectedDataSizeInTeraBytes) delete(rawMsg, key) + case "granularCopyLogDetails": + err = unpopulate(val, "GranularCopyLogDetails", &d.GranularCopyLogDetails) + delete(rawMsg, key) case "granularCopyProgress": err = unpopulate(val, "GranularCopyProgress", &d.GranularCopyProgress) delete(rawMsg, key) @@ -2025,6 +2109,9 @@ func (d *DiskJobDetails) UnmarshalJSON(data []byte) error { case "reverseShipmentLabelSasKey": err = unpopulate(val, "ReverseShipmentLabelSasKey", &d.ReverseShipmentLabelSasKey) delete(rawMsg, key) + case "reverseShippingDetails": + err = unpopulate(val, "ReverseShippingDetails", &d.ReverseShippingDetails) + delete(rawMsg, key) case "shippingAddress": err = unpopulate(val, "ShippingAddress", &d.ShippingAddress) delete(rawMsg, key) @@ -2157,6 +2244,7 @@ func (d *DiskSecret) UnmarshalJSON(data []byte) error { func (e EncryptionPreferences) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "doubleEncryption", e.DoubleEncryption) + populate(objectMap, "hardwareEncryption", e.HardwareEncryption) return json.Marshal(objectMap) } @@ -2172,6 +2260,9 @@ func (e *EncryptionPreferences) UnmarshalJSON(data []byte) error { case "doubleEncryption": err = unpopulate(val, "DoubleEncryption", &e.DoubleEncryption) delete(rawMsg, key) + case "hardwareEncryption": + err = unpopulate(val, "HardwareEncryption", &e.HardwareEncryption) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", e, err) @@ -2316,9 +2407,11 @@ func (g *GranularCopyLogDetails) UnmarshalJSON(data []byte) error { func (g GranularCopyProgress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accountId", g.AccountID) + populate(objectMap, "actions", g.Actions) populate(objectMap, "bytesProcessed", g.BytesProcessed) populate(objectMap, "dataAccountType", g.DataAccountType) populate(objectMap, "directoriesErroredOut", g.DirectoriesErroredOut) + populate(objectMap, "error", g.Error) populate(objectMap, "filesErroredOut", g.FilesErroredOut) populate(objectMap, "filesProcessed", g.FilesProcessed) populate(objectMap, "invalidDirectoriesProcessed", g.InvalidDirectoriesProcessed) @@ -2345,6 +2438,9 @@ func (g *GranularCopyProgress) UnmarshalJSON(data []byte) error { case "accountId": err = unpopulate(val, "AccountID", &g.AccountID) delete(rawMsg, key) + case "actions": + err = unpopulate(val, "Actions", &g.Actions) + delete(rawMsg, key) case "bytesProcessed": err = unpopulate(val, "BytesProcessed", &g.BytesProcessed) delete(rawMsg, key) @@ -2354,6 +2450,9 @@ func (g *GranularCopyProgress) UnmarshalJSON(data []byte) error { case "directoriesErroredOut": err = unpopulate(val, "DirectoriesErroredOut", &g.DirectoriesErroredOut) delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &g.Error) + delete(rawMsg, key) case "filesErroredOut": err = unpopulate(val, "FilesErroredOut", &g.FilesErroredOut) delete(rawMsg, key) @@ -2457,6 +2556,7 @@ func (h HeavyJobDetails) MarshalJSON() ([]byte, error) { populate(objectMap, "preferences", h.Preferences) populate(objectMap, "returnPackage", h.ReturnPackage) populate(objectMap, "reverseShipmentLabelSasKey", h.ReverseShipmentLabelSasKey) + populate(objectMap, "reverseShippingDetails", h.ReverseShippingDetails) populate(objectMap, "shippingAddress", h.ShippingAddress) return json.Marshal(objectMap) } @@ -2530,6 +2630,9 @@ func (h *HeavyJobDetails) UnmarshalJSON(data []byte) error { case "reverseShipmentLabelSasKey": err = unpopulate(val, "ReverseShipmentLabelSasKey", &h.ReverseShipmentLabelSasKey) delete(rawMsg, key) + case "reverseShippingDetails": + err = unpopulate(val, "ReverseShippingDetails", &h.ReverseShippingDetails) + delete(rawMsg, key) case "shippingAddress": err = unpopulate(val, "ShippingAddress", &h.ShippingAddress) delete(rawMsg, key) @@ -2778,6 +2881,7 @@ func (j JobDetails) MarshalJSON() ([]byte, error) { populate(objectMap, "preferences", j.Preferences) populate(objectMap, "returnPackage", j.ReturnPackage) populate(objectMap, "reverseShipmentLabelSasKey", j.ReverseShipmentLabelSasKey) + populate(objectMap, "reverseShippingDetails", j.ReverseShippingDetails) populate(objectMap, "shippingAddress", j.ShippingAddress) return json.Marshal(objectMap) } @@ -2851,6 +2955,9 @@ func (j *JobDetails) UnmarshalJSON(data []byte) error { case "reverseShipmentLabelSasKey": err = unpopulate(val, "ReverseShipmentLabelSasKey", &j.ReverseShipmentLabelSasKey) delete(rawMsg, key) + case "reverseShippingDetails": + err = unpopulate(val, "ReverseShippingDetails", &j.ReverseShippingDetails) + delete(rawMsg, key) case "shippingAddress": err = unpopulate(val, "ShippingAddress", &j.ShippingAddress) delete(rawMsg, key) @@ -2875,6 +2982,8 @@ func (j JobProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "isDeletable", j.IsDeletable) populate(objectMap, "isPrepareToShipEnabled", j.IsPrepareToShipEnabled) populate(objectMap, "isShippingAddressEditable", j.IsShippingAddressEditable) + populate(objectMap, "reverseShippingDetailsUpdate", j.ReverseShippingDetailsUpdate) + populate(objectMap, "reverseTransportPreferenceUpdate", j.ReverseTransportPreferenceUpdate) populateTimeRFC3339(objectMap, "startTime", j.StartTime) populate(objectMap, "status", j.Status) populate(objectMap, "transferType", j.TransferType) @@ -2920,6 +3029,12 @@ func (j *JobProperties) UnmarshalJSON(data []byte) error { case "isShippingAddressEditable": err = unpopulate(val, "IsShippingAddressEditable", &j.IsShippingAddressEditable) delete(rawMsg, key) + case "reverseShippingDetailsUpdate": + err = unpopulate(val, "ReverseShippingDetailsUpdate", &j.ReverseShippingDetailsUpdate) + delete(rawMsg, key) + case "reverseTransportPreferenceUpdate": + err = unpopulate(val, "ReverseTransportPreferenceUpdate", &j.ReverseTransportPreferenceUpdate) + delete(rawMsg, key) case "startTime": err = unpopulateTimeRFC3339(val, "StartTime", &j.StartTime) delete(rawMsg, key) @@ -3288,6 +3403,7 @@ func (m *MarkDevicesShippedRequest) UnmarshalJSON(data []byte) error { func (m MitigateJobRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "customerResolutionCode", m.CustomerResolutionCode) + populate(objectMap, "serialNumberCustomerResolutionMap", m.SerialNumberCustomerResolutionMap) return json.Marshal(objectMap) } @@ -3303,6 +3419,9 @@ func (m *MitigateJobRequest) UnmarshalJSON(data []byte) error { case "customerResolutionCode": err = unpopulate(val, "CustomerResolutionCode", &m.CustomerResolutionCode) delete(rawMsg, key) + case "serialNumberCustomerResolutionMap": + err = unpopulate(val, "SerialNumberCustomerResolutionMap", &m.SerialNumberCustomerResolutionMap) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3561,6 +3680,7 @@ func (p Preferences) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "encryptionPreferences", p.EncryptionPreferences) populate(objectMap, "preferredDataCenterRegion", p.PreferredDataCenterRegion) + populate(objectMap, "reverseTransportPreferences", p.ReverseTransportPreferences) populate(objectMap, "storageAccountAccessTierPreferences", p.StorageAccountAccessTierPreferences) populate(objectMap, "transportPreferences", p.TransportPreferences) return json.Marshal(objectMap) @@ -3581,6 +3701,9 @@ func (p *Preferences) UnmarshalJSON(data []byte) error { case "preferredDataCenterRegion": err = unpopulate(val, "PreferredDataCenterRegion", &p.PreferredDataCenterRegion) delete(rawMsg, key) + case "reverseTransportPreferences": + err = unpopulate(val, "ReverseTransportPreferences", &p.ReverseTransportPreferences) + delete(rawMsg, key) case "storageAccountAccessTierPreferences": err = unpopulate(val, "StorageAccountAccessTierPreferences", &p.StorageAccountAccessTierPreferences) delete(rawMsg, key) @@ -3813,6 +3936,41 @@ func (r *ResourceIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ReverseShippingDetails. +func (r ReverseShippingDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contactDetails", r.ContactDetails) + populate(objectMap, "isUpdated", r.IsUpdated) + populate(objectMap, "shippingAddress", r.ShippingAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReverseShippingDetails. +func (r *ReverseShippingDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contactDetails": + err = unpopulate(val, "ContactDetails", &r.ContactDetails) + delete(rawMsg, key) + case "isUpdated": + err = unpopulate(val, "IsUpdated", &r.IsUpdated) + delete(rawMsg, key) + case "shippingAddress": + err = unpopulate(val, "ShippingAddress", &r.ShippingAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SKU. func (s SKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4033,6 +4191,7 @@ func (s SKUProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "apiVersions", s.APIVersions) populate(objectMap, "capacity", s.Capacity) populate(objectMap, "costs", s.Costs) + populate(objectMap, "countriesWithinCommerceBoundary", s.CountriesWithinCommerceBoundary) populate(objectMap, "dataLocationToServiceLocationMap", s.DataLocationToServiceLocationMap) populate(objectMap, "disabledReason", s.DisabledReason) populate(objectMap, "disabledReasonMessage", s.DisabledReasonMessage) @@ -4058,6 +4217,9 @@ func (s *SKUProperties) UnmarshalJSON(data []byte) error { case "costs": err = unpopulate(val, "Costs", &s.Costs) delete(rawMsg, key) + case "countriesWithinCommerceBoundary": + err = unpopulate(val, "CountriesWithinCommerceBoundary", &s.CountriesWithinCommerceBoundary) + delete(rawMsg, key) case "dataLocationToServiceLocationMap": err = unpopulate(val, "DataLocationToServiceLocationMap", &s.DataLocationToServiceLocationMap) delete(rawMsg, key) @@ -4308,10 +4470,12 @@ func (s ShippingAddress) MarshalJSON() ([]byte, error) { populate(objectMap, "companyName", s.CompanyName) populate(objectMap, "country", s.Country) populate(objectMap, "postalCode", s.PostalCode) + populate(objectMap, "skipAddressValidation", s.SkipAddressValidation) populate(objectMap, "stateOrProvince", s.StateOrProvince) populate(objectMap, "streetAddress1", s.StreetAddress1) populate(objectMap, "streetAddress2", s.StreetAddress2) populate(objectMap, "streetAddress3", s.StreetAddress3) + populate(objectMap, "taxIdentificationNumber", s.TaxIdentificationNumber) populate(objectMap, "zipExtendedCode", s.ZipExtendedCode) return json.Marshal(objectMap) } @@ -4340,6 +4504,9 @@ func (s *ShippingAddress) UnmarshalJSON(data []byte) error { case "postalCode": err = unpopulate(val, "PostalCode", &s.PostalCode) delete(rawMsg, key) + case "skipAddressValidation": + err = unpopulate(val, "SkipAddressValidation", &s.SkipAddressValidation) + delete(rawMsg, key) case "stateOrProvince": err = unpopulate(val, "StateOrProvince", &s.StateOrProvince) delete(rawMsg, key) @@ -4352,6 +4519,9 @@ func (s *ShippingAddress) UnmarshalJSON(data []byte) error { case "streetAddress3": err = unpopulate(val, "StreetAddress3", &s.StreetAddress3) delete(rawMsg, key) + case "taxIdentificationNumber": + err = unpopulate(val, "TaxIdentificationNumber", &s.TaxIdentificationNumber) + delete(rawMsg, key) case "zipExtendedCode": err = unpopulate(val, "ZipExtendedCode", &s.ZipExtendedCode) delete(rawMsg, key) @@ -4754,6 +4924,7 @@ func (t *TransportAvailabilityResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TransportPreferences. func (t TransportPreferences) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "isUpdated", t.IsUpdated) populate(objectMap, "preferredShipmentType", t.PreferredShipmentType) return json.Marshal(objectMap) } @@ -4767,6 +4938,9 @@ func (t *TransportPreferences) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "isUpdated": + err = unpopulate(val, "IsUpdated", &t.IsUpdated) + delete(rawMsg, key) case "preferredShipmentType": err = unpopulate(val, "PreferredShipmentType", &t.PreferredShipmentType) delete(rawMsg, key) @@ -4845,7 +5019,9 @@ func (u UpdateJobDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "contactDetails", u.ContactDetails) populate(objectMap, "keyEncryptionKey", u.KeyEncryptionKey) + populate(objectMap, "preferences", u.Preferences) populate(objectMap, "returnToCustomerPackageDetails", u.ReturnToCustomerPackageDetails) + populate(objectMap, "reverseShippingDetails", u.ReverseShippingDetails) populate(objectMap, "shippingAddress", u.ShippingAddress) return json.Marshal(objectMap) } @@ -4865,9 +5041,15 @@ func (u *UpdateJobDetails) UnmarshalJSON(data []byte) error { case "keyEncryptionKey": err = unpopulate(val, "KeyEncryptionKey", &u.KeyEncryptionKey) delete(rawMsg, key) + case "preferences": + err = unpopulate(val, "Preferences", &u.Preferences) + delete(rawMsg, key) case "returnToCustomerPackageDetails": err = unpopulate(val, "ReturnToCustomerPackageDetails", &u.ReturnToCustomerPackageDetails) delete(rawMsg, key) + case "reverseShippingDetails": + err = unpopulate(val, "ReverseShippingDetails", &u.ReverseShippingDetails) + delete(rawMsg, key) case "shippingAddress": err = unpopulate(val, "ShippingAddress", &u.ShippingAddress) delete(rawMsg, key) diff --git a/sdk/resourcemanager/databox/armdatabox/operations_client.go b/sdk/resourcemanager/databox/armdatabox/operations_client.go index 572159161c5d..c8218335c4d5 100644 --- a/sdk/resourcemanager/databox/armdatabox/operations_client.go +++ b/sdk/resourcemanager/databox/armdatabox/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - This method gets all the operations. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/databox/armdatabox/operations_client_example_test.go b/sdk/resourcemanager/databox/armdatabox/operations_client_example_test.go deleted file mode 100644 index 4ba2d392bd34..000000000000 --- a/sdk/resourcemanager/databox/armdatabox/operations_client_example_test.go +++ /dev/null @@ -1,250 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armdatabox_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databox/armdatabox" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/OperationsGet.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationList = armdatabox.OperationList{ - // Value: []*armdatabox.Operation{ - // { - // Name: to.Ptr("Microsoft.DataBox/locations/operationResults/read"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("List or get the Operation Results"), - // Operation: to.Ptr("List Operation Results"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Operation Results"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/jobs/cancel/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("Cancels an order in progress."), - // Operation: to.Ptr("Cancel"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Orders"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/jobs/bookShipmentPickUp/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("Allows to book a pick up for return shipments."), - // Operation: to.Ptr("Book Shipment Pick Up"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Orders"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/jobs/read"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("List or get the Orders"), - // Operation: to.Ptr("List Orders"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Orders"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/jobs/delete"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("Delete the Orders"), - // Operation: to.Ptr("Delete Orders"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Orders"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/jobs/write"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("Create or update the Orders"), - // Operation: to.Ptr("Create or Update Orders"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Orders"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/jobs/listCredentials/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("Lists the unencrypted credentials related to the order."), - // Operation: to.Ptr("List Credentials"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Orders"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/locations/validateInputs/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("This method does all type of validations."), - // Operation: to.Ptr("Validate Inputs"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Validate Inputs"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/locations/validateAddress/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("Validates the shipping address and provides alternate addresses if any."), - // Operation: to.Ptr("Validate Address"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Validate Address"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/subscriptions/resourceGroups/moveResources/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("This method performs the resource move."), - // Operation: to.Ptr("Move Resource"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Move Resource"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/subscriptions/resourceGroups/validateMoveResources/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("This method validates whether resource move is allowed or not."), - // Operation: to.Ptr("Validate Move Resource Request"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Move Resource"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/locations/availableSkus/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("This method returns the list of available skus."), - // Operation: to.Ptr("Availabe Skus"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Available Skus"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/locations/regionConfiguration/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("This method returns the configurations for the region."), - // Operation: to.Ptr("Region Configuration"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Region Configuration"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/locations/availableSkus/read"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("List or get the Available Skus"), - // Operation: to.Ptr("List Available Skus"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Available Skus"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/register/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("Register Provider Microsoft.Databox"), - // Operation: to.Ptr("Register Microsoft.Databox"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Register Microsoft.Databox"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/unregister/action"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("Un-Register Provider Microsoft.Databox"), - // Operation: to.Ptr("Un-Register Microsoft.Databox"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Register Microsoft.Databox"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataBox/operations/read"), - // Display: &armdatabox.OperationDisplay{ - // Description: to.Ptr("List or get the Operations"), - // Operation: to.Ptr("List Operations"), - // Provider: to.Ptr("Azure Data Box"), - // Resource: to.Ptr("Operations"), - // }, - // Origin: to.Ptr("user"), - // Properties: map[string]any{ - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/databox/armdatabox/service_client.go b/sdk/resourcemanager/databox/armdatabox/service_client.go index 2e5dfebf039d..cd151434e166 100644 --- a/sdk/resourcemanager/databox/armdatabox/service_client.go +++ b/sdk/resourcemanager/databox/armdatabox/service_client.go @@ -47,7 +47,7 @@ func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, // NewListAvailableSKUsByResourceGroupPager - This method provides the list of available skus for the given subscription, // resource group and location. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - location - The location of the resource // - availableSKURequest - Filters for showing the available skus. @@ -101,7 +101,7 @@ func (client *ServiceClient) listAvailableSKUsByResourceGroupCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, availableSKURequest) @@ -119,7 +119,7 @@ func (client *ServiceClient) listAvailableSKUsByResourceGroupHandleResponse(resp // RegionConfiguration - This API provides configuration details specific to given region/location at Subscription level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - location - The location of the resource // - regionConfigurationRequest - Request body to get the configuration for the region. // - options - ServiceClientRegionConfigurationOptions contains the optional parameters for the ServiceClient.RegionConfiguration @@ -155,7 +155,7 @@ func (client *ServiceClient) regionConfigurationCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, regionConfigurationRequest) @@ -174,7 +174,7 @@ func (client *ServiceClient) regionConfigurationHandleResponse(resp *http.Respon // group level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - location - The location of the resource // - regionConfigurationRequest - Request body to get the configuration for the region at resource group level. @@ -215,7 +215,7 @@ func (client *ServiceClient) regionConfigurationByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, regionConfigurationRequest) @@ -234,7 +234,7 @@ func (client *ServiceClient) regionConfigurationByResourceGroupHandleResponse(re // address and provide alternate addresses if any. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - location - The location of the resource // - validateAddress - Shipping address of the customer. // - options - ServiceClientValidateAddressOptions contains the optional parameters for the ServiceClient.ValidateAddress method. @@ -269,7 +269,7 @@ func (client *ServiceClient) validateAddressCreateRequest(ctx context.Context, l return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validateAddress) @@ -287,7 +287,7 @@ func (client *ServiceClient) validateAddressHandleResponse(resp *http.Response) // ValidateInputs - This method does all necessary pre-job creation validation under subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - location - The location of the resource // - validationRequest - Inputs of the customer. // - options - ServiceClientValidateInputsOptions contains the optional parameters for the ServiceClient.ValidateInputs method. @@ -322,7 +322,7 @@ func (client *ServiceClient) validateInputsCreateRequest(ctx context.Context, lo return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validationRequest) @@ -340,7 +340,7 @@ func (client *ServiceClient) validateInputsHandleResponse(resp *http.Response) ( // ValidateInputsByResourceGroup - This method does all necessary pre-job creation validation under resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The Resource Group Name // - location - The location of the resource // - validationRequest - Inputs of the customer. @@ -381,7 +381,7 @@ func (client *ServiceClient) validateInputsByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, validationRequest) diff --git a/sdk/resourcemanager/databox/armdatabox/service_client_example_test.go b/sdk/resourcemanager/databox/armdatabox/service_client_example_test.go deleted file mode 100644 index 1b37dcdfc59b..000000000000 --- a/sdk/resourcemanager/databox/armdatabox/service_client_example_test.go +++ /dev/null @@ -1,763 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armdatabox_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databox/armdatabox" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/AvailableSkusPost.json -func ExampleServiceClient_NewListAvailableSKUsByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewServiceClient().NewListAvailableSKUsByResourceGroupPager("bvttoolrg6", "westus", armdatabox.AvailableSKURequest{ - Country: to.Ptr("US"), - Location: to.Ptr("westus"), - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - }, nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AvailableSKUsResult = armdatabox.AvailableSKUsResult{ - // Value: []*armdatabox.SKUInformation{ - // { - // Enabled: to.Ptr(true), - // Properties: &armdatabox.SKUProperties{ - // APIVersions: []*string{ - // to.Ptr("2018-01-01")}, - // Capacity: &armdatabox.SKUCapacity{ - // Maximum: to.Ptr("100"), - // Usable: to.Ptr("80"), - // }, - // Costs: []*armdatabox.SKUCost{ - // { - // MeterID: to.Ptr("0cf23ffc-0b64-49e6-9bdd-1db885349042"), - // MeterType: to.Ptr("DataBoxServiceFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("a701f058-119b-4713-a923-bed7da4b7801"), - // MeterType: to.Ptr("DataBoxShippingFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("049fa331-0a48-4a81-9991-a6bef3c79fed"), - // MeterType: to.Ptr("DataBoxExtraDayFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("c3ea978d-6a0a-4632-b094-4fffcafcb057"), - // MeterType: to.Ptr("DataBoxLostOrDamagedDeviceFee"), - // Multiplier: to.Ptr[float64](1), - // }}, - // DataLocationToServiceLocationMap: []*armdatabox.DataLocationToServiceLocationMap{ - // { - // DataLocation: to.Ptr("westus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("centralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("eastus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("eastus2"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("northcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("southcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("westcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("westus2"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("centraluseuap"), - // ServiceLocation: to.Ptr("centraluseuap"), - // }, - // { - // DataLocation: to.Ptr("eastus2euap"), - // ServiceLocation: to.Ptr("eastus2euap"), - // }}, - // DisabledReason: to.Ptr(armdatabox.SKUDisabledReasonNone), - // }, - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBox), - // }, - // }, - // { - // Enabled: to.Ptr(true), - // Properties: &armdatabox.SKUProperties{ - // APIVersions: []*string{ - // to.Ptr("2018-01-01")}, - // Capacity: &armdatabox.SKUCapacity{ - // Maximum: to.Ptr("40"), - // Usable: to.Ptr("35"), - // }, - // Costs: []*armdatabox.SKUCost{ - // { - // MeterID: to.Ptr("d95cd8b5-b6f1-4cd9-ae86-a016d1945d6f"), - // MeterType: to.Ptr("DataBoxDiskServiceFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("4b8cf572-cb04-4ef3-9528-2cda4e9b544e"), - // MeterType: to.Ptr("DataBoxDiskShippingFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("b6ae9bbf-815d-49dd-bb2b-77c497b72ba4"), - // MeterType: to.Ptr("DataBoxDiskDailyUsageFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("08bc0ea1-6c82-421b-b953-2a7a65810d2e"), - // MeterType: to.Ptr("DataBoxDiskLostDeviceFee"), - // Multiplier: to.Ptr[float64](1), - // }}, - // DataLocationToServiceLocationMap: []*armdatabox.DataLocationToServiceLocationMap{ - // { - // DataLocation: to.Ptr("westus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("centralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("eastus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("eastus2"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("northcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("southcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("westcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("westus2"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("centraluseuap"), - // ServiceLocation: to.Ptr("centraluseuap"), - // }, - // { - // DataLocation: to.Ptr("eastus2euap"), - // ServiceLocation: to.Ptr("eastus2euap"), - // }}, - // DisabledReason: to.Ptr(armdatabox.SKUDisabledReasonNone), - // }, - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBoxDisk), - // }, - // }, - // { - // Enabled: to.Ptr(true), - // Properties: &armdatabox.SKUProperties{ - // APIVersions: []*string{ - // to.Ptr("2018-01-01")}, - // Capacity: &armdatabox.SKUCapacity{ - // Maximum: to.Ptr("1000"), - // Usable: to.Ptr("800"), - // }, - // Costs: []*armdatabox.SKUCost{ - // { - // MeterID: to.Ptr("d0dccaaf-3de9-4c7a-ba97-f83551b90126"), - // MeterType: to.Ptr("DataBoxHeavyServiceFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("7b49d11f-d4f7-4029-a197-04998fd282f9"), - // MeterType: to.Ptr("DataBoxHeavyShippingFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("c2c66d53-11b4-4f11-9642-43c7c336f0b7"), - // MeterType: to.Ptr("DataBoxHeavyExtraDayFee"), - // Multiplier: to.Ptr[float64](1), - // }, - // { - // MeterID: to.Ptr("188dcd7e-fbd7-4a41-aa42-162b81b0510f"), - // MeterType: to.Ptr("DataBoxHeavyLostOrDamagedDeviceFee"), - // Multiplier: to.Ptr[float64](1), - // }}, - // DataLocationToServiceLocationMap: []*armdatabox.DataLocationToServiceLocationMap{ - // { - // DataLocation: to.Ptr("westus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("centralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("eastus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("eastus2"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("northcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("southcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("westcentralus"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("westus2"), - // ServiceLocation: to.Ptr("westus"), - // }, - // { - // DataLocation: to.Ptr("centraluseuap"), - // ServiceLocation: to.Ptr("centraluseuap"), - // }, - // { - // DataLocation: to.Ptr("eastus2euap"), - // ServiceLocation: to.Ptr("eastus2euap"), - // }}, - // DisabledReason: to.Ptr(armdatabox.SKUDisabledReasonNone), - // RequiredFeature: to.Ptr("HeavyCreateAccess"), - // }, - // SKU: &armdatabox.SKU{ - // Name: to.Ptr(armdatabox.SKUNameDataBoxHeavy), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/ValidateAddressPost.json -func ExampleServiceClient_ValidateAddress() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServiceClient().ValidateAddress(ctx, "westus", armdatabox.ValidateAddress{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateAddress), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AddressValidationOutput = armdatabox.AddressValidationOutput{ - // Properties: &armdatabox.AddressValidationProperties{ - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateAddress), - // AlternateAddresses: []*armdatabox.ShippingAddress{ - // { - // AddressType: to.Ptr(armdatabox.AddressTypeNone), - // City: to.Ptr("SAN FRANCISCO"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // StreetAddress3: to.Ptr(""), - // }}, - // ValidationStatus: to.Ptr(armdatabox.AddressValidationStatusValid), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/ValidateInputsByResourceGroup.json -func ExampleServiceClient_ValidateInputsByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServiceClient().ValidateInputsByResourceGroup(ctx, "SdkRg6861", "westus", &armdatabox.CreateJobValidations{ - IndividualRequestDetails: []armdatabox.ValidationInputRequestClassification{ - &armdatabox.DataTransferDetailsValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateDataTransferDetails), - DataImportDetails: []*armdatabox.DataImportDetails{ - { - AccountDetails: &armdatabox.StorageAccountDetails{ - DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - }, - }}, - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - }, - &armdatabox.ValidateAddress{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateAddress), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - TransportPreferences: &armdatabox.TransportPreferences{ - PreferredShipmentType: to.Ptr(armdatabox.TransportShipmentTypesMicrosoftManaged), - }, - }, - &armdatabox.SubscriptionIsAllowedToCreateJobValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateSubscriptionIsAllowedToCreateJob), - }, - &armdatabox.SKUAvailabilityValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateSKUAvailability), - Country: to.Ptr("US"), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - Location: to.Ptr("westus"), - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - }, - &armdatabox.CreateOrderLimitForSubscriptionValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateCreateOrderLimit), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - }, - &armdatabox.PreferencesValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidatePreferences), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - Preference: &armdatabox.Preferences{ - TransportPreferences: &armdatabox.TransportPreferences{ - PreferredShipmentType: to.Ptr(armdatabox.TransportShipmentTypesMicrosoftManaged), - }, - }, - }}, - ValidationCategory: to.Ptr("JobCreationValidation"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ValidationResponse = armdatabox.ValidationResponse{ - // Properties: &armdatabox.ValidationResponseProperties{ - // IndividualResponseDetails: []armdatabox.ValidationInputResponseClassification{ - // &armdatabox.DataTransferDetailsValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateDataTransferDetails), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }, - // &armdatabox.AddressValidationProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateAddress), - // AlternateAddresses: []*armdatabox.ShippingAddress{ - // { - // AddressType: to.Ptr(armdatabox.AddressTypeNone), - // City: to.Ptr("SAN FRANCISCO"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // StreetAddress3: to.Ptr(""), - // }}, - // ValidationStatus: to.Ptr(armdatabox.AddressValidationStatusValid), - // }, - // &armdatabox.SubscriptionIsAllowedToCreateJobValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateSubscriptionIsAllowedToCreateJob), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }, - // &armdatabox.SKUAvailabilityValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateSKUAvailability), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }, - // &armdatabox.CreateOrderLimitForSubscriptionValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateCreateOrderLimit), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }, - // &armdatabox.PreferencesValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidatePreferences), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }}, - // Status: to.Ptr(armdatabox.OverallValidationStatusAllValidToProceed), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/ValidateInputs.json -func ExampleServiceClient_ValidateInputs() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServiceClient().ValidateInputs(ctx, "westus", &armdatabox.CreateJobValidations{ - IndividualRequestDetails: []armdatabox.ValidationInputRequestClassification{ - &armdatabox.DataTransferDetailsValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateDataTransferDetails), - DataImportDetails: []*armdatabox.DataImportDetails{ - { - AccountDetails: &armdatabox.StorageAccountDetails{ - DataAccountType: to.Ptr(armdatabox.DataAccountTypeStorageAccount), - StorageAccountID: to.Ptr("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"), - }, - }}, - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - }, - &armdatabox.ValidateAddress{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateAddress), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - ShippingAddress: &armdatabox.ShippingAddress{ - AddressType: to.Ptr(armdatabox.AddressTypeCommercial), - City: to.Ptr("San Francisco"), - CompanyName: to.Ptr("Microsoft"), - Country: to.Ptr("US"), - PostalCode: to.Ptr("94107"), - StateOrProvince: to.Ptr("CA"), - StreetAddress1: to.Ptr("16 TOWNSEND ST"), - StreetAddress2: to.Ptr("Unit 1"), - }, - TransportPreferences: &armdatabox.TransportPreferences{ - PreferredShipmentType: to.Ptr(armdatabox.TransportShipmentTypesMicrosoftManaged), - }, - }, - &armdatabox.SubscriptionIsAllowedToCreateJobValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateSubscriptionIsAllowedToCreateJob), - }, - &armdatabox.SKUAvailabilityValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateSKUAvailability), - Country: to.Ptr("US"), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - Location: to.Ptr("westus"), - TransferType: to.Ptr(armdatabox.TransferTypeImportToAzure), - }, - &armdatabox.CreateOrderLimitForSubscriptionValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateCreateOrderLimit), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - }, - &armdatabox.PreferencesValidationRequest{ - ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidatePreferences), - DeviceType: to.Ptr(armdatabox.SKUNameDataBox), - Preference: &armdatabox.Preferences{ - TransportPreferences: &armdatabox.TransportPreferences{ - PreferredShipmentType: to.Ptr(armdatabox.TransportShipmentTypesMicrosoftManaged), - }, - }, - }}, - ValidationCategory: to.Ptr("JobCreationValidation"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ValidationResponse = armdatabox.ValidationResponse{ - // Properties: &armdatabox.ValidationResponseProperties{ - // IndividualResponseDetails: []armdatabox.ValidationInputResponseClassification{ - // &armdatabox.DataTransferDetailsValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateDataTransferDetails), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }, - // &armdatabox.AddressValidationProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateAddress), - // AlternateAddresses: []*armdatabox.ShippingAddress{ - // { - // AddressType: to.Ptr(armdatabox.AddressTypeNone), - // City: to.Ptr("SAN FRANCISCO"), - // Country: to.Ptr("US"), - // PostalCode: to.Ptr("94107"), - // StateOrProvince: to.Ptr("CA"), - // StreetAddress1: to.Ptr("16 TOWNSEND ST"), - // StreetAddress2: to.Ptr("Unit 1"), - // StreetAddress3: to.Ptr(""), - // }}, - // ValidationStatus: to.Ptr(armdatabox.AddressValidationStatusValid), - // }, - // &armdatabox.SubscriptionIsAllowedToCreateJobValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateSubscriptionIsAllowedToCreateJob), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }, - // &armdatabox.SKUAvailabilityValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateSKUAvailability), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }, - // &armdatabox.CreateOrderLimitForSubscriptionValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidateCreateOrderLimit), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }, - // &armdatabox.PreferencesValidationResponseProperties{ - // Error: &armdatabox.CloudError{ - // AdditionalInfo: []*armdatabox.AdditionalErrorInfo{ - // }, - // Code: to.Ptr("Success"), - // Target: to.Ptr("KeyEncryptionKey"), - // Details: []*armdatabox.CloudError{ - // }, - // }, - // ValidationType: to.Ptr(armdatabox.ValidationInputDiscriminatorValidatePreferences), - // Status: to.Ptr(armdatabox.ValidationStatusValid), - // }}, - // Status: to.Ptr(armdatabox.OverallValidationStatusAllValidToProceed), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/RegionConfiguration.json -func ExampleServiceClient_RegionConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServiceClient().RegionConfiguration(ctx, "westus", armdatabox.RegionConfigurationRequest{ - ScheduleAvailabilityRequest: &armdatabox.ScheduleAvailabilityRequest{ - SKUName: to.Ptr(armdatabox.SKUNameDataBox), - StorageLocation: to.Ptr("westus"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RegionConfigurationResponse = armdatabox.RegionConfigurationResponse{ - // ScheduleAvailabilityResponse: &armdatabox.ScheduleAvailabilityResponse{ - // AvailableDates: []*time.Time{ - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-11T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-12T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-13T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-14T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-15T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-16T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-17T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-18T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-19T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-20T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-21T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-22T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-23T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-24T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-25T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-26T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-28T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-29T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-30T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-31T00:00:00+00:00"); return t}())}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databox/resource-manager/Microsoft.DataBox/stable/2022-02-01/examples/RegionConfigurationByResourceGroup.json -func ExampleServiceClient_RegionConfigurationByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatabox.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServiceClient().RegionConfigurationByResourceGroup(ctx, "SdkRg4981", "westus", armdatabox.RegionConfigurationRequest{ - ScheduleAvailabilityRequest: &armdatabox.ScheduleAvailabilityRequest{ - SKUName: to.Ptr(armdatabox.SKUNameDataBox), - StorageLocation: to.Ptr("westus"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RegionConfigurationResponse = armdatabox.RegionConfigurationResponse{ - // ScheduleAvailabilityResponse: &armdatabox.ScheduleAvailabilityResponse{ - // AvailableDates: []*time.Time{ - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-11T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-12T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-13T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-14T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-15T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-16T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-17T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-18T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-19T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-20T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-21T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-22T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-23T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-24T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-25T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-26T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-28T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-29T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-30T00:00:00+00:00"); return t}()), - // to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-31T00:00:00+00:00"); return t}())}, - // }, - // } -}