diff --git a/sdk/resourcemanager/iothub/armiothub/CHANGELOG.md b/sdk/resourcemanager/iothub/armiothub/CHANGELOG.md index b6aeb98edd68..a441d518eca7 100644 --- a/sdk/resourcemanager/iothub/armiothub/CHANGELOG.md +++ b/sdk/resourcemanager/iothub/armiothub/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 1.2.0-beta.2 (2023-09-22) +### Breaking Changes + +- Field `CollectionName` of struct `RoutingCosmosDBSQLAPIProperties` has been removed +- Field `CosmosDBSQLCollections` of struct `RoutingEndpoints` has been removed + +### Features Added + +- New field `ContainerName` in struct `RoutingCosmosDBSQLAPIProperties` +- New field `CosmosDBSQLContainers` in struct `RoutingEndpoints` + + ## 1.2.0-beta.1 (2023-04-28) ### Features Added diff --git a/sdk/resourcemanager/iothub/armiothub/assets.json b/sdk/resourcemanager/iothub/armiothub/assets.json index c91d47105436..27885f00bf6f 100644 --- a/sdk/resourcemanager/iothub/armiothub/assets.json +++ b/sdk/resourcemanager/iothub/armiothub/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/iothub/armiothub", - "Tag": "go/resourcemanager/iothub/armiothub_1f14029f7c" + "Tag": "go/resourcemanager/iothub/armiothub_34143edb71" } diff --git a/sdk/resourcemanager/iothub/armiothub/autorest.md b/sdk/resourcemanager/iothub/armiothub/autorest.md index 33277badb6c6..b49cfbeabd82 100644 --- a/sdk/resourcemanager/iothub/armiothub/autorest.md +++ b/sdk/resourcemanager/iothub/armiothub/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.2.0-beta.1 -tag: package-preview-2022-11 +module-version: 1.2.0-beta.2 +tag: package-preview-2023-06 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/iothub/armiothub/certificates_client.go b/sdk/resourcemanager/iothub/armiothub/certificates_client.go index a94873cc1c82..5d3352cacabb 100644 --- a/sdk/resourcemanager/iothub/armiothub/certificates_client.go +++ b/sdk/resourcemanager/iothub/armiothub/certificates_client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -47,7 +46,7 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Adds new or replaces existing certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate @@ -55,18 +54,21 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // - options - CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate // method. func (client *CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, certificateDescription CertificateDescription, options *CertificatesClientCreateOrUpdateOptions) (CertificatesClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, certificateName, certificateDescription, options) if err != nil { return CertificatesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CertificatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,13 +95,16 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateDescription) + if err := runtime.MarshalAsJSON(req, certificateDescription); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -114,23 +119,25 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes an existing X509 certificate or does nothing if it does not exist. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate // - ifMatch - ETag of the Certificate. // - options - CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, options *CertificatesClientDeleteOptions) (CertificatesClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, certificateName, ifMatch, options) if err != nil { return CertificatesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientDeleteResponse{}, err } return CertificatesClientDeleteResponse{}, nil } @@ -159,7 +166,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} @@ -170,7 +177,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // to generate a leaf certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate @@ -178,18 +185,21 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // - options - CertificatesClientGenerateVerificationCodeOptions contains the optional parameters for the CertificatesClient.GenerateVerificationCode // method. func (client *CertificatesClient) GenerateVerificationCode(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, options *CertificatesClientGenerateVerificationCodeOptions) (CertificatesClientGenerateVerificationCodeResponse, error) { + var err error req, err := client.generateVerificationCodeCreateRequest(ctx, resourceGroupName, resourceName, certificateName, ifMatch, options) if err != nil { return CertificatesClientGenerateVerificationCodeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientGenerateVerificationCodeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientGenerateVerificationCodeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientGenerateVerificationCodeResponse{}, err } - return client.generateVerificationCodeHandleResponse(resp) + resp, err := client.generateVerificationCodeHandleResponse(httpResp) + return resp, err } // generateVerificationCodeCreateRequest creates the GenerateVerificationCode request. @@ -216,7 +226,7 @@ func (client *CertificatesClient) generateVerificationCodeCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} @@ -235,24 +245,27 @@ func (client *CertificatesClient) generateVerificationCodeHandleResponse(resp *h // Get - Returns the certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate // - options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, certificateName, options) if err != nil { return CertificatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -279,7 +292,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,24 +310,27 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif // ListByIotHub - Returns the list of certificates. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - CertificatesClientListByIotHubOptions contains the optional parameters for the CertificatesClient.ListByIotHub // method. func (client *CertificatesClient) ListByIotHub(ctx context.Context, resourceGroupName string, resourceName string, options *CertificatesClientListByIotHubOptions) (CertificatesClientListByIotHubResponse, error) { + var err error req, err := client.listByIotHubCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return CertificatesClientListByIotHubResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientListByIotHubResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientListByIotHubResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientListByIotHubResponse{}, err } - return client.listByIotHubHandleResponse(resp) + resp, err := client.listByIotHubHandleResponse(httpResp) + return resp, err } // listByIotHubCreateRequest creates the ListByIotHub request. @@ -337,7 +353,7 @@ func (client *CertificatesClient) listByIotHubCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -356,7 +372,7 @@ func (client *CertificatesClient) listByIotHubHandleResponse(resp *http.Response // certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - certificateName - The name of the certificate @@ -364,18 +380,21 @@ func (client *CertificatesClient) listByIotHubHandleResponse(resp *http.Response // - certificateVerificationBody - The name of the certificate // - options - CertificatesClientVerifyOptions contains the optional parameters for the CertificatesClient.Verify method. func (client *CertificatesClient) Verify(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, certificateVerificationBody CertificateVerificationDescription, options *CertificatesClientVerifyOptions) (CertificatesClientVerifyResponse, error) { + var err error req, err := client.verifyCreateRequest(ctx, resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody, options) if err != nil { return CertificatesClientVerifyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientVerifyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientVerifyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientVerifyResponse{}, err } - return client.verifyHandleResponse(resp) + resp, err := client.verifyHandleResponse(httpResp) + return resp, err } // verifyCreateRequest creates the Verify request. @@ -402,11 +421,14 @@ func (client *CertificatesClient) verifyCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateVerificationBody) + if err := runtime.MarshalAsJSON(req, certificateVerificationBody); err != nil { + return nil, err + } + return req, nil } // verifyHandleResponse handles the Verify response. diff --git a/sdk/resourcemanager/iothub/armiothub/certificates_client_example_test.go b/sdk/resourcemanager/iothub/armiothub/certificates_client_example_test.go index 33300119cff6..16af458792d4 100644 --- a/sdk/resourcemanager/iothub/armiothub/certificates_client_example_test.go +++ b/sdk/resourcemanager/iothub/armiothub/certificates_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listcertificates.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listcertificates.json func ExampleCertificatesClient_ListByIotHub() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -56,7 +56,7 @@ func ExampleCertificatesClient_ListByIotHub() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getcertificate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getcertificate.json func ExampleCertificatesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -91,7 +91,7 @@ func ExampleCertificatesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_certificatescreateorupdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_certificatescreateorupdate.json func ExampleCertificatesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -130,7 +130,7 @@ func ExampleCertificatesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_certificatesdelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_certificatesdelete.json func ExampleCertificatesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -147,7 +147,7 @@ func ExampleCertificatesClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_generateverificationcode.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_generateverificationcode.json func ExampleCertificatesClient_GenerateVerificationCode() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -179,7 +179,7 @@ func ExampleCertificatesClient_GenerateVerificationCode() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_certverify.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_certverify.json func ExampleCertificatesClient_Verify() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iothub/armiothub/client.go b/sdk/resourcemanager/iothub/armiothub/client.go index 3b69a383173c..fa463ad90bf9 100644 --- a/sdk/resourcemanager/iothub/armiothub/client.go +++ b/sdk/resourcemanager/iothub/armiothub/client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -47,7 +46,7 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // BeginManualFailover - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see https://aka.ms/manualfailover // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - iotHubName - Name of the IoT hub to failover // - resourceGroupName - Name of the resource group containing the IoT hub resource // - failoverInput - Region to failover to. Must be the Azure paired region. Get the value from the secondary location in the @@ -59,7 +58,8 @@ func (client *Client) BeginManualFailover(ctx context.Context, iotHubName string if err != nil { return nil, err } - return runtime.NewPoller[ClientManualFailoverResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientManualFailoverResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientManualFailoverResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -68,20 +68,22 @@ func (client *Client) BeginManualFailover(ctx context.Context, iotHubName string // ManualFailover - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see https://aka.ms/manualfailover // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview func (client *Client) manualFailover(ctx context.Context, iotHubName string, resourceGroupName string, failoverInput FailoverInput, options *ClientBeginManualFailoverOptions) (*http.Response, error) { + var err error req, err := client.manualFailoverCreateRequest(ctx, iotHubName, resourceGroupName, failoverInput, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // manualFailoverCreateRequest creates the ManualFailover request. @@ -104,8 +106,11 @@ func (client *Client) manualFailoverCreateRequest(ctx context.Context, iotHubNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, failoverInput) + if err := runtime.MarshalAsJSON(req, failoverInput); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/iothub/armiothub/client_example_test.go b/sdk/resourcemanager/iothub/armiothub/client_example_test.go index d60ec110115b..a28f3648cb62 100644 --- a/sdk/resourcemanager/iothub/armiothub/client_example_test.go +++ b/sdk/resourcemanager/iothub/armiothub/client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/IotHub_ManualFailover.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/IotHub_ManualFailover.json func ExampleClient_BeginManualFailover() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iothub/armiothub/client_factory.go b/sdk/resourcemanager/iothub/armiothub/client_factory.go index 93ee51970459..37aba63f64b6 100644 --- a/sdk/resourcemanager/iothub/armiothub/client_factory.go +++ b/sdk/resourcemanager/iothub/armiothub/client_factory.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -38,37 +37,37 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { + subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewResourceClient() *ResourceClient { - subClient, _ := NewResourceClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewClient() *Client { + subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewResourceProviderCommonClient() *ResourceProviderCommonClient { - subClient, _ := NewResourceProviderCommonClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { - subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewClient() *Client { - subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewResourceClient() *ResourceClient { + subClient, _ := NewResourceClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewResourceProviderCommonClient() *ResourceProviderCommonClient { + subClient, _ := NewResourceProviderCommonClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/sdk/resourcemanager/iothub/armiothub/constants.go b/sdk/resourcemanager/iothub/armiothub/constants.go index 516ac605b87c..0dd5ef43f7cd 100644 --- a/sdk/resourcemanager/iothub/armiothub/constants.go +++ b/sdk/resourcemanager/iothub/armiothub/constants.go @@ -3,56 +3,55 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub const ( moduleName = "armiothub" - moduleVersion = "v1.2.0-beta.1" + moduleVersion = "v1.2.0-beta.2" ) // AccessRights - The permissions assigned to the shared access policy. type AccessRights string const ( - AccessRightsRegistryRead AccessRights = "RegistryRead" - AccessRightsRegistryWrite AccessRights = "RegistryWrite" - AccessRightsServiceConnect AccessRights = "ServiceConnect" AccessRightsDeviceConnect AccessRights = "DeviceConnect" - AccessRightsRegistryReadRegistryWrite AccessRights = "RegistryRead, RegistryWrite" - AccessRightsRegistryReadServiceConnect AccessRights = "RegistryRead, ServiceConnect" + AccessRightsRegistryRead AccessRights = "RegistryRead" AccessRightsRegistryReadDeviceConnect AccessRights = "RegistryRead, DeviceConnect" - AccessRightsRegistryWriteServiceConnect AccessRights = "RegistryWrite, ServiceConnect" - AccessRightsRegistryWriteDeviceConnect AccessRights = "RegistryWrite, DeviceConnect" - AccessRightsServiceConnectDeviceConnect AccessRights = "ServiceConnect, DeviceConnect" - AccessRightsRegistryReadRegistryWriteServiceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect" + AccessRightsRegistryReadRegistryWrite AccessRights = "RegistryRead, RegistryWrite" AccessRightsRegistryReadRegistryWriteDeviceConnect AccessRights = "RegistryRead, RegistryWrite, DeviceConnect" + AccessRightsRegistryReadRegistryWriteServiceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect" + AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" + AccessRightsRegistryReadServiceConnect AccessRights = "RegistryRead, ServiceConnect" AccessRightsRegistryReadServiceConnectDeviceConnect AccessRights = "RegistryRead, ServiceConnect, DeviceConnect" + AccessRightsRegistryWrite AccessRights = "RegistryWrite" + AccessRightsRegistryWriteDeviceConnect AccessRights = "RegistryWrite, DeviceConnect" + AccessRightsRegistryWriteServiceConnect AccessRights = "RegistryWrite, ServiceConnect" AccessRightsRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryWrite, ServiceConnect, DeviceConnect" - AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" + AccessRightsServiceConnect AccessRights = "ServiceConnect" + AccessRightsServiceConnectDeviceConnect AccessRights = "ServiceConnect, DeviceConnect" ) // PossibleAccessRightsValues returns the possible values for the AccessRights const type. func PossibleAccessRightsValues() []AccessRights { return []AccessRights{ - AccessRightsRegistryRead, - AccessRightsRegistryWrite, - AccessRightsServiceConnect, AccessRightsDeviceConnect, - AccessRightsRegistryReadRegistryWrite, - AccessRightsRegistryReadServiceConnect, + AccessRightsRegistryRead, AccessRightsRegistryReadDeviceConnect, - AccessRightsRegistryWriteServiceConnect, - AccessRightsRegistryWriteDeviceConnect, - AccessRightsServiceConnectDeviceConnect, - AccessRightsRegistryReadRegistryWriteServiceConnect, + AccessRightsRegistryReadRegistryWrite, AccessRightsRegistryReadRegistryWriteDeviceConnect, + AccessRightsRegistryReadRegistryWriteServiceConnect, + AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect, + AccessRightsRegistryReadServiceConnect, AccessRightsRegistryReadServiceConnectDeviceConnect, + AccessRightsRegistryWrite, + AccessRightsRegistryWriteDeviceConnect, + AccessRightsRegistryWriteServiceConnect, AccessRightsRegistryWriteServiceConnectDeviceConnect, - AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect, + AccessRightsServiceConnect, + AccessRightsServiceConnectDeviceConnect, } } @@ -191,15 +190,15 @@ func PossibleIPVersionValues() []IPVersion { type IotHubNameUnavailabilityReason string const ( - IotHubNameUnavailabilityReasonInvalid IotHubNameUnavailabilityReason = "Invalid" IotHubNameUnavailabilityReasonAlreadyExists IotHubNameUnavailabilityReason = "AlreadyExists" + IotHubNameUnavailabilityReasonInvalid IotHubNameUnavailabilityReason = "Invalid" ) // PossibleIotHubNameUnavailabilityReasonValues returns the possible values for the IotHubNameUnavailabilityReason const type. func PossibleIotHubNameUnavailabilityReasonValues() []IotHubNameUnavailabilityReason { return []IotHubNameUnavailabilityReason{ - IotHubNameUnavailabilityReasonInvalid, IotHubNameUnavailabilityReasonAlreadyExists, + IotHubNameUnavailabilityReasonInvalid, } } @@ -251,17 +250,17 @@ func PossibleIotHubSKUValues() []IotHubSKU { type IotHubSKUTier string const ( + IotHubSKUTierBasic IotHubSKUTier = "Basic" IotHubSKUTierFree IotHubSKUTier = "Free" IotHubSKUTierStandard IotHubSKUTier = "Standard" - IotHubSKUTierBasic IotHubSKUTier = "Basic" ) // PossibleIotHubSKUTierValues returns the possible values for the IotHubSKUTier const type. func PossibleIotHubSKUTierValues() []IotHubSKUTier { return []IotHubSKUTier{ + IotHubSKUTierBasic, IotHubSKUTierFree, IotHubSKUTierStandard, - IotHubSKUTierBasic, } } @@ -287,23 +286,23 @@ func PossibleIotHubScaleTypeValues() []IotHubScaleType { type JobStatus string const ( - JobStatusUnknown JobStatus = "unknown" - JobStatusEnqueued JobStatus = "enqueued" - JobStatusRunning JobStatus = "running" + JobStatusCancelled JobStatus = "cancelled" JobStatusCompleted JobStatus = "completed" + JobStatusEnqueued JobStatus = "enqueued" JobStatusFailed JobStatus = "failed" - JobStatusCancelled JobStatus = "cancelled" + JobStatusRunning JobStatus = "running" + JobStatusUnknown JobStatus = "unknown" ) // PossibleJobStatusValues returns the possible values for the JobStatus const type. func PossibleJobStatusValues() []JobStatus { return []JobStatus{ - JobStatusUnknown, - JobStatusEnqueued, - JobStatusRunning, + JobStatusCancelled, JobStatusCompleted, + JobStatusEnqueued, JobStatusFailed, - JobStatusCancelled, + JobStatusRunning, + JobStatusUnknown, } } @@ -395,19 +394,19 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { type ResourceIdentityType string const ( + ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" - ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - ResourceIdentityTypeNone ResourceIdentityType = "None" + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ) // PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type. func PossibleResourceIdentityTypeValues() []ResourceIdentityType { return []ResourceIdentityType{ + ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, - ResourceIdentityTypeUserAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, - ResourceIdentityTypeNone, + ResourceIdentityTypeUserAssigned, } } diff --git a/sdk/resourcemanager/iothub/armiothub/go.mod b/sdk/resourcemanager/iothub/armiothub/go.mod index 78465280f0bd..820c6fff8797 100644 --- a/sdk/resourcemanager/iothub/armiothub/go.mod +++ b/sdk/resourcemanager/iothub/armiothub/go.mod @@ -3,9 +3,9 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/stretchr/testify v1.7.0 ) @@ -21,9 +21,9 @@ require ( github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/crypto v0.6.0 // 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 + golang.org/x/net v0.8.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/iothub/armiothub/go.sum b/sdk/resourcemanager/iothub/armiothub/go.sum index 6e2c77825a2c..93fdfc2850cd 100644 --- a/sdk/resourcemanager/iothub/armiothub/go.sum +++ b/sdk/resourcemanager/iothub/armiothub/go.sum @@ -1,9 +1,9 @@ -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/azcore v1.6.1 h1:SEy2xmstIphdPwNBUi7uhvjyjhVKISfwjfOJmuy7kg4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= 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/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= @@ -31,13 +31,13 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 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= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/sdk/resourcemanager/iothub/armiothub/models.go b/sdk/resourcemanager/iothub/armiothub/models.go index 0bae03fd62e3..5e968152435b 100644 --- a/sdk/resourcemanager/iothub/armiothub/models.go +++ b/sdk/resourcemanager/iothub/armiothub/models.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -159,44 +158,6 @@ type CertificateWithNonceDescription struct { Type *string } -// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. -type CertificatesClientCreateOrUpdateOptions struct { - // ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate. - IfMatch *string -} - -// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. -type CertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientGenerateVerificationCodeOptions contains the optional parameters for the CertificatesClient.GenerateVerificationCode -// method. -type CertificatesClientGenerateVerificationCodeOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. -type CertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientListByIotHubOptions contains the optional parameters for the CertificatesClient.ListByIotHub method. -type CertificatesClientListByIotHubOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientVerifyOptions contains the optional parameters for the CertificatesClient.Verify method. -type CertificatesClientVerifyOptions struct { - // placeholder for future optional parameters -} - -// ClientBeginManualFailoverOptions contains the optional parameters for the Client.BeginManualFailover method. -type ClientBeginManualFailoverOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // CloudToDeviceProperties - The IoT hub cloud-to-device messaging properties. type CloudToDeviceProperties struct { // The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. @@ -680,11 +641,6 @@ type OperationListResult struct { Value []*Operation } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateEndpoint - The private endpoint property of a private endpoint connection type PrivateEndpoint struct { // READ-ONLY; The resource identifier. @@ -715,48 +671,12 @@ type PrivateEndpointConnectionProperties struct { PrivateEndpoint *PrivateEndpoint } -// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -type PrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdate -// method. -type PrivateEndpointConnectionsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkResources - The available private link resources for an IotHub type PrivateLinkResources struct { // The list of available private link resources for an IotHub Value []*GroupIDInformation } -// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. -type PrivateLinkResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. -type PrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkServiceConnectionState - The current state of a private endpoint connection type PrivateLinkServiceConnectionState struct { // REQUIRED; The description for the current state of a private endpoint connection @@ -918,140 +838,6 @@ type Resource struct { Type *string } -// ResourceClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceClient.BeginCreateOrUpdate method. -type ResourceClientBeginCreateOrUpdateOptions struct { - // ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceClientBeginDeleteOptions contains the optional parameters for the ResourceClient.BeginDelete method. -type ResourceClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceClientBeginUpdateOptions contains the optional parameters for the ResourceClient.BeginUpdate method. -type ResourceClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability -// method. -type ResourceClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientCreateEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.CreateEventHubConsumerGroup -// method. -type ResourceClientCreateEventHubConsumerGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientDeleteEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.DeleteEventHubConsumerGroup -// method. -type ResourceClientDeleteEventHubConsumerGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientExportDevicesOptions contains the optional parameters for the ResourceClient.ExportDevices method. -type ResourceClientExportDevicesOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetEndpointHealthOptions contains the optional parameters for the ResourceClient.NewGetEndpointHealthPager -// method. -type ResourceClientGetEndpointHealthOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.GetEventHubConsumerGroup -// method. -type ResourceClientGetEventHubConsumerGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetJobOptions contains the optional parameters for the ResourceClient.GetJob method. -type ResourceClientGetJobOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetKeysForKeyNameOptions contains the optional parameters for the ResourceClient.GetKeysForKeyName method. -type ResourceClientGetKeysForKeyNameOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetOptions contains the optional parameters for the ResourceClient.Get method. -type ResourceClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetQuotaMetricsOptions contains the optional parameters for the ResourceClient.NewGetQuotaMetricsPager method. -type ResourceClientGetQuotaMetricsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetStatsOptions contains the optional parameters for the ResourceClient.GetStats method. -type ResourceClientGetStatsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientGetValidSKUsOptions contains the optional parameters for the ResourceClient.NewGetValidSKUsPager method. -type ResourceClientGetValidSKUsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientImportDevicesOptions contains the optional parameters for the ResourceClient.ImportDevices method. -type ResourceClientImportDevicesOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListByResourceGroupOptions contains the optional parameters for the ResourceClient.NewListByResourceGroupPager -// method. -type ResourceClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListBySubscriptionOptions contains the optional parameters for the ResourceClient.NewListBySubscriptionPager -// method. -type ResourceClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListEventHubConsumerGroupsOptions contains the optional parameters for the ResourceClient.NewListEventHubConsumerGroupsPager -// method. -type ResourceClientListEventHubConsumerGroupsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListJobsOptions contains the optional parameters for the ResourceClient.NewListJobsPager method. -type ResourceClientListJobsOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientListKeysOptions contains the optional parameters for the ResourceClient.NewListKeysPager method. -type ResourceClientListKeysOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientTestAllRoutesOptions contains the optional parameters for the ResourceClient.TestAllRoutes method. -type ResourceClientTestAllRoutesOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientTestRouteOptions contains the optional parameters for the ResourceClient.TestRoute method. -type ResourceClientTestRouteOptions struct { - // placeholder for future optional parameters -} - -// ResourceProviderCommonClientGetSubscriptionQuotaOptions contains the optional parameters for the ResourceProviderCommonClient.GetSubscriptionQuota -// method. -type ResourceProviderCommonClientGetSubscriptionQuotaOptions struct { - // placeholder for future optional parameters -} - // RootCertificateProperties - This property store root certificate related information type RootCertificateProperties struct { // This property when set to true, hub will use G2 cert; while it's set to false, hub uses Baltimore Cert. @@ -1113,10 +899,10 @@ type RouteProperties struct { Condition *string } -// RoutingCosmosDBSQLAPIProperties - The properties related to a cosmos DB sql collection endpoint. +// RoutingCosmosDBSQLAPIProperties - The properties related to a cosmos DB sql container endpoint. type RoutingCosmosDBSQLAPIProperties struct { - // REQUIRED; The name of the cosmos DB sql collection in the cosmos DB database. - CollectionName *string + // REQUIRED; The name of the cosmos DB sql container in the cosmos DB database. + ContainerName *string // REQUIRED; The name of the cosmos DB database in the cosmos DB account. DatabaseName *string @@ -1129,22 +915,22 @@ type RoutingCosmosDBSQLAPIProperties struct { // events, fileNotifications, $default. Endpoint names must be unique across endpoint types. Name *string - // Method used to authenticate against the cosmos DB sql collection endpoint + // Method used to authenticate against the cosmos DB sql container endpoint AuthenticationType *AuthenticationType - // Id of the cosmos DB sql collection endpoint + // Id of the cosmos DB sql container endpoint ID *string - // Managed identity properties of routing cosmos DB collection endpoint. + // Managed identity properties of routing cosmos DB container endpoint. Identity *ManagedIdentity - // The name of the partition key associated with this cosmos DB sql collection if one exists. This is an optional parameter. + // The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional parameter. PartitionKeyName *string - // The template for generating a synthetic partition key value for use with this cosmos DB sql collection. The template must - // include at least one of the following placeholders: {iothub}, {deviceid}, - // {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are - // arbitrary. This parameter is only required if PartitionKeyName is specified. + // The template for generating a synthetic partition key value for use with this cosmos DB sql container. The template must + // include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, + // {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. + // This parameter is only required if PartitionKeyName is specified. PartitionKeyTemplate *string // The primary key of the cosmos DB account. @@ -1164,8 +950,8 @@ type RoutingCosmosDBSQLAPIProperties struct { // rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs // and only 1 custom endpoint is allowed across all endpoint types for free hubs. type RoutingEndpoints struct { - // The list of Cosmos DB collection endpoints that IoT hub routes messages to, based on the routing rules. - CosmosDBSQLCollections []*RoutingCosmosDBSQLAPIProperties + // The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing rules. + CosmosDBSQLContainers []*RoutingCosmosDBSQLAPIProperties // The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include // the built-in Event Hubs endpoint. diff --git a/sdk/resourcemanager/iothub/armiothub/models_serde.go b/sdk/resourcemanager/iothub/armiothub/models_serde.go index 349b538e0e49..7cd68a73c5b6 100644 --- a/sdk/resourcemanager/iothub/armiothub/models_serde.go +++ b/sdk/resourcemanager/iothub/armiothub/models_serde.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -2346,7 +2345,7 @@ func (r *RouteProperties) UnmarshalJSON(data []byte) error { func (r RoutingCosmosDBSQLAPIProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "authenticationType", r.AuthenticationType) - populate(objectMap, "collectionName", r.CollectionName) + populate(objectMap, "containerName", r.ContainerName) populate(objectMap, "databaseName", r.DatabaseName) populate(objectMap, "endpointUri", r.EndpointURI) populate(objectMap, "id", r.ID) @@ -2373,8 +2372,8 @@ func (r *RoutingCosmosDBSQLAPIProperties) UnmarshalJSON(data []byte) error { case "authenticationType": err = unpopulate(val, "AuthenticationType", &r.AuthenticationType) delete(rawMsg, key) - case "collectionName": - err = unpopulate(val, "CollectionName", &r.CollectionName) + case "containerName": + err = unpopulate(val, "ContainerName", &r.ContainerName) delete(rawMsg, key) case "databaseName": err = unpopulate(val, "DatabaseName", &r.DatabaseName) @@ -2420,7 +2419,7 @@ func (r *RoutingCosmosDBSQLAPIProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RoutingEndpoints. func (r RoutingEndpoints) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cosmosDBSqlCollections", r.CosmosDBSQLCollections) + populate(objectMap, "cosmosDBSqlContainers", r.CosmosDBSQLContainers) populate(objectMap, "eventHubs", r.EventHubs) populate(objectMap, "serviceBusQueues", r.ServiceBusQueues) populate(objectMap, "serviceBusTopics", r.ServiceBusTopics) @@ -2437,8 +2436,8 @@ func (r *RoutingEndpoints) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "cosmosDBSqlCollections": - err = unpopulate(val, "CosmosDBSQLCollections", &r.CosmosDBSQLCollections) + case "cosmosDBSqlContainers": + err = unpopulate(val, "CosmosDBSQLContainers", &r.CosmosDBSQLContainers) delete(rawMsg, key) case "eventHubs": err = unpopulate(val, "EventHubs", &r.EventHubs) diff --git a/sdk/resourcemanager/iothub/armiothub/operations_client.go b/sdk/resourcemanager/iothub/armiothub/operations_client.go index 6039a35b13ba..62501391692d 100644 --- a/sdk/resourcemanager/iothub/armiothub/operations_client.go +++ b/sdk/resourcemanager/iothub/armiothub/operations_client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -40,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available IoT Hub REST API operations. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - 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 +77,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/iothub/armiothub/operations_client_example_test.go b/sdk/resourcemanager/iothub/armiothub/operations_client_example_test.go index 7fc8008cda24..bef10bc4a2b0 100644 --- a/sdk/resourcemanager/iothub/armiothub/operations_client_example_test.go +++ b/sdk/resourcemanager/iothub/armiothub/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_operations.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_operations.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iothub/armiothub/options.go b/sdk/resourcemanager/iothub/armiothub/options.go new file mode 100644 index 000000000000..79a2d9776180 --- /dev/null +++ b/sdk/resourcemanager/iothub/armiothub/options.go @@ -0,0 +1,223 @@ +//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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armiothub + +// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. +type CertificatesClientCreateOrUpdateOptions struct { + // ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate. + IfMatch *string +} + +// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. +type CertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientGenerateVerificationCodeOptions contains the optional parameters for the CertificatesClient.GenerateVerificationCode +// method. +type CertificatesClientGenerateVerificationCodeOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +type CertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientListByIotHubOptions contains the optional parameters for the CertificatesClient.ListByIotHub method. +type CertificatesClientListByIotHubOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientVerifyOptions contains the optional parameters for the CertificatesClient.Verify method. +type CertificatesClientVerifyOptions struct { + // placeholder for future optional parameters +} + +// ClientBeginManualFailoverOptions contains the optional parameters for the Client.BeginManualFailover method. +type ClientBeginManualFailoverOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +type PrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdate +// method. +type PrivateEndpointConnectionsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. +type PrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. +type PrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceClient.BeginCreateOrUpdate method. +type ResourceClientBeginCreateOrUpdateOptions struct { + // ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub. + IfMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ResourceClientBeginDeleteOptions contains the optional parameters for the ResourceClient.BeginDelete method. +type ResourceClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ResourceClientBeginUpdateOptions contains the optional parameters for the ResourceClient.BeginUpdate method. +type ResourceClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability +// method. +type ResourceClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientCreateEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.CreateEventHubConsumerGroup +// method. +type ResourceClientCreateEventHubConsumerGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientDeleteEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.DeleteEventHubConsumerGroup +// method. +type ResourceClientDeleteEventHubConsumerGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientExportDevicesOptions contains the optional parameters for the ResourceClient.ExportDevices method. +type ResourceClientExportDevicesOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetEndpointHealthOptions contains the optional parameters for the ResourceClient.NewGetEndpointHealthPager +// method. +type ResourceClientGetEndpointHealthOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.GetEventHubConsumerGroup +// method. +type ResourceClientGetEventHubConsumerGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetJobOptions contains the optional parameters for the ResourceClient.GetJob method. +type ResourceClientGetJobOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetKeysForKeyNameOptions contains the optional parameters for the ResourceClient.GetKeysForKeyName method. +type ResourceClientGetKeysForKeyNameOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetOptions contains the optional parameters for the ResourceClient.Get method. +type ResourceClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetQuotaMetricsOptions contains the optional parameters for the ResourceClient.NewGetQuotaMetricsPager method. +type ResourceClientGetQuotaMetricsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetStatsOptions contains the optional parameters for the ResourceClient.GetStats method. +type ResourceClientGetStatsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientGetValidSKUsOptions contains the optional parameters for the ResourceClient.NewGetValidSKUsPager method. +type ResourceClientGetValidSKUsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientImportDevicesOptions contains the optional parameters for the ResourceClient.ImportDevices method. +type ResourceClientImportDevicesOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListByResourceGroupOptions contains the optional parameters for the ResourceClient.NewListByResourceGroupPager +// method. +type ResourceClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListBySubscriptionOptions contains the optional parameters for the ResourceClient.NewListBySubscriptionPager +// method. +type ResourceClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListEventHubConsumerGroupsOptions contains the optional parameters for the ResourceClient.NewListEventHubConsumerGroupsPager +// method. +type ResourceClientListEventHubConsumerGroupsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListJobsOptions contains the optional parameters for the ResourceClient.NewListJobsPager method. +type ResourceClientListJobsOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientListKeysOptions contains the optional parameters for the ResourceClient.NewListKeysPager method. +type ResourceClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientTestAllRoutesOptions contains the optional parameters for the ResourceClient.TestAllRoutes method. +type ResourceClientTestAllRoutesOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientTestRouteOptions contains the optional parameters for the ResourceClient.TestRoute method. +type ResourceClientTestRouteOptions struct { + // placeholder for future optional parameters +} + +// ResourceProviderCommonClientGetSubscriptionQuotaOptions contains the optional parameters for the ResourceProviderCommonClient.GetSubscriptionQuota +// method. +type ResourceProviderCommonClientGetSubscriptionQuotaOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client.go b/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client.go index efcd3c6e8385..7e886e0a02e1 100644 --- a/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client.go +++ b/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -47,7 +46,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginDelete - Delete private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - privateEndpointConnectionName - The name of the private endpoint connection @@ -59,7 +58,8 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -68,20 +68,22 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Delete private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -108,7 +110,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -117,25 +119,28 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Get private endpoint connection properties // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - privateEndpointConnectionName - The name of the private endpoint connection // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -162,7 +167,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,24 +185,27 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // List - List private endpoint connection properties // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List // method. func (client *PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientListOptions) (PrivateEndpointConnectionsClientListResponse, error) { + var err error req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return PrivateEndpointConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -220,7 +228,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,7 +246,7 @@ func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Re // BeginUpdate - Update the status of a private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - privateEndpointConnectionName - The name of the private endpoint connection @@ -251,7 +259,8 @@ func (client *PrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[PrivateEndpointConnectionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -260,20 +269,22 @@ func (client *PrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, // Update - Update the status of a private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview func (client *PrivateEndpointConnectionsClient) update(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, privateEndpointConnection, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -300,8 +311,11 @@ func (client *PrivateEndpointConnectionsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointConnection) + if err := runtime.MarshalAsJSON(req, privateEndpointConnection); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client_example_test.go index 702faa368ba2..f70504c9e840 100644 --- a/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/iothub/armiothub/privateendpointconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listprivateendpointconnections.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listprivateendpointconnections.json func ExamplePrivateEndpointConnectionsClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -54,7 +54,7 @@ func ExamplePrivateEndpointConnectionsClient_List() { // }} } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getprivateendpointconnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getprivateendpointconnection.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -89,7 +89,7 @@ func ExamplePrivateEndpointConnectionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_updateprivateendpointconnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_updateprivateendpointconnection.json func ExamplePrivateEndpointConnectionsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -135,7 +135,7 @@ func ExamplePrivateEndpointConnectionsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_deleteprivateendpointconnection.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_deleteprivateendpointconnection.json func ExamplePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client.go b/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client.go index 85400964155a..0484f632177b 100644 --- a/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client.go +++ b/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -47,25 +46,28 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Get the specified private link resource for the given IotHub // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - groupID - The name of the private link resource // - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get // method. func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, groupID string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, groupID, options) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -92,7 +94,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,24 +112,27 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // List - List private link resources for the given IotHub // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List // method. func (client *PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateLinkResourcesClientListOptions) (PrivateLinkResourcesClientListResponse, error) { + var err error req, err := client.listCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return PrivateLinkResourcesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -150,7 +155,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client_example_test.go b/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client_example_test.go index af89a22e54a1..d89b3ace01ce 100644 --- a/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/iothub/armiothub/privatelinkresources_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listprivatelinkresources.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listprivatelinkresources.json func ExamplePrivateLinkResourcesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -52,7 +52,7 @@ func ExamplePrivateLinkResourcesClient_List() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getprivatelinkresources.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getprivatelinkresources.json func ExamplePrivateLinkResourcesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iothub/armiothub/resource_client.go b/sdk/resourcemanager/iothub/armiothub/resource_client.go index d220839a267c..857ed4ed56ba 100644 --- a/sdk/resourcemanager/iothub/armiothub/resource_client.go +++ b/sdk/resourcemanager/iothub/armiothub/resource_client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -47,23 +46,26 @@ func NewResourceClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Check if an IoT hub name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - operationInputs - Set the name parameter in the OperationInputs structure to the name of the IoT hub to check. // - options - ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability // method. func (client *ResourceClient) CheckNameAvailability(ctx context.Context, operationInputs OperationInputs, options *ResourceClientCheckNameAvailabilityOptions) (ResourceClientCheckNameAvailabilityResponse, error) { + var err error req, err := client.checkNameAvailabilityCreateRequest(ctx, operationInputs, options) if err != nil { return ResourceClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -78,10 +80,13 @@ func (client *ResourceClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, operationInputs) + if err := runtime.MarshalAsJSON(req, operationInputs); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -96,7 +101,7 @@ func (client *ResourceClient) checkNameAvailabilityHandleResponse(resp *http.Res // CreateEventHubConsumerGroup - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub. @@ -105,18 +110,21 @@ func (client *ResourceClient) checkNameAvailabilityHandleResponse(resp *http.Res // - options - ResourceClientCreateEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.CreateEventHubConsumerGroup // method. func (client *ResourceClient) CreateEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, consumerGroupBody EventHubConsumerGroupBodyDescription, options *ResourceClientCreateEventHubConsumerGroupOptions) (ResourceClientCreateEventHubConsumerGroupResponse, error) { + var err error req, err := client.createEventHubConsumerGroupCreateRequest(ctx, resourceGroupName, resourceName, eventHubEndpointName, name, consumerGroupBody, options) if err != nil { return ResourceClientCreateEventHubConsumerGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientCreateEventHubConsumerGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientCreateEventHubConsumerGroupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientCreateEventHubConsumerGroupResponse{}, err } - return client.createEventHubConsumerGroupHandleResponse(resp) + resp, err := client.createEventHubConsumerGroupHandleResponse(httpResp) + return resp, err } // createEventHubConsumerGroupCreateRequest creates the CreateEventHubConsumerGroup request. @@ -147,10 +155,13 @@ func (client *ResourceClient) createEventHubConsumerGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, consumerGroupBody) + if err := runtime.MarshalAsJSON(req, consumerGroupBody); err != nil { + return nil, err + } + return req, nil } // createEventHubConsumerGroupHandleResponse handles the CreateEventHubConsumerGroup response. @@ -167,7 +178,7 @@ func (client *ResourceClient) createEventHubConsumerGroupHandleResponse(resp *ht // body to update the IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - iotHubDescription - The IoT hub metadata and security metadata. @@ -179,7 +190,8 @@ func (client *ResourceClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[ResourceClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ResourceClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ResourceClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -190,20 +202,22 @@ func (client *ResourceClient) BeginCreateOrUpdate(ctx context.Context, resourceG // body to update the IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview func (client *ResourceClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, iotHubDescription Description, options *ResourceClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, iotHubDescription, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -226,19 +240,22 @@ func (client *ResourceClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, iotHubDescription) + if err := runtime.MarshalAsJSON(req, iotHubDescription); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientBeginDeleteOptions contains the optional parameters for the ResourceClient.BeginDelete method. @@ -248,7 +265,8 @@ func (client *ResourceClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ResourceClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ResourceClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ResourceClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -257,20 +275,22 @@ func (client *ResourceClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview func (client *ResourceClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -293,7 +313,7 @@ func (client *ResourceClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +322,7 @@ func (client *ResourceClient) deleteCreateRequest(ctx context.Context, resourceG // DeleteEventHubConsumerGroup - Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub. @@ -310,16 +330,18 @@ func (client *ResourceClient) deleteCreateRequest(ctx context.Context, resourceG // - options - ResourceClientDeleteEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.DeleteEventHubConsumerGroup // method. func (client *ResourceClient) DeleteEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, options *ResourceClientDeleteEventHubConsumerGroupOptions) (ResourceClientDeleteEventHubConsumerGroupResponse, error) { + var err error req, err := client.deleteEventHubConsumerGroupCreateRequest(ctx, resourceGroupName, resourceName, eventHubEndpointName, name, options) if err != nil { return ResourceClientDeleteEventHubConsumerGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientDeleteEventHubConsumerGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientDeleteEventHubConsumerGroupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientDeleteEventHubConsumerGroupResponse{}, err } return ResourceClientDeleteEventHubConsumerGroupResponse{}, nil } @@ -352,7 +374,7 @@ func (client *ResourceClient) deleteEventHubConsumerGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -363,24 +385,27 @@ func (client *ResourceClient) deleteEventHubConsumerGroupCreateRequest(ctx conte // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - exportDevicesParameters - The parameters that specify the export devices operation. // - options - ResourceClientExportDevicesOptions contains the optional parameters for the ResourceClient.ExportDevices method. func (client *ResourceClient) ExportDevices(ctx context.Context, resourceGroupName string, resourceName string, exportDevicesParameters ExportDevicesRequest, options *ResourceClientExportDevicesOptions) (ResourceClientExportDevicesResponse, error) { + var err error req, err := client.exportDevicesCreateRequest(ctx, resourceGroupName, resourceName, exportDevicesParameters, options) if err != nil { return ResourceClientExportDevicesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientExportDevicesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientExportDevicesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientExportDevicesResponse{}, err } - return client.exportDevicesHandleResponse(resp) + resp, err := client.exportDevicesHandleResponse(httpResp) + return resp, err } // exportDevicesCreateRequest creates the ExportDevices request. @@ -403,10 +428,13 @@ func (client *ResourceClient) exportDevicesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, exportDevicesParameters) + if err := runtime.MarshalAsJSON(req, exportDevicesParameters); err != nil { + return nil, err + } + return req, nil } // exportDevicesHandleResponse handles the ExportDevices response. @@ -421,23 +449,26 @@ func (client *ResourceClient) exportDevicesHandleResponse(resp *http.Response) ( // Get - Get the non-security related metadata of an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientGetOptions contains the optional parameters for the ResourceClient.Get method. func (client *ResourceClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientGetOptions) (ResourceClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return ResourceClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -460,7 +491,7 @@ func (client *ResourceClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -477,7 +508,7 @@ func (client *ResourceClient) getHandleResponse(resp *http.Response) (ResourceCl // NewGetEndpointHealthPager - Get the health for routing endpoints. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - options - ResourceClientGetEndpointHealthOptions contains the optional parameters for the ResourceClient.NewGetEndpointHealthPager // method. func (client *ResourceClient) NewGetEndpointHealthPager(resourceGroupName string, iotHubName string, options *ResourceClientGetEndpointHealthOptions) *runtime.Pager[ResourceClientGetEndpointHealthResponse] { @@ -528,7 +559,7 @@ func (client *ResourceClient) getEndpointHealthCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -546,7 +577,7 @@ func (client *ResourceClient) getEndpointHealthHandleResponse(resp *http.Respons // GetEventHubConsumerGroup - Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub. @@ -554,18 +585,21 @@ func (client *ResourceClient) getEndpointHealthHandleResponse(resp *http.Respons // - options - ResourceClientGetEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.GetEventHubConsumerGroup // method. func (client *ResourceClient) GetEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, options *ResourceClientGetEventHubConsumerGroupOptions) (ResourceClientGetEventHubConsumerGroupResponse, error) { + var err error req, err := client.getEventHubConsumerGroupCreateRequest(ctx, resourceGroupName, resourceName, eventHubEndpointName, name, options) if err != nil { return ResourceClientGetEventHubConsumerGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetEventHubConsumerGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetEventHubConsumerGroupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetEventHubConsumerGroupResponse{}, err } - return client.getEventHubConsumerGroupHandleResponse(resp) + resp, err := client.getEventHubConsumerGroupHandleResponse(httpResp) + return resp, err } // getEventHubConsumerGroupCreateRequest creates the GetEventHubConsumerGroup request. @@ -596,7 +630,7 @@ func (client *ResourceClient) getEventHubConsumerGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -614,24 +648,27 @@ func (client *ResourceClient) getEventHubConsumerGroupHandleResponse(resp *http. // GetJob - Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - jobID - The job identifier. // - options - ResourceClientGetJobOptions contains the optional parameters for the ResourceClient.GetJob method. func (client *ResourceClient) GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string, options *ResourceClientGetJobOptions) (ResourceClientGetJobResponse, error) { + var err error req, err := client.getJobCreateRequest(ctx, resourceGroupName, resourceName, jobID, options) if err != nil { return ResourceClientGetJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetJobResponse{}, err } - return client.getJobHandleResponse(resp) + resp, err := client.getJobHandleResponse(httpResp) + return resp, err } // getJobCreateRequest creates the GetJob request. @@ -658,7 +695,7 @@ func (client *ResourceClient) getJobCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -676,25 +713,28 @@ func (client *ResourceClient) getJobHandleResponse(resp *http.Response) (Resourc // GetKeysForKeyName - Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - keyName - The name of the shared access policy. // - options - ResourceClientGetKeysForKeyNameOptions contains the optional parameters for the ResourceClient.GetKeysForKeyName // method. func (client *ResourceClient) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string, options *ResourceClientGetKeysForKeyNameOptions) (ResourceClientGetKeysForKeyNameResponse, error) { + var err error req, err := client.getKeysForKeyNameCreateRequest(ctx, resourceGroupName, resourceName, keyName, options) if err != nil { return ResourceClientGetKeysForKeyNameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetKeysForKeyNameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetKeysForKeyNameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetKeysForKeyNameResponse{}, err } - return client.getKeysForKeyNameHandleResponse(resp) + resp, err := client.getKeysForKeyNameHandleResponse(httpResp) + return resp, err } // getKeysForKeyNameCreateRequest creates the GetKeysForKeyName request. @@ -721,7 +761,7 @@ func (client *ResourceClient) getKeysForKeyNameCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -738,7 +778,7 @@ func (client *ResourceClient) getKeysForKeyNameHandleResponse(resp *http.Respons // NewGetQuotaMetricsPager - Get the quota metrics for an IoT hub. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientGetQuotaMetricsOptions contains the optional parameters for the ResourceClient.NewGetQuotaMetricsPager @@ -791,7 +831,7 @@ func (client *ResourceClient) getQuotaMetricsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -809,23 +849,26 @@ func (client *ResourceClient) getQuotaMetricsHandleResponse(resp *http.Response) // GetStats - Get the statistics from an IoT hub. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientGetStatsOptions contains the optional parameters for the ResourceClient.GetStats method. func (client *ResourceClient) GetStats(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientGetStatsOptions) (ResourceClientGetStatsResponse, error) { + var err error req, err := client.getStatsCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { return ResourceClientGetStatsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientGetStatsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientGetStatsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientGetStatsResponse{}, err } - return client.getStatsHandleResponse(resp) + resp, err := client.getStatsHandleResponse(httpResp) + return resp, err } // getStatsCreateRequest creates the GetStats request. @@ -848,7 +891,7 @@ func (client *ResourceClient) getStatsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -865,7 +908,7 @@ func (client *ResourceClient) getStatsHandleResponse(resp *http.Response) (Resou // NewGetValidSKUsPager - Get the list of valid SKUs for an IoT hub. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientGetValidSKUsOptions contains the optional parameters for the ResourceClient.NewGetValidSKUsPager @@ -918,7 +961,7 @@ func (client *ResourceClient) getValidSKUsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -938,24 +981,27 @@ func (client *ResourceClient) getValidSKUsHandleResponse(resp *http.Response) (R // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - importDevicesParameters - The parameters that specify the import devices operation. // - options - ResourceClientImportDevicesOptions contains the optional parameters for the ResourceClient.ImportDevices method. func (client *ResourceClient) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters ImportDevicesRequest, options *ResourceClientImportDevicesOptions) (ResourceClientImportDevicesResponse, error) { + var err error req, err := client.importDevicesCreateRequest(ctx, resourceGroupName, resourceName, importDevicesParameters, options) if err != nil { return ResourceClientImportDevicesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientImportDevicesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientImportDevicesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientImportDevicesResponse{}, err } - return client.importDevicesHandleResponse(resp) + resp, err := client.importDevicesHandleResponse(httpResp) + return resp, err } // importDevicesCreateRequest creates the ImportDevices request. @@ -978,10 +1024,13 @@ func (client *ResourceClient) importDevicesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, importDevicesParameters) + if err := runtime.MarshalAsJSON(req, importDevicesParameters); err != nil { + return nil, err + } + return req, nil } // importDevicesHandleResponse handles the ImportDevices response. @@ -995,7 +1044,7 @@ func (client *ResourceClient) importDevicesHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - Get all the IoT hubs in a resource group. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - options - ResourceClientListByResourceGroupOptions contains the optional parameters for the ResourceClient.NewListByResourceGroupPager // method. @@ -1043,7 +1092,7 @@ func (client *ResourceClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1060,7 +1109,7 @@ func (client *ResourceClient) listByResourceGroupHandleResponse(resp *http.Respo // NewListBySubscriptionPager - Get all the IoT hubs in a subscription. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - options - ResourceClientListBySubscriptionOptions contains the optional parameters for the ResourceClient.NewListBySubscriptionPager // method. func (client *ResourceClient) NewListBySubscriptionPager(options *ResourceClientListBySubscriptionOptions) *runtime.Pager[ResourceClientListBySubscriptionResponse] { @@ -1103,7 +1152,7 @@ func (client *ResourceClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1121,7 +1170,7 @@ func (client *ResourceClient) listBySubscriptionHandleResponse(resp *http.Respon // NewListEventHubConsumerGroupsPager - Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint // in an IoT hub. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - eventHubEndpointName - The name of the Event Hub-compatible endpoint. @@ -1179,7 +1228,7 @@ func (client *ResourceClient) listEventHubConsumerGroupsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1196,7 +1245,7 @@ func (client *ResourceClient) listEventHubConsumerGroupsHandleResponse(resp *htt // NewListJobsPager - Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientListJobsOptions contains the optional parameters for the ResourceClient.NewListJobsPager method. @@ -1248,7 +1297,7 @@ func (client *ResourceClient) listJobsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1265,7 +1314,7 @@ func (client *ResourceClient) listJobsHandleResponse(resp *http.Response) (Resou // NewListKeysPager - Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - The name of the resource group that contains the IoT hub. // - resourceName - The name of the IoT hub. // - options - ResourceClientListKeysOptions contains the optional parameters for the ResourceClient.NewListKeysPager method. @@ -1317,7 +1366,7 @@ func (client *ResourceClient) listKeysCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1335,24 +1384,27 @@ func (client *ResourceClient) listKeysHandleResponse(resp *http.Response) (Resou // TestAllRoutes - Test all routes configured in this Iot Hub // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - iotHubName - IotHub to be tested // - resourceGroupName - resource group which Iot Hub belongs to // - input - Input for testing all routes // - options - ResourceClientTestAllRoutesOptions contains the optional parameters for the ResourceClient.TestAllRoutes method. func (client *ResourceClient) TestAllRoutes(ctx context.Context, iotHubName string, resourceGroupName string, input TestAllRoutesInput, options *ResourceClientTestAllRoutesOptions) (ResourceClientTestAllRoutesResponse, error) { + var err error req, err := client.testAllRoutesCreateRequest(ctx, iotHubName, resourceGroupName, input, options) if err != nil { return ResourceClientTestAllRoutesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientTestAllRoutesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientTestAllRoutesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientTestAllRoutesResponse{}, err } - return client.testAllRoutesHandleResponse(resp) + resp, err := client.testAllRoutesHandleResponse(httpResp) + return resp, err } // testAllRoutesCreateRequest creates the TestAllRoutes request. @@ -1375,10 +1427,13 @@ func (client *ResourceClient) testAllRoutesCreateRequest(ctx context.Context, io return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil } // testAllRoutesHandleResponse handles the TestAllRoutes response. @@ -1393,24 +1448,27 @@ func (client *ResourceClient) testAllRoutesHandleResponse(resp *http.Response) ( // TestRoute - Test the new route for this Iot Hub // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - iotHubName - IotHub to be tested // - resourceGroupName - resource group which Iot Hub belongs to // - input - Route that needs to be tested // - options - ResourceClientTestRouteOptions contains the optional parameters for the ResourceClient.TestRoute method. func (client *ResourceClient) TestRoute(ctx context.Context, iotHubName string, resourceGroupName string, input TestRouteInput, options *ResourceClientTestRouteOptions) (ResourceClientTestRouteResponse, error) { + var err error req, err := client.testRouteCreateRequest(ctx, iotHubName, resourceGroupName, input, options) if err != nil { return ResourceClientTestRouteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceClientTestRouteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientTestRouteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientTestRouteResponse{}, err } - return client.testRouteHandleResponse(resp) + resp, err := client.testRouteHandleResponse(httpResp) + return resp, err } // testRouteCreateRequest creates the TestRoute request. @@ -1433,10 +1491,13 @@ func (client *ResourceClient) testRouteCreateRequest(ctx context.Context, iotHub return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil } // testRouteHandleResponse handles the TestRoute response. @@ -1451,7 +1512,7 @@ func (client *ResourceClient) testRouteHandleResponse(resp *http.Response) (Reso // BeginUpdate - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - resourceGroupName - Resource group identifier. // - resourceName - Name of iot hub to update. // - iotHubTags - Updated tag information to set into the iot hub instance. @@ -1462,7 +1523,8 @@ func (client *ResourceClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ResourceClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ResourceClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ResourceClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -1471,20 +1533,22 @@ func (client *ResourceClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview func (client *ResourceClient) update(ctx context.Context, resourceGroupName string, resourceName string, iotHubTags TagsResource, options *ResourceClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, iotHubTags, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -1507,8 +1571,11 @@ func (client *ResourceClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, iotHubTags) + if err := runtime.MarshalAsJSON(req, iotHubTags); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/iothub/armiothub/resource_client_example_test.go b/sdk/resourcemanager/iothub/armiothub/resource_client_example_test.go index 4f4585375150..05eec6ea2d6d 100644 --- a/sdk/resourcemanager/iothub/armiothub/resource_client_example_test.go +++ b/sdk/resourcemanager/iothub/armiothub/resource_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_get.json func ExampleResourceClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -158,7 +158,7 @@ func ExampleResourceClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_createOrUpdate.json func ExampleResourceClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -375,7 +375,7 @@ func ExampleResourceClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_patch.json func ExampleResourceClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -510,7 +510,7 @@ func ExampleResourceClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_delete.json func ExampleResourceClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -639,7 +639,7 @@ func ExampleResourceClient_BeginDelete() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listbysubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listbysubscription.json func ExampleResourceClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -773,7 +773,7 @@ func ExampleResourceClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listbyrg.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listbyrg.json func ExampleResourceClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -907,7 +907,7 @@ func ExampleResourceClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_stats.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_stats.json func ExampleResourceClient_GetStats() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -932,7 +932,7 @@ func ExampleResourceClient_GetStats() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getskus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getskus.json func ExampleResourceClient_NewGetValidSKUsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -997,7 +997,7 @@ func ExampleResourceClient_NewGetValidSKUsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listehgroups.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listehgroups.json func ExampleResourceClient_NewListEventHubConsumerGroupsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1034,7 +1034,7 @@ func ExampleResourceClient_NewListEventHubConsumerGroupsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getconsumergroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getconsumergroup.json func ExampleResourceClient_GetEventHubConsumerGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1063,7 +1063,7 @@ func ExampleResourceClient_GetEventHubConsumerGroup() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_createconsumergroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_createconsumergroup.json func ExampleResourceClient_CreateEventHubConsumerGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1096,7 +1096,7 @@ func ExampleResourceClient_CreateEventHubConsumerGroup() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_deleteconsumergroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_deleteconsumergroup.json func ExampleResourceClient_DeleteEventHubConsumerGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1113,7 +1113,7 @@ func ExampleResourceClient_DeleteEventHubConsumerGroup() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listjobs.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listjobs.json func ExampleResourceClient_NewListJobsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1148,7 +1148,7 @@ func ExampleResourceClient_NewListJobsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getjob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getjob.json func ExampleResourceClient_GetJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1175,7 +1175,7 @@ func ExampleResourceClient_GetJob() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_quotametrics.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_quotametrics.json func ExampleResourceClient_NewGetQuotaMetricsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1213,7 +1213,7 @@ func ExampleResourceClient_NewGetQuotaMetricsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_routingendpointhealth.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_routingendpointhealth.json func ExampleResourceClient_NewGetEndpointHealthPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1259,7 +1259,7 @@ func ExampleResourceClient_NewGetEndpointHealthPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/checkNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/checkNameAvailability.json func ExampleResourceClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1286,7 +1286,7 @@ func ExampleResourceClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_testallroutes.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_testallroutes.json func ExampleResourceClient_TestAllRoutes() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1329,7 +1329,7 @@ func ExampleResourceClient_TestAllRoutes() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_testnewroute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_testnewroute.json func ExampleResourceClient_TestRoute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1386,7 +1386,7 @@ func ExampleResourceClient_TestRoute() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listkeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listkeys.json func ExampleResourceClient_NewListKeysPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1444,7 +1444,7 @@ func ExampleResourceClient_NewListKeysPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getkey.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getkey.json func ExampleResourceClient_GetKeysForKeyName() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1470,7 +1470,7 @@ func ExampleResourceClient_GetKeysForKeyName() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_exportdevices.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_exportdevices.json func ExampleResourceClient_ExportDevices() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1504,7 +1504,7 @@ func ExampleResourceClient_ExportDevices() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_importdevices.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_importdevices.json func ExampleResourceClient_ImportDevices() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client.go b/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client.go index 878891404e55..c62336720b6d 100644 --- a/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client.go +++ b/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub @@ -47,22 +46,25 @@ func NewResourceProviderCommonClient(subscriptionID string, credential azcore.To // GetSubscriptionQuota - Get the number of free and paid iot hubs in the subscription // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-15-preview +// Generated from API version 2023-06-30-preview // - options - ResourceProviderCommonClientGetSubscriptionQuotaOptions contains the optional parameters for the ResourceProviderCommonClient.GetSubscriptionQuota // method. func (client *ResourceProviderCommonClient) GetSubscriptionQuota(ctx context.Context, options *ResourceProviderCommonClientGetSubscriptionQuotaOptions) (ResourceProviderCommonClientGetSubscriptionQuotaResponse, error) { + var err error req, err := client.getSubscriptionQuotaCreateRequest(ctx, options) if err != nil { return ResourceProviderCommonClientGetSubscriptionQuotaResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceProviderCommonClientGetSubscriptionQuotaResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceProviderCommonClientGetSubscriptionQuotaResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceProviderCommonClientGetSubscriptionQuotaResponse{}, err } - return client.getSubscriptionQuotaHandleResponse(resp) + resp, err := client.getSubscriptionQuotaHandleResponse(httpResp) + return resp, err } // getSubscriptionQuotaCreateRequest creates the GetSubscriptionQuota request. @@ -77,7 +79,7 @@ func (client *ResourceProviderCommonClient) getSubscriptionQuotaCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-15-preview") + reqQP.Set("api-version", "2023-06-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client_example_test.go b/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client_example_test.go index fac287f21d38..00d53e3ecce8 100644 --- a/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client_example_test.go +++ b/sdk/resourcemanager/iothub/armiothub/resourceprovidercommon_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_usages.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_usages.json func ExampleResourceProviderCommonClient_GetSubscriptionQuota() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iothub/armiothub/response_types.go b/sdk/resourcemanager/iothub/armiothub/response_types.go index cfb1efafc2b6..9fe3d9232564 100644 --- a/sdk/resourcemanager/iothub/armiothub/response_types.go +++ b/sdk/resourcemanager/iothub/armiothub/response_types.go @@ -3,14 +3,14 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub // CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. type CertificatesClientCreateOrUpdateResponse struct { + // The X509 Certificate. CertificateDescription } @@ -21,21 +21,25 @@ type CertificatesClientDeleteResponse struct { // CertificatesClientGenerateVerificationCodeResponse contains the response from method CertificatesClient.GenerateVerificationCode. type CertificatesClientGenerateVerificationCodeResponse struct { + // The X509 Certificate. CertificateWithNonceDescription } // CertificatesClientGetResponse contains the response from method CertificatesClient.Get. type CertificatesClientGetResponse struct { + // The X509 Certificate. CertificateDescription } // CertificatesClientListByIotHubResponse contains the response from method CertificatesClient.ListByIotHub. type CertificatesClientListByIotHubResponse struct { + // The JSON-serialized array of Certificate objects. CertificateListDescription } // CertificatesClientVerifyResponse contains the response from method CertificatesClient.Verify. type CertificatesClientVerifyResponse struct { + // The X509 Certificate. CertificateDescription } @@ -46,16 +50,20 @@ type ClientManualFailoverResponse struct { // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list IoT Hub operations. It contains a list of operations and a URL link to get the next set of + // results. OperationListResult } // PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. type PrivateEndpointConnectionsClientDeleteResponse struct { + // The private endpoint connection of an IotHub PrivateEndpointConnection } // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // The private endpoint connection of an IotHub PrivateEndpointConnection } @@ -67,31 +75,37 @@ type PrivateEndpointConnectionsClientListResponse struct { // PrivateEndpointConnectionsClientUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginUpdate. type PrivateEndpointConnectionsClientUpdateResponse struct { + // The private endpoint connection of an IotHub PrivateEndpointConnection } // PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. type PrivateLinkResourcesClientGetResponse struct { + // The group information for creating a private endpoint on an IotHub GroupIDInformation } // PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List. type PrivateLinkResourcesClientListResponse struct { + // The available private link resources for an IotHub PrivateLinkResources } // ResourceClientCheckNameAvailabilityResponse contains the response from method ResourceClient.CheckNameAvailability. type ResourceClientCheckNameAvailabilityResponse struct { + // The properties indicating whether a given IoT hub name is available. NameAvailabilityInfo } // ResourceClientCreateEventHubConsumerGroupResponse contains the response from method ResourceClient.CreateEventHubConsumerGroup. type ResourceClientCreateEventHubConsumerGroupResponse struct { + // The properties of the EventHubConsumerGroupInfo object. EventHubConsumerGroupInfo } // ResourceClientCreateOrUpdateResponse contains the response from method ResourceClient.BeginCreateOrUpdate. type ResourceClientCreateOrUpdateResponse struct { + // The description of the IoT hub. Description } @@ -102,100 +116,120 @@ type ResourceClientDeleteEventHubConsumerGroupResponse struct { // ResourceClientDeleteResponse contains the response from method ResourceClient.BeginDelete. type ResourceClientDeleteResponse struct { + // The description of the IoT hub. Description } // ResourceClientExportDevicesResponse contains the response from method ResourceClient.ExportDevices. type ResourceClientExportDevicesResponse struct { + // The properties of the Job Response object. JobResponse } // ResourceClientGetEndpointHealthResponse contains the response from method ResourceClient.NewGetEndpointHealthPager. type ResourceClientGetEndpointHealthResponse struct { + // The JSON-serialized array of EndpointHealthData objects with a next link. EndpointHealthDataListResult } // ResourceClientGetEventHubConsumerGroupResponse contains the response from method ResourceClient.GetEventHubConsumerGroup. type ResourceClientGetEventHubConsumerGroupResponse struct { + // The properties of the EventHubConsumerGroupInfo object. EventHubConsumerGroupInfo } // ResourceClientGetJobResponse contains the response from method ResourceClient.GetJob. type ResourceClientGetJobResponse struct { + // The properties of the Job Response object. JobResponse } // ResourceClientGetKeysForKeyNameResponse contains the response from method ResourceClient.GetKeysForKeyName. type ResourceClientGetKeysForKeyNameResponse struct { + // The properties of an IoT hub shared access policy. SharedAccessSignatureAuthorizationRule } // ResourceClientGetQuotaMetricsResponse contains the response from method ResourceClient.NewGetQuotaMetricsPager. type ResourceClientGetQuotaMetricsResponse struct { + // The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. QuotaMetricInfoListResult } // ResourceClientGetResponse contains the response from method ResourceClient.Get. type ResourceClientGetResponse struct { + // The description of the IoT hub. Description } // ResourceClientGetStatsResponse contains the response from method ResourceClient.GetStats. type ResourceClientGetStatsResponse struct { + // Identity registry statistics. RegistryStatistics } // ResourceClientGetValidSKUsResponse contains the response from method ResourceClient.NewGetValidSKUsPager. type ResourceClientGetValidSKUsResponse struct { + // The JSON-serialized array of IotHubSkuDescription objects with a next link. SKUDescriptionListResult } // ResourceClientImportDevicesResponse contains the response from method ResourceClient.ImportDevices. type ResourceClientImportDevicesResponse struct { + // The properties of the Job Response object. JobResponse } // ResourceClientListByResourceGroupResponse contains the response from method ResourceClient.NewListByResourceGroupPager. type ResourceClientListByResourceGroupResponse struct { + // The JSON-serialized array of IotHubDescription objects with a next link. DescriptionListResult } // ResourceClientListBySubscriptionResponse contains the response from method ResourceClient.NewListBySubscriptionPager. type ResourceClientListBySubscriptionResponse struct { + // The JSON-serialized array of IotHubDescription objects with a next link. DescriptionListResult } // ResourceClientListEventHubConsumerGroupsResponse contains the response from method ResourceClient.NewListEventHubConsumerGroupsPager. type ResourceClientListEventHubConsumerGroupsResponse struct { + // The JSON-serialized array of Event Hub-compatible consumer group names with a next link. EventHubConsumerGroupsListResult } // ResourceClientListJobsResponse contains the response from method ResourceClient.NewListJobsPager. type ResourceClientListJobsResponse struct { + // The JSON-serialized array of JobResponse objects with a next link. JobResponseListResult } // ResourceClientListKeysResponse contains the response from method ResourceClient.NewListKeysPager. type ResourceClientListKeysResponse struct { + // The list of shared access policies with a next link. SharedAccessSignatureAuthorizationRuleListResult } // ResourceClientTestAllRoutesResponse contains the response from method ResourceClient.TestAllRoutes. type ResourceClientTestAllRoutesResponse struct { + // Result of testing all routes TestAllRoutesResult } // ResourceClientTestRouteResponse contains the response from method ResourceClient.TestRoute. type ResourceClientTestRouteResponse struct { + // Result of testing one route TestRouteResult } // ResourceClientUpdateResponse contains the response from method ResourceClient.BeginUpdate. type ResourceClientUpdateResponse struct { + // The description of the IoT hub. Description } // ResourceProviderCommonClientGetSubscriptionQuotaResponse contains the response from method ResourceProviderCommonClient.GetSubscriptionQuota. type ResourceProviderCommonClientGetSubscriptionQuotaResponse struct { + // Json-serialized array of User subscription quota response UserSubscriptionQuotaListResult } diff --git a/sdk/resourcemanager/iothub/armiothub/time_rfc1123.go b/sdk/resourcemanager/iothub/armiothub/time_rfc1123.go index a3598527ca0b..c0a41f5d01e1 100644 --- a/sdk/resourcemanager/iothub/armiothub/time_rfc1123.go +++ b/sdk/resourcemanager/iothub/armiothub/time_rfc1123.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub diff --git a/sdk/resourcemanager/iothub/armiothub/time_rfc3339.go b/sdk/resourcemanager/iothub/armiothub/time_rfc3339.go index c32fab2f9216..1948acce7eb6 100644 --- a/sdk/resourcemanager/iothub/armiothub/time_rfc3339.go +++ b/sdk/resourcemanager/iothub/armiothub/time_rfc3339.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armiothub