diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/CHANGELOG.md b/sdk/resourcemanager/loadtesting/armloadtesting/CHANGELOG.md index 453fb01a05d2..fecaca2b58b9 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/CHANGELOG.md +++ b/sdk/resourcemanager/loadtesting/armloadtesting/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.0.2 (2023-02-24) + +Release stable version. + ## 0.1.0 (2022-11-21) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/loadtesting/armloadtesting` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html). diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/autorest.md b/sdk/resourcemanager/loadtesting/armloadtesting/autorest.md index 2e2e3dbda976..a37ed483a769 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/autorest.md +++ b/sdk/resourcemanager/loadtesting/armloadtesting/autorest.md @@ -5,10 +5,10 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/be6cd9ccfcb6ba08c1c206627026eabfbff31fc1/specification/loadtestservice/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/be6cd9ccfcb6ba08c1c206627026eabfbff31fc1/specification/loadtestservice/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.1.0 +module-version: 1.0.2 # v1.0.0 and v1.0.1 has been retracted because of mistake. When this RP goes GA, it starts at version v1.0.2 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/constants.go b/sdk/resourcemanager/loadtesting/armloadtesting/constants.go index 733626a8802b..d6f3559b66bb 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/constants.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/constants.go @@ -11,7 +11,7 @@ package armloadtesting const ( moduleName = "armloadtesting" - moduleVersion = "v0.1.0" + moduleVersion = "v1.0.2" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/go.mod b/sdk/resourcemanager/loadtesting/armloadtesting/go.mod index 468da3733498..1134db9156ba 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/go.mod +++ b/sdk/resourcemanager/loadtesting/armloadtesting/go.mod @@ -4,12 +4,12 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 ) require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 // indirect github.com/golang-jwt/jwt/v4 v4.4.2 // indirect github.com/google/uuid v1.1.1 // indirect github.com/kylelemons/godebug v1.1.0 // indirect diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/go.sum b/sdk/resourcemanager/loadtesting/armloadtesting/go.sum index 8c0539b73123..67cfef6bdf6e 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/go.sum +++ b/sdk/resourcemanager/loadtesting/armloadtesting/go.sum @@ -1,11 +1,11 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 h1:t/W5MYAuQy81cvM8VUNfRLzhtKpXhVUAN7Cd7KVbTyc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 h1:T8quHYlUGyb/oqtSTwqlCr1ilJHrDv+ZtpSfo+hm1BU= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1/go.mod h1:gLa1CL2RNE4s7M3yopJ/p0iq5DdY6Yv5ZUt9MTRZOQM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 h1:VgSJlZH5u0k2qxSpqyghcFQKmvYckj46uymKK5XzkBM= -github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= +github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 h1:oPdPEZFSbl7oSPEAIPMPBMUmiL+mqgzBJwM/9qYcwNg= +github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1/go.mod h1:4qFor3D/HDsvBME35Xy9rwW9DecL+M2sNw1ybjPtwA0= 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.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/loadtests_client.go b/sdk/resourcemanager/loadtesting/armloadtesting/loadtests_client.go index 3c738cb2b90e..12f09ac008dd 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/loadtests_client.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/loadtests_client.go @@ -32,9 +32,9 @@ type LoadTestsClient struct { } // NewLoadTestsClient creates a new instance of LoadTestsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLoadTestsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadTestsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,12 +57,13 @@ func NewLoadTestsClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Create or update LoadTest resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// loadTestName - Load Test name. -// loadTestResource - LoadTest resource data -// options - LoadTestsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadTestsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - loadTestName - Load Test name. +// - loadTestResource - LoadTest resource data +// - options - LoadTestsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadTestsClient.BeginCreateOrUpdate +// method. func (client *LoadTestsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadTestName string, loadTestResource LoadTestResource, options *LoadTestsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LoadTestsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, loadTestName, loadTestResource, options) @@ -79,6 +80,7 @@ func (client *LoadTestsClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Create or update LoadTest resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 func (client *LoadTestsClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadTestName string, loadTestResource LoadTestResource, options *LoadTestsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadTestName, loadTestResource, options) @@ -123,10 +125,11 @@ func (client *LoadTestsClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete a LoadTest resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// loadTestName - Load Test name. -// options - LoadTestsClientBeginDeleteOptions contains the optional parameters for the LoadTestsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - loadTestName - Load Test name. +// - options - LoadTestsClientBeginDeleteOptions contains the optional parameters for the LoadTestsClient.BeginDelete method. func (client *LoadTestsClient) BeginDelete(ctx context.Context, resourceGroupName string, loadTestName string, options *LoadTestsClientBeginDeleteOptions) (*runtime.Poller[LoadTestsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, loadTestName, options) @@ -143,6 +146,7 @@ func (client *LoadTestsClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Delete a LoadTest resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 func (client *LoadTestsClient) deleteOperation(ctx context.Context, resourceGroupName string, loadTestName string, options *LoadTestsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadTestName, options) @@ -187,10 +191,11 @@ func (client *LoadTestsClient) deleteCreateRequest(ctx context.Context, resource // Get - Get a LoadTest resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// loadTestName - Load Test name. -// options - LoadTestsClientGetOptions contains the optional parameters for the LoadTestsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - loadTestName - Load Test name. +// - options - LoadTestsClientGetOptions contains the optional parameters for the LoadTestsClient.Get method. func (client *LoadTestsClient) Get(ctx context.Context, resourceGroupName string, loadTestName string, options *LoadTestsClientGetOptions) (LoadTestsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, loadTestName, options) if err != nil { @@ -242,10 +247,11 @@ func (client *LoadTestsClient) getHandleResponse(resp *http.Response) (LoadTests } // NewListByResourceGroupPager - Lists loadtest resources in a resource group. +// // Generated from API version 2022-12-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - LoadTestsClientListByResourceGroupOptions contains the optional parameters for the LoadTestsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - LoadTestsClientListByResourceGroupOptions contains the optional parameters for the LoadTestsClient.NewListByResourceGroupPager +// method. func (client *LoadTestsClient) NewListByResourceGroupPager(resourceGroupName string, options *LoadTestsClientListByResourceGroupOptions) *runtime.Pager[LoadTestsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[LoadTestsClientListByResourceGroupResponse]{ More: func(page LoadTestsClientListByResourceGroupResponse) bool { @@ -306,9 +312,10 @@ func (client *LoadTestsClient) listByResourceGroupHandleResponse(resp *http.Resp } // NewListBySubscriptionPager - Lists loadtests resources in a subscription. +// // Generated from API version 2022-12-01 -// options - LoadTestsClientListBySubscriptionOptions contains the optional parameters for the LoadTestsClient.ListBySubscription -// method. +// - options - LoadTestsClientListBySubscriptionOptions contains the optional parameters for the LoadTestsClient.NewListBySubscriptionPager +// method. func (client *LoadTestsClient) NewListBySubscriptionPager(options *LoadTestsClientListBySubscriptionOptions) *runtime.Pager[LoadTestsClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[LoadTestsClientListBySubscriptionResponse]{ More: func(page LoadTestsClientListBySubscriptionResponse) bool { @@ -365,11 +372,12 @@ func (client *LoadTestsClient) listBySubscriptionHandleResponse(resp *http.Respo } // NewListOutboundNetworkDependenciesEndpointsPager - Lists the endpoints that agents may call as part of load testing. +// // Generated from API version 2022-12-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// loadTestName - Load Test name. -// options - LoadTestsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the LoadTestsClient.ListOutboundNetworkDependenciesEndpoints -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - loadTestName - Load Test name. +// - options - LoadTestsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the LoadTestsClient.NewListOutboundNetworkDependenciesEndpointsPager +// method. func (client *LoadTestsClient) NewListOutboundNetworkDependenciesEndpointsPager(resourceGroupName string, loadTestName string, options *LoadTestsClientListOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[LoadTestsClientListOutboundNetworkDependenciesEndpointsResponse] { return runtime.NewPager(runtime.PagingHandler[LoadTestsClientListOutboundNetworkDependenciesEndpointsResponse]{ More: func(page LoadTestsClientListOutboundNetworkDependenciesEndpointsResponse) bool { @@ -435,11 +443,12 @@ func (client *LoadTestsClient) listOutboundNetworkDependenciesEndpointsHandleRes // BeginUpdate - Update a loadtest resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// loadTestName - Load Test name. -// loadTestResourcePatchRequestBody - LoadTest resource update data -// options - LoadTestsClientBeginUpdateOptions contains the optional parameters for the LoadTestsClient.BeginUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - loadTestName - Load Test name. +// - loadTestResourcePatchRequestBody - LoadTest resource update data +// - options - LoadTestsClientBeginUpdateOptions contains the optional parameters for the LoadTestsClient.BeginUpdate method. func (client *LoadTestsClient) BeginUpdate(ctx context.Context, resourceGroupName string, loadTestName string, loadTestResourcePatchRequestBody LoadTestResourcePatchRequestBody, options *LoadTestsClientBeginUpdateOptions) (*runtime.Poller[LoadTestsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, loadTestName, loadTestResourcePatchRequestBody, options) @@ -456,6 +465,7 @@ func (client *LoadTestsClient) BeginUpdate(ctx context.Context, resourceGroupNam // Update - Update a loadtest resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 func (client *LoadTestsClient) update(ctx context.Context, resourceGroupName string, loadTestName string, loadTestResourcePatchRequestBody LoadTestResourcePatchRequestBody, options *LoadTestsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, loadTestName, loadTestResourcePatchRequestBody, options) diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/loadtests_client_example_test.go b/sdk/resourcemanager/loadtesting/armloadtesting/loadtests_client_example_test.go index 2dbab6a944b6..f8d830842e20 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/loadtests_client_example_test.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/loadtests_client_example_test.go @@ -5,6 +5,7 @@ // 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 armloadtesting_test @@ -17,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/loadtesting/armloadtesting" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListBySubscription.json func ExampleLoadTestsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -30,18 +31,44 @@ func ExampleLoadTestsClient_NewListBySubscriptionPager() { } pager := client.NewListBySubscriptionPager(nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + 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.LoadTestResourcePageList = armloadtesting.LoadTestResourcePageList{ + // Value: []*armloadtesting.LoadTestResource{ + // { + // Name: to.Ptr("myLoadTest"), + // Type: to.Ptr("Microsoft.LoadTestService/loadTests"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.LoadTestService/loadTests/myLoadTest"), + // SystemData: &armloadtesting.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // CreatedBy: to.Ptr("userId1001"), + // CreatedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // LastModifiedBy: to.Ptr("userId1001"), + // LastModifiedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // }, + // Location: to.Ptr("westus"), + // Tags: map[string]*string{ + // "Team": to.Ptr("Dev Exp"), + // }, + // Properties: &armloadtesting.LoadTestProperties{ + // Description: to.Ptr("This is new load test resource"), + // DataPlaneURI: to.Ptr("https://myLoadTest.00000000-0000-0000-0000-000000000000.cnt-dp.domain.com"), + // ProvisioningState: to.Ptr(armloadtesting.ResourceStateSucceeded), + // }, + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListByResourceGroup.json func ExampleLoadTestsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -54,18 +81,44 @@ func ExampleLoadTestsClient_NewListByResourceGroupPager() { } pager := client.NewListByResourceGroupPager("dummyrg", nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + 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.LoadTestResourcePageList = armloadtesting.LoadTestResourcePageList{ + // Value: []*armloadtesting.LoadTestResource{ + // { + // Name: to.Ptr("myLoadTest"), + // Type: to.Ptr("Microsoft.LoadTestService/loadTests"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.LoadTestService/loadTests/myLoadTest"), + // SystemData: &armloadtesting.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // CreatedBy: to.Ptr("userId1001"), + // CreatedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // LastModifiedBy: to.Ptr("userId1001"), + // LastModifiedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // }, + // Location: to.Ptr("westus"), + // Tags: map[string]*string{ + // "Team": to.Ptr("Dev Exp"), + // }, + // Properties: &armloadtesting.LoadTestProperties{ + // Description: to.Ptr("This is new load test resource"), + // DataPlaneURI: to.Ptr("https://myLoadTest.00000000-0000-0000-0000-000000000000.cnt-dp.domain.com"), + // ProvisioningState: to.Ptr(armloadtesting.ResourceStateSucceeded), + // }, + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Get.json func ExampleLoadTestsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,11 +133,34 @@ func ExampleLoadTestsClient_Get() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.LoadTestResource = armloadtesting.LoadTestResource{ + // Name: to.Ptr("myLoadTest"), + // Type: to.Ptr("Microsoft.LoadTestService/loadTests"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.LoadTestService/loadTests/myLoadTest"), + // SystemData: &armloadtesting.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // CreatedBy: to.Ptr("userId1001"), + // CreatedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // LastModifiedBy: to.Ptr("userId1001"), + // LastModifiedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // }, + // Location: to.Ptr("westus"), + // Tags: map[string]*string{ + // "Team": to.Ptr("Dev Exp"), + // }, + // Properties: &armloadtesting.LoadTestProperties{ + // Description: to.Ptr("This is new load test resource"), + // DataPlaneURI: to.Ptr("https://myLoadTest.00000000-0000-0000-0000-000000000000.cnt-dp.domain.com"), + // ProvisioningState: to.Ptr(armloadtesting.ResourceStateSucceeded), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_CreateOrUpdate.json func ExampleLoadTestsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -124,11 +200,52 @@ func ExampleLoadTestsClient_BeginCreateOrUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.LoadTestResource = armloadtesting.LoadTestResource{ + // Name: to.Ptr("myLoadTest"), + // Type: to.Ptr("Microsoft.LoadTestService/loadTests"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.LoadTestService/loadTests/myLoadTest"), + // SystemData: &armloadtesting.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // CreatedBy: to.Ptr("userId1001"), + // CreatedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // LastModifiedBy: to.Ptr("userId1001"), + // LastModifiedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // }, + // Location: to.Ptr("westus"), + // Tags: map[string]*string{ + // "Team": to.Ptr("Dev Exp"), + // }, + // Identity: &armloadtesting.ManagedServiceIdentity{ + // Type: to.Ptr(armloadtesting.ManagedServiceIdentityTypeSystemAssignedUserAssigned), + // PrincipalID: to.Ptr("12345678-1234-1234-1234-123456789012"), + // TenantID: to.Ptr("12345678-1234-1234-4321-123456789012"), + // UserAssignedIdentities: map[string]*armloadtesting.UserAssignedIdentity{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armloadtesting.UserAssignedIdentity{ + // ClientID: to.Ptr("12345678-4321-1234-1234-123456789012"), + // PrincipalID: to.Ptr("12345678-1234-4321-1234-123456789012"), + // }, + // }, + // }, + // Properties: &armloadtesting.LoadTestProperties{ + // Description: to.Ptr("This is new load test resource"), + // DataPlaneURI: to.Ptr("https://myLoadTest.00000000-0000-0000-0000-000000000000.cnt-dp.domain.com"), + // Encryption: &armloadtesting.EncryptionProperties{ + // Identity: &armloadtesting.EncryptionPropertiesIdentity{ + // Type: to.Ptr(armloadtesting.TypeUserAssigned), + // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"), + // }, + // KeyURL: to.Ptr("https://dummy.vault.azure.net/keys/dummykey1"), + // }, + // ProvisioningState: to.Ptr(armloadtesting.ResourceStateSucceeded), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Update.json func ExampleLoadTestsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -167,11 +284,52 @@ func ExampleLoadTestsClient_BeginUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.LoadTestResource = armloadtesting.LoadTestResource{ + // Name: to.Ptr("myLoadTest"), + // Type: to.Ptr("Microsoft.LoadTestService/loadTests"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.LoadTestService/loadTests/myLoadTest"), + // SystemData: &armloadtesting.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // CreatedBy: to.Ptr("userId1001"), + // CreatedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-28T12:32:33Z"); return t}()), + // LastModifiedBy: to.Ptr("userId1001"), + // LastModifiedByType: to.Ptr(armloadtesting.CreatedByTypeUser), + // }, + // Location: to.Ptr("westus"), + // Tags: map[string]*string{ + // "Division": to.Ptr("LT"), + // "Team": to.Ptr("Dev Exp"), + // }, + // Identity: &armloadtesting.ManagedServiceIdentity{ + // Type: to.Ptr(armloadtesting.ManagedServiceIdentityTypeSystemAssignedUserAssigned), + // PrincipalID: to.Ptr("12345678-1234-1234-1234-123456789012"), + // TenantID: to.Ptr("12345678-1234-1234-4321-123456789012"), + // UserAssignedIdentities: map[string]*armloadtesting.UserAssignedIdentity{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armloadtesting.UserAssignedIdentity{ + // ClientID: to.Ptr("12345678-4321-1234-1234-123456789012"), + // PrincipalID: to.Ptr("12345678-1234-4321-1234-123456789012"), + // }, + // }, + // }, + // Properties: &armloadtesting.LoadTestProperties{ + // Description: to.Ptr("This is new load test resource"), + // DataPlaneURI: to.Ptr("https://myLoadTest.00000000-0000-0000-0000-000000000000.cnt-dp.domain.com"), + // Encryption: &armloadtesting.EncryptionProperties{ + // Identity: &armloadtesting.EncryptionPropertiesIdentity{ + // Type: to.Ptr(armloadtesting.TypeSystemAssigned), + // }, + // KeyURL: to.Ptr("https://dummy.vault.azure.net/keys/dummykey1"), + // }, + // ProvisioningState: to.Ptr(armloadtesting.ResourceStateSucceeded), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Delete.json func ExampleLoadTestsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -192,7 +350,7 @@ func ExampleLoadTestsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListOutboundNetworkDependenciesEndpoints.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListOutboundNetworkDependenciesEndpoints.json func ExampleLoadTestsClient_NewListOutboundNetworkDependenciesEndpointsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -205,13 +363,97 @@ func ExampleLoadTestsClient_NewListOutboundNetworkDependenciesEndpointsPager() { } pager := client.NewListOutboundNetworkDependenciesEndpointsPager("default-azureloadtest-japaneast", "sampleloadtest", nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + 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.OutboundEnvironmentEndpointCollection = armloadtesting.OutboundEnvironmentEndpointCollection{ + // Value: []*armloadtesting.OutboundEnvironmentEndpoint{ + // { + // Category: to.Ptr("Azure Batch"), + // Endpoints: []*armloadtesting.EndpointDependency{ + // { + // Description: to.Ptr("Applicable to job manager tasks, tasks that use job scoped authentication, or any task that makes calls to Batch."), + // DomainName: to.Ptr("sampleacct.japaneast.batch.azure.com"), + // EndpointDetails: []*armloadtesting.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }, + // { + // Description: to.Ptr("Applicable to all Azure Batch pools."), + // DomainName: to.Ptr("japaneast.service.batch.azure.com"), + // EndpointDetails: []*armloadtesting.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }, + // { + // Category: to.Ptr("Azure Storage"), + // Endpoints: []*armloadtesting.EndpointDependency{ + // { + // Description: to.Ptr("AutoStorage endpoint for this Batch account. Applicable to all Azure Batch pools under this account."), + // DomainName: to.Ptr("autostorageaccountname.blob.core.windows.net"), + // EndpointDetails: []*armloadtesting.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }, + // { + // Description: to.Ptr("Applicable to all Azure Batch pools."), + // DomainName: to.Ptr("*.blob.core.windows.net"), + // EndpointDetails: []*armloadtesting.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }, + // { + // Description: to.Ptr("Applicable to all Azure Batch pools."), + // DomainName: to.Ptr("*.table.core.windows.net"), + // EndpointDetails: []*armloadtesting.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }, + // { + // Description: to.Ptr("Applicable to all Azure Batch pools."), + // DomainName: to.Ptr("*.queue.core.windows.net"), + // EndpointDetails: []*armloadtesting.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }, + // { + // Category: to.Ptr("Microsoft Package Repository"), + // Endpoints: []*armloadtesting.EndpointDependency{ + // { + // Description: to.Ptr("Only applicable to pools containing a Mount Configuration. Learn about Mount Configurations in Batch at https://docs.microsoft.com/azure/batch/virtual-file-mount."), + // DomainName: to.Ptr("packages.microsoft.com"), + // EndpointDetails: []*armloadtesting.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }, + // { + // Category: to.Ptr("Azure Key Vault"), + // Endpoints: []*armloadtesting.EndpointDependency{ + // { + // Description: to.Ptr("Only applicable to pools containing a Disk Encryption Configuration and whose VM size does not support encryption at host. Learn more about disk encryption in Azure Batch at https://docs.microsoft.com/azure/batch/disk-encryption. Learn more about encryption at host and supported VM sizes at https://docs.microsoft.com/azure/virtual-machines/disks-enable-host-based-encryption-portal."), + // DomainName: to.Ptr("*.vault.azure.net"), + // EndpointDetails: []*armloadtesting.EndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }}, + // } } } diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/models.go b/sdk/resourcemanager/loadtesting/armloadtesting/models.go index 6945a1323be0..1ba919933885 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/models.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/models.go @@ -173,18 +173,19 @@ type LoadTestsClientGetOptions struct { // placeholder for future optional parameters } -// LoadTestsClientListByResourceGroupOptions contains the optional parameters for the LoadTestsClient.ListByResourceGroup +// LoadTestsClientListByResourceGroupOptions contains the optional parameters for the LoadTestsClient.NewListByResourceGroupPager // method. type LoadTestsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// LoadTestsClientListBySubscriptionOptions contains the optional parameters for the LoadTestsClient.ListBySubscription method. +// LoadTestsClientListBySubscriptionOptions contains the optional parameters for the LoadTestsClient.NewListBySubscriptionPager +// method. type LoadTestsClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// LoadTestsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the LoadTestsClient.ListOutboundNetworkDependenciesEndpoints +// LoadTestsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the LoadTestsClient.NewListOutboundNetworkDependenciesEndpointsPager // method. type LoadTestsClientListOutboundNetworkDependenciesEndpointsOptions struct { // placeholder for future optional parameters @@ -259,7 +260,7 @@ type OperationListResult struct { Value []*Operation `json:"value,omitempty" azure:"ro"` } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters } @@ -374,7 +375,7 @@ type QuotasClientGetOptions struct { // placeholder for future optional parameters } -// QuotasClientListOptions contains the optional parameters for the QuotasClient.List method. +// QuotasClientListOptions contains the optional parameters for the QuotasClient.NewListPager method. type QuotasClientListOptions struct { // placeholder for future optional parameters } diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/models_serde.go b/sdk/resourcemanager/loadtesting/armloadtesting/models_serde.go index 57e83f275ff1..4ec933c53d74 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/models_serde.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/models_serde.go @@ -18,7 +18,7 @@ import ( // MarshalJSON implements the json.Marshaller interface for type CheckQuotaAvailabilityResponse. func (c CheckQuotaAvailabilityResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -61,7 +61,7 @@ func (c *CheckQuotaAvailabilityResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CheckQuotaAvailabilityResponseProperties. func (c CheckQuotaAvailabilityResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "availabilityStatus", c.AvailabilityStatus) populate(objectMap, "isAvailable", c.IsAvailable) return json.Marshal(objectMap) @@ -92,7 +92,7 @@ func (c *CheckQuotaAvailabilityResponseProperties) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type EncryptionProperties. func (e EncryptionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "identity", e.Identity) populate(objectMap, "keyUrl", e.KeyURL) return json.Marshal(objectMap) @@ -123,7 +123,7 @@ func (e *EncryptionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EncryptionPropertiesIdentity. func (e EncryptionPropertiesIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "resourceId", e.ResourceID) populate(objectMap, "type", e.Type) return json.Marshal(objectMap) @@ -154,7 +154,7 @@ func (e *EncryptionPropertiesIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointDependency. func (e EndpointDependency) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", e.Description) populate(objectMap, "domainName", e.DomainName) populate(objectMap, "endpointDetails", e.EndpointDetails) @@ -189,7 +189,7 @@ func (e *EndpointDependency) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointDetail. func (e EndpointDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", e.Port) return json.Marshal(objectMap) } @@ -216,7 +216,7 @@ func (e *EndpointDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadTestProperties. func (l LoadTestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dataPlaneURI", l.DataPlaneURI) populate(objectMap, "description", l.Description) populate(objectMap, "encryption", l.Encryption) @@ -255,7 +255,7 @@ func (l *LoadTestProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadTestResource. func (l LoadTestResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", l.ID) populate(objectMap, "identity", l.Identity) populate(objectMap, "location", l.Location) @@ -310,7 +310,7 @@ func (l *LoadTestResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadTestResourcePageList. func (l LoadTestResourcePageList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -341,7 +341,7 @@ func (l *LoadTestResourcePageList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadTestResourcePatchRequestBody. func (l LoadTestResourcePatchRequestBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "identity", l.Identity) populate(objectMap, "properties", l.Properties) populate(objectMap, "tags", l.Tags) @@ -376,7 +376,7 @@ func (l *LoadTestResourcePatchRequestBody) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadTestResourcePatchRequestBodyProperties. func (l LoadTestResourcePatchRequestBodyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", l.Description) populate(objectMap, "encryption", l.Encryption) return json.Marshal(objectMap) @@ -407,7 +407,7 @@ func (l *LoadTestResourcePatchRequestBodyProperties) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "principalId", m.PrincipalID) populate(objectMap, "tenantId", m.TenantID) populate(objectMap, "type", m.Type) @@ -446,7 +446,7 @@ func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actionType", o.ActionType) populate(objectMap, "display", o.Display) populate(objectMap, "isDataAction", o.IsDataAction) @@ -489,7 +489,7 @@ func (o *Operation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationDisplay. func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", o.Description) populate(objectMap, "operation", o.Operation) populate(objectMap, "provider", o.Provider) @@ -528,7 +528,7 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationListResult. func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", o.NextLink) populate(objectMap, "value", o.Value) return json.Marshal(objectMap) @@ -559,7 +559,7 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint. func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "category", o.Category) populate(objectMap, "endpoints", o.Endpoints) return json.Marshal(objectMap) @@ -590,7 +590,7 @@ func (o *OutboundEnvironmentEndpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointCollection. func (o OutboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", o.NextLink) populate(objectMap, "value", o.Value) return json.Marshal(objectMap) @@ -621,7 +621,7 @@ func (o *OutboundEnvironmentEndpointCollection) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type QuotaBucketRequest. func (q QuotaBucketRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", q.ID) populate(objectMap, "name", q.Name) populate(objectMap, "properties", q.Properties) @@ -664,7 +664,7 @@ func (q *QuotaBucketRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QuotaBucketRequestProperties. func (q QuotaBucketRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "currentQuota", q.CurrentQuota) populate(objectMap, "currentUsage", q.CurrentUsage) populate(objectMap, "dimensions", q.Dimensions) @@ -703,7 +703,7 @@ func (q *QuotaBucketRequestProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QuotaBucketRequestPropertiesDimensions. func (q QuotaBucketRequestPropertiesDimensions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "location", q.Location) populate(objectMap, "subscriptionId", q.SubscriptionID) return json.Marshal(objectMap) @@ -734,7 +734,7 @@ func (q *QuotaBucketRequestPropertiesDimensions) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type QuotaResource. func (q QuotaResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", q.ID) populate(objectMap, "name", q.Name) populate(objectMap, "properties", q.Properties) @@ -777,7 +777,7 @@ func (q *QuotaResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QuotaResourceList. func (q QuotaResourceList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", q.NextLink) populate(objectMap, "value", q.Value) return json.Marshal(objectMap) @@ -808,7 +808,7 @@ func (q *QuotaResourceList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QuotaResourceProperties. func (q QuotaResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "limit", q.Limit) populate(objectMap, "provisioningState", q.ProvisioningState) populate(objectMap, "usage", q.Usage) @@ -843,7 +843,7 @@ func (q *QuotaResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) @@ -890,7 +890,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", u.ClientID) populate(objectMap, "principalId", u.PrincipalID) return json.Marshal(objectMap) @@ -919,7 +919,7 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { return nil } -func populate(m map[string]interface{}, k string, v interface{}) { +func populate(m map[string]any, k string, v any) { if v == nil { return } else if azcore.IsNullValue(v) { @@ -929,7 +929,7 @@ func populate(m map[string]interface{}, k string, v interface{}) { } } -func unpopulate(data json.RawMessage, fn string, v interface{}) error { +func unpopulate(data json.RawMessage, fn string, v any) error { if data == nil { return nil } diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/operations_client.go b/sdk/resourcemanager/loadtesting/armloadtesting/operations_client.go index 58393e52e95b..f5573e2ab7fb 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/operations_client.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/operations_client.go @@ -28,8 +28,8 @@ type OperationsClient struct { } // NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -50,8 +50,9 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO } // NewListPager - Lists all the available API operations for Load Test Resource. +// // Generated from API version 2022-12-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// - 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]{ More: func(page OperationsClientListResponse) bool { diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/operations_client_example_test.go b/sdk/resourcemanager/loadtesting/armloadtesting/operations_client_example_test.go index a5a20bfa5c5a..8416fdd991e5 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/operations_client_example_test.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/operations_client_example_test.go @@ -5,6 +5,7 @@ // 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 armloadtesting_test @@ -16,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/loadtesting/armloadtesting" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Operations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -29,13 +30,47 @@ func ExampleOperationsClient_NewListPager() { } pager := client.NewListPager(nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + 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.OperationListResult = armloadtesting.OperationListResult{ + // Value: []*armloadtesting.Operation{ + // { + // Name: to.Ptr("Microsoft.LoadTestService/loadTests/Write"), + // Display: &armloadtesting.OperationDisplay{ + // Description: to.Ptr("Set LoadTests"), + // Operation: to.Ptr("Creates or updates the LoadTests"), + // Provider: to.Ptr("Microsoft.LoadTestService"), + // Resource: to.Ptr("loadTests"), + // }, + // IsDataAction: to.Ptr(false), + // }, + // { + // Name: to.Ptr("Microsoft.LoadTestService/loadTests/Delete"), + // Display: &armloadtesting.OperationDisplay{ + // Description: to.Ptr("Delete LoadTests"), + // Operation: to.Ptr("Deletes the LoadTests"), + // Provider: to.Ptr("Microsoft.LoadTestService"), + // Resource: to.Ptr("loadTests"), + // }, + // IsDataAction: to.Ptr(false), + // }, + // { + // Name: to.Ptr("Microsoft.LoadTestService/loadTests/Read"), + // Display: &armloadtesting.OperationDisplay{ + // Description: to.Ptr("Read LoadTests"), + // Operation: to.Ptr("Reads the LoadTests"), + // Provider: to.Ptr("Microsoft.LoadTestService"), + // Resource: to.Ptr("loadTests"), + // }, + // IsDataAction: to.Ptr(false), + // }}, + // } } } diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/quotas_client.go b/sdk/resourcemanager/loadtesting/armloadtesting/quotas_client.go index adb9db167f12..64ede5a1bd55 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/quotas_client.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/quotas_client.go @@ -32,9 +32,9 @@ type QuotasClient struct { } // NewQuotasClient creates a new instance of QuotasClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewQuotasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QuotasClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,12 +57,13 @@ func NewQuotasClient(subscriptionID string, credential azcore.TokenCredential, o // CheckAvailability - Check Quota Availability on quota bucket per region per subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 -// location - The name of Azure region. -// quotaBucketName - Quota Bucket name. -// quotaBucketRequest - Quota Bucket Request data -// options - QuotasClientCheckAvailabilityOptions contains the optional parameters for the QuotasClient.CheckAvailability -// method. +// - location - The name of Azure region. +// - quotaBucketName - Quota Bucket name. +// - quotaBucketRequest - Quota Bucket Request data +// - options - QuotasClientCheckAvailabilityOptions contains the optional parameters for the QuotasClient.CheckAvailability +// method. func (client *QuotasClient) CheckAvailability(ctx context.Context, location string, quotaBucketName string, quotaBucketRequest QuotaBucketRequest, options *QuotasClientCheckAvailabilityOptions) (QuotasClientCheckAvailabilityResponse, error) { req, err := client.checkAvailabilityCreateRequest(ctx, location, quotaBucketName, quotaBucketRequest, options) if err != nil { @@ -115,10 +116,11 @@ func (client *QuotasClient) checkAvailabilityHandleResponse(resp *http.Response) // Get - Get the available quota for a quota bucket per region per subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-12-01 -// location - The name of Azure region. -// quotaBucketName - Quota Bucket name. -// options - QuotasClientGetOptions contains the optional parameters for the QuotasClient.Get method. +// - location - The name of Azure region. +// - quotaBucketName - Quota Bucket name. +// - options - QuotasClientGetOptions contains the optional parameters for the QuotasClient.Get method. func (client *QuotasClient) Get(ctx context.Context, location string, quotaBucketName string, options *QuotasClientGetOptions) (QuotasClientGetResponse, error) { req, err := client.getCreateRequest(ctx, location, quotaBucketName, options) if err != nil { @@ -170,9 +172,10 @@ func (client *QuotasClient) getHandleResponse(resp *http.Response) (QuotasClient } // NewListPager - Lists all the available quota per region per subscription. +// // Generated from API version 2022-12-01 -// location - The name of Azure region. -// options - QuotasClientListOptions contains the optional parameters for the QuotasClient.List method. +// - location - The name of Azure region. +// - options - QuotasClientListOptions contains the optional parameters for the QuotasClient.NewListPager method. func (client *QuotasClient) NewListPager(location string, options *QuotasClientListOptions) *runtime.Pager[QuotasClientListResponse] { return runtime.NewPager(runtime.PagingHandler[QuotasClientListResponse]{ More: func(page QuotasClientListResponse) bool { diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/quotas_client_example_test.go b/sdk/resourcemanager/loadtesting/armloadtesting/quotas_client_example_test.go index 05af9a626ef9..79e4e948b38c 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/quotas_client_example_test.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/quotas_client_example_test.go @@ -5,6 +5,7 @@ // 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 armloadtesting_test @@ -17,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/loadtesting/armloadtesting" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_List.json func ExampleQuotasClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -30,18 +31,31 @@ func ExampleQuotasClient_NewListPager() { } pager := client.NewListPager("westus", nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + 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.QuotaResourceList = armloadtesting.QuotaResourceList{ + // Value: []*armloadtesting.QuotaResource{ + // { + // Name: to.Ptr("testQuotaBucket"), + // Type: to.Ptr("Microsoft.LoadTestService/locations/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.LoadTestService/locations/westus/quotas/testQuotaBucket"), + // Properties: &armloadtesting.QuotaResourceProperties{ + // Limit: to.Ptr[int32](50), + // Usage: to.Ptr[int32](20), + // }, + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_Get.json func ExampleQuotasClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -56,11 +70,21 @@ func ExampleQuotasClient_Get() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.QuotaResource = armloadtesting.QuotaResource{ + // Name: to.Ptr("testQuotaBucket"), + // Type: to.Ptr("Microsoft.LoadTestService/locations/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.LoadTestService/locations/westus/quotas/testQuotaBucket"), + // Properties: &armloadtesting.QuotaResourceProperties{ + // Limit: to.Ptr[int32](50), + // Usage: to.Ptr[int32](20), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_CheckAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_CheckAvailability.json func ExampleQuotasClient_CheckAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -85,6 +109,16 @@ func ExampleQuotasClient_CheckAvailability() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.CheckQuotaAvailabilityResponse = armloadtesting.CheckQuotaAvailabilityResponse{ + // Name: to.Ptr("testQuotaBucket"), + // Type: to.Ptr("Microsoft.LoadTestService/locations/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.LoadTestService/locations/westus/quotas/testQuotaBucket"), + // Properties: &armloadtesting.CheckQuotaAvailabilityResponseProperties{ + // AvailabilityStatus: to.Ptr("The requested quota is currently unavailable. Please request for different quota, or upgrade subscription offer type and try again later."), + // IsAvailable: to.Ptr(false), + // }, + // } } diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/response_types.go b/sdk/resourcemanager/loadtesting/armloadtesting/response_types.go index 627076a35ff2..94fd69f26c64 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/response_types.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/response_types.go @@ -9,12 +9,12 @@ package armloadtesting -// LoadTestsClientCreateOrUpdateResponse contains the response from method LoadTestsClient.CreateOrUpdate. +// LoadTestsClientCreateOrUpdateResponse contains the response from method LoadTestsClient.BeginCreateOrUpdate. type LoadTestsClientCreateOrUpdateResponse struct { LoadTestResource } -// LoadTestsClientDeleteResponse contains the response from method LoadTestsClient.Delete. +// LoadTestsClientDeleteResponse contains the response from method LoadTestsClient.BeginDelete. type LoadTestsClientDeleteResponse struct { // placeholder for future response values } @@ -24,27 +24,27 @@ type LoadTestsClientGetResponse struct { LoadTestResource } -// LoadTestsClientListByResourceGroupResponse contains the response from method LoadTestsClient.ListByResourceGroup. +// LoadTestsClientListByResourceGroupResponse contains the response from method LoadTestsClient.NewListByResourceGroupPager. type LoadTestsClientListByResourceGroupResponse struct { LoadTestResourcePageList } -// LoadTestsClientListBySubscriptionResponse contains the response from method LoadTestsClient.ListBySubscription. +// LoadTestsClientListBySubscriptionResponse contains the response from method LoadTestsClient.NewListBySubscriptionPager. type LoadTestsClientListBySubscriptionResponse struct { LoadTestResourcePageList } -// LoadTestsClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method LoadTestsClient.ListOutboundNetworkDependenciesEndpoints. +// LoadTestsClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method LoadTestsClient.NewListOutboundNetworkDependenciesEndpointsPager. type LoadTestsClientListOutboundNetworkDependenciesEndpointsResponse struct { OutboundEnvironmentEndpointCollection } -// LoadTestsClientUpdateResponse contains the response from method LoadTestsClient.Update. +// LoadTestsClientUpdateResponse contains the response from method LoadTestsClient.BeginUpdate. type LoadTestsClientUpdateResponse struct { LoadTestResource } -// OperationsClientListResponse contains the response from method OperationsClient.List. +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { OperationListResult } @@ -59,7 +59,7 @@ type QuotasClientGetResponse struct { QuotaResource } -// QuotasClientListResponse contains the response from method QuotasClient.List. +// QuotasClientListResponse contains the response from method QuotasClient.NewListPager. type QuotasClientListResponse struct { QuotaResourceList } diff --git a/sdk/resourcemanager/loadtesting/armloadtesting/time_rfc3339.go b/sdk/resourcemanager/loadtesting/armloadtesting/time_rfc3339.go index bcd211a71e86..e8ca9c280046 100644 --- a/sdk/resourcemanager/loadtesting/armloadtesting/time_rfc3339.go +++ b/sdk/resourcemanager/loadtesting/armloadtesting/time_rfc3339.go @@ -62,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) {