diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/CHANGELOG.md b/sdk/resourcemanager/connectedcache/armconnectedcache/CHANGELOG.md index 04b0ce1c62da..bf851299e309 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/CHANGELOG.md +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/CHANGELOG.md @@ -1,5 +1,53 @@ # Release History +## 0.2.0 (2025-05-06) +### Breaking Changes + +- Enum `CycleType` has been removed +- Function `NewCacheNodesOperationsClient` has been removed +- Function `*CacheNodesOperationsClient.BeginCreateorUpdate` has been removed +- Function `*CacheNodesOperationsClient.Delete` has been removed +- Function `*CacheNodesOperationsClient.Get` has been removed +- Function `*CacheNodesOperationsClient.NewListByResourceGroupPager` has been removed +- Function `*CacheNodesOperationsClient.NewListBySubscriptionPager` has been removed +- Function `*CacheNodesOperationsClient.Update` has been removed +- Function `*ClientFactory.NewCacheNodesOperationsClient` has been removed +- Function `*ClientFactory.NewEnterpriseCustomerOperationsClient` has been removed +- Function `NewEnterpriseCustomerOperationsClient` has been removed +- Function `*EnterpriseCustomerOperationsClient.BeginCreateOrUpdate` has been removed +- Function `*EnterpriseCustomerOperationsClient.Delete` has been removed +- Function `*EnterpriseCustomerOperationsClient.Get` has been removed +- Function `*EnterpriseCustomerOperationsClient.NewListByResourceGroupPager` has been removed +- Function `*EnterpriseCustomerOperationsClient.NewListBySubscriptionPager` has been removed +- Function `*EnterpriseCustomerOperationsClient.Update` has been removed +- Struct `CacheNodeOldResponse` has been removed +- Struct `CacheNodePreviewResource` has been removed +- Struct `CacheNodePreviewResourceListResult` has been removed +- Struct `EnterprisePreviewResource` has been removed +- Struct `EnterprisePreviewResourceListResult` has been removed +- Field `ProxyURL`, `UpdateCycleType` of struct `AdditionalCacheNodeProperties` has been removed +- Field `PeeringDbLastUpdateTime` of struct `AdditionalCustomerProperties` has been removed + +### Features Added + +- New function `*EnterpriseMccCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory(context.Context, string, string, string, *EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse, error)` +- New function `*EnterpriseMccCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory(context.Context, string, string, string, *EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse, error)` +- New function `*EnterpriseMccCacheNodesOperationsClient.GetCacheNodeTLSCertificateHistory(context.Context, string, string, string, *EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryOptions) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse, error)` +- New function `*IspCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory(context.Context, string, string, string, *IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions) (IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse, error)` +- New function `*IspCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory(context.Context, string, string, string, *IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions) (IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse, error)` +- New struct `MccCacheNodeAutoUpdateHistory` +- New struct `MccCacheNodeAutoUpdateHistoryProperties` +- New struct `MccCacheNodeAutoUpdateInfo` +- New struct `MccCacheNodeIssueHistory` +- New struct `MccCacheNodeIssueHistoryProperties` +- New struct `MccCacheNodeTLSCertificate` +- New struct `MccCacheNodeTLSCertificateHistory` +- New struct `MccCacheNodeTLSCertificateProperties` +- New struct `MccIssue` +- New field `CreationMethod`, `CurrentTLSCertificate`, `IssuesCount`, `IssuesList`, `LastAutoUpdateInfo`, `TLSStatus` in struct `AdditionalCacheNodeProperties` +- New field `DriveConfiguration`, `ProxyURLConfiguration`, `TLSCertificateProvisioningKey` in struct `CacheNodeInstallProperties` + + ## 0.1.0 (2024-11-20) ### Other Changes diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/README.md b/sdk/resourcemanager/connectedcache/armconnectedcache/README.md index 51f583d05e6a..83febf71555e 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/README.md +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/README.md @@ -55,7 +55,7 @@ clientFactory, err := armconnectedcache.NewClientFactory(, cred A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. ```go -client := clientFactory.NewCacheNodesOperationsClient() +client := clientFactory.NewEnterpriseMccCacheNodesOperationsClient() ``` ## Fakes diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/cachenodesoperations_client.go b/sdk/resourcemanager/connectedcache/armconnectedcache/cachenodesoperations_client.go deleted file mode 100644 index 5152cfdc05ff..000000000000 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/cachenodesoperations_client.go +++ /dev/null @@ -1,426 +0,0 @@ -// 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) Go Code Generator. DO NOT EDIT. - -package armconnectedcache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// CacheNodesOperationsClient contains the methods for the CacheNodesOperations group. -// Don't use this type directly, use NewCacheNodesOperationsClient() instead. -type CacheNodesOperationsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewCacheNodesOperationsClient creates a new instance of CacheNodesOperationsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewCacheNodesOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CacheNodesOperationsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &CacheNodesOperationsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateorUpdate - Creates a cacheNodes with the specified create parameters -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - customerResourceName - Name of the Customer resource -// - resource - Resource create parameters. -// - options - CacheNodesOperationsClientBeginCreateorUpdateOptions contains the optional parameters for the CacheNodesOperationsClient.BeginCreateorUpdate -// method. -func (client *CacheNodesOperationsClient) BeginCreateorUpdate(ctx context.Context, resourceGroupName string, customerResourceName string, resource CacheNodePreviewResource, options *CacheNodesOperationsClientBeginCreateorUpdateOptions) (*runtime.Poller[CacheNodesOperationsClientCreateorUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createorUpdate(ctx, resourceGroupName, customerResourceName, resource, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CacheNodesOperationsClientCreateorUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CacheNodesOperationsClientCreateorUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateorUpdate - Creates a cacheNodes with the specified create parameters -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -func (client *CacheNodesOperationsClient) createorUpdate(ctx context.Context, resourceGroupName string, customerResourceName string, resource CacheNodePreviewResource, options *CacheNodesOperationsClientBeginCreateorUpdateOptions) (*http.Response, error) { - var err error - const operationName = "CacheNodesOperationsClient.BeginCreateorUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createorUpdateCreateRequest(ctx, resourceGroupName, customerResourceName, resource, options) - if err != nil { - return nil, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// createorUpdateCreateRequest creates the CreateorUpdate request. -func (client *CacheNodesOperationsClient) createorUpdateCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, resource CacheNodePreviewResource, _ *CacheNodesOperationsClientBeginCreateorUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customerResourceName == "" { - return nil, errors.New("parameter customerResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - req.Raw().Header["Content-Type"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err - } - return req, nil -} - -// Delete - Deletes an existing cache Node -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - customerResourceName - Name of the Customer resource -// - options - CacheNodesOperationsClientDeleteOptions contains the optional parameters for the CacheNodesOperationsClient.Delete -// method. -func (client *CacheNodesOperationsClient) Delete(ctx context.Context, resourceGroupName string, customerResourceName string, options *CacheNodesOperationsClientDeleteOptions) (CacheNodesOperationsClientDeleteResponse, error) { - var err error - const operationName = "CacheNodesOperationsClient.Delete" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteCreateRequest(ctx, resourceGroupName, customerResourceName, options) - if err != nil { - return CacheNodesOperationsClientDeleteResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CacheNodesOperationsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return CacheNodesOperationsClientDeleteResponse{}, err - } - return CacheNodesOperationsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CacheNodesOperationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, _ *CacheNodesOperationsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customerResourceName == "" { - return nil, errors.New("parameter customerResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the properties of a cacheNodes -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - customerResourceName - Name of the Customer resource -// - options - CacheNodesOperationsClientGetOptions contains the optional parameters for the CacheNodesOperationsClient.Get -// method. -func (client *CacheNodesOperationsClient) Get(ctx context.Context, resourceGroupName string, customerResourceName string, options *CacheNodesOperationsClientGetOptions) (CacheNodesOperationsClientGetResponse, error) { - var err error - const operationName = "CacheNodesOperationsClient.Get" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getCreateRequest(ctx, resourceGroupName, customerResourceName, options) - if err != nil { - return CacheNodesOperationsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CacheNodesOperationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return CacheNodesOperationsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *CacheNodesOperationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, _ *CacheNodesOperationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customerResourceName == "" { - return nil, errors.New("parameter customerResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *CacheNodesOperationsClient) getHandleResponse(resp *http.Response) (CacheNodesOperationsClientGetResponse, error) { - result := CacheNodesOperationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CacheNodePreviewResource); err != nil { - return CacheNodesOperationsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Retrieves the properties of all ConnectedCache -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - options - CacheNodesOperationsClientListByResourceGroupOptions contains the optional parameters for the CacheNodesOperationsClient.NewListByResourceGroupPager -// method. -func (client *CacheNodesOperationsClient) NewListByResourceGroupPager(resourceGroupName string, options *CacheNodesOperationsClientListByResourceGroupOptions) *runtime.Pager[CacheNodesOperationsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[CacheNodesOperationsClientListByResourceGroupResponse]{ - More: func(page CacheNodesOperationsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CacheNodesOperationsClientListByResourceGroupResponse) (CacheNodesOperationsClientListByResourceGroupResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CacheNodesOperationsClient.NewListByResourceGroupPager") - nextLink := "" - if page != nil { - nextLink = *page.NextLink - } - resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - }, nil) - if err != nil { - return CacheNodesOperationsClientListByResourceGroupResponse{}, err - } - return client.listByResourceGroupHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *CacheNodesOperationsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *CacheNodesOperationsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *CacheNodesOperationsClient) listByResourceGroupHandleResponse(resp *http.Response) (CacheNodesOperationsClientListByResourceGroupResponse, error) { - result := CacheNodesOperationsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CacheNodePreviewResourceListResult); err != nil { - return CacheNodesOperationsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Retrieves the properties of all ConnectedCaches -// -// Generated from API version 2023-05-01-preview -// - options - CacheNodesOperationsClientListBySubscriptionOptions contains the optional parameters for the CacheNodesOperationsClient.NewListBySubscriptionPager -// method. -func (client *CacheNodesOperationsClient) NewListBySubscriptionPager(options *CacheNodesOperationsClientListBySubscriptionOptions) *runtime.Pager[CacheNodesOperationsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[CacheNodesOperationsClientListBySubscriptionResponse]{ - More: func(page CacheNodesOperationsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CacheNodesOperationsClientListBySubscriptionResponse) (CacheNodesOperationsClientListBySubscriptionResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CacheNodesOperationsClient.NewListBySubscriptionPager") - nextLink := "" - if page != nil { - nextLink = *page.NextLink - } - resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { - return client.listBySubscriptionCreateRequest(ctx, options) - }, nil) - if err != nil { - return CacheNodesOperationsClientListBySubscriptionResponse{}, err - } - return client.listBySubscriptionHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *CacheNodesOperationsClient) listBySubscriptionCreateRequest(ctx context.Context, _ *CacheNodesOperationsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/cacheNodes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *CacheNodesOperationsClient) listBySubscriptionHandleResponse(resp *http.Response) (CacheNodesOperationsClientListBySubscriptionResponse, error) { - result := CacheNodesOperationsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CacheNodePreviewResourceListResult); err != nil { - return CacheNodesOperationsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - updates an existing Cache Node -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - customerResourceName - Name of the Customer resource -// - properties - The resource properties to be updated. -// - options - CacheNodesOperationsClientUpdateOptions contains the optional parameters for the CacheNodesOperationsClient.Update -// method. -func (client *CacheNodesOperationsClient) Update(ctx context.Context, resourceGroupName string, customerResourceName string, properties PatchResource, options *CacheNodesOperationsClientUpdateOptions) (CacheNodesOperationsClientUpdateResponse, error) { - var err error - const operationName = "CacheNodesOperationsClient.Update" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.updateCreateRequest(ctx, resourceGroupName, customerResourceName, properties, options) - if err != nil { - return CacheNodesOperationsClientUpdateResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CacheNodesOperationsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return CacheNodesOperationsClientUpdateResponse{}, err - } - resp, err := client.updateHandleResponse(httpResp) - return resp, err -} - -// updateCreateRequest creates the Update request. -func (client *CacheNodesOperationsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, properties PatchResource, _ *CacheNodesOperationsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customerResourceName == "" { - return nil, errors.New("parameter customerResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - req.Raw().Header["Content-Type"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *CacheNodesOperationsClient) updateHandleResponse(resp *http.Response) (CacheNodesOperationsClientUpdateResponse, error) { - result := CacheNodesOperationsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CacheNodePreviewResource); err != nil { - return CacheNodesOperationsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/cachenodesoperations_client_example_test.go b/sdk/resourcemanager/connectedcache/armconnectedcache/cachenodesoperations_client_example_test.go deleted file mode 100644 index cea4ab844d63..000000000000 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/cachenodesoperations_client_example_test.go +++ /dev/null @@ -1,394 +0,0 @@ -// 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) Go Code Generator. DO NOT EDIT. - -package armconnectedcache_test - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedcache/armconnectedcache" - "log" -) - -// Generated from example definition: 2023-05-01-preview/CacheNodesOperations_CreateorUpdate_MaximumSet_Gen.json -func ExampleCacheNodesOperationsClient_BeginCreateorUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCacheNodesOperationsClient().BeginCreateorUpdate(ctx, "rgConnectedCache", "lwrsyhvfpcfrwrim", armconnectedcache.CacheNodePreviewResource{ - Location: to.Ptr("westus"), - Properties: &armconnectedcache.CacheNodeOldResponse{ - StatusCode: to.Ptr("movtzupooyhdqk"), - StatusText: to.Ptr("bjnsrpzaofjntleoesjwammgbi"), - StatusDetails: to.Ptr("quuziibkwtgf"), - Error: &armconnectedcache.ErrorDetail{}, - }, - Tags: map[string]*string{ - "key8256": to.Ptr("oreqiywrjkmate"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armconnectedcache.CacheNodesOperationsClientCreateorUpdateResponse{ - // CacheNodePreviewResource: &armconnectedcache.CacheNodePreviewResource{ - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/cacheNodes/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/cacheNodes"), - // Location: to.Ptr("westus"), - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("movtzupooyhdqk"), - // StatusText: to.Ptr("bjnsrpzaofjntleoesjwammgbi"), - // StatusDetails: to.Ptr("quuziibkwtgf"), - // Status: to.Ptr("vxwmuwtqimapfw"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dzxbdigdjbdbdclvxkxmfutgcbjf"), - // Message: to.Ptr("ifabxmzinicoximnsjkmhdpdgkw"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key8256": to.Ptr("oreqiywrjkmate"), - // }, - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("yqwxlhphavoggkcwg"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-31T00:19:33.838Z"); return t}()), - // LastModifiedBy: to.Ptr("knekx"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-31T00:19:33.838Z"); return t}()), - // }, - // }, - // } -} - -// Generated from example definition: 2023-05-01-preview/CacheNodesOperations_Delete_MaximumSet_Gen.json -func ExampleCacheNodesOperationsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCacheNodesOperationsClient().Delete(ctx, "rgConnectedCache", "otvtvhmovthjwzjzbsqkbnmpcmmeianpqxmmaspvdczmrenquxigrtuarmlcmvsnaclhcbw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armconnectedcache.CacheNodesOperationsClientDeleteResponse{ - // } -} - -// Generated from example definition: 2023-05-01-preview/CacheNodesOperations_Get_MaximumSet_Gen.json -func ExampleCacheNodesOperationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCacheNodesOperationsClient().Get(ctx, "rgConnectedCache", "nqoxkgorhuzbhjwcegymzqbeydzjupemekt", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armconnectedcache.CacheNodesOperationsClientGetResponse{ - // CacheNodePreviewResource: &armconnectedcache.CacheNodePreviewResource{ - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/cacheNodes/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/cacheNodes"), - // Location: to.Ptr("westus"), - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("movtzupooyhdqk"), - // StatusText: to.Ptr("bjnsrpzaofjntleoesjwammgbi"), - // StatusDetails: to.Ptr("quuziibkwtgf"), - // Status: to.Ptr("vxwmuwtqimapfw"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dzxbdigdjbdbdclvxkxmfutgcbjf"), - // Message: to.Ptr("ifabxmzinicoximnsjkmhdpdgkw"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key8256": to.Ptr("oreqiywrjkmate"), - // }, - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("yqwxlhphavoggkcwg"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-31T00:19:33.838Z"); return t}()), - // LastModifiedBy: to.Ptr("knekx"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-31T00:19:33.838Z"); return t}()), - // }, - // }, - // } -} - -// Generated from example definition: 2023-05-01-preview/CacheNodesOperations_ListByResourceGroup_MaximumSet_Gen.json -func ExampleCacheNodesOperationsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCacheNodesOperationsClient().NewListByResourceGroupPager("rgConnectedCache", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page = armconnectedcache.CacheNodesOperationsClientListByResourceGroupResponse{ - // CacheNodePreviewResourceListResult: armconnectedcache.CacheNodePreviewResourceListResult{ - // Value: []*armconnectedcache.CacheNodePreviewResource{ - // { - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/DoTest/providers/Microsoft.ConnectedCache/cacheNodes/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/cacheNodes"), - // Location: to.Ptr("westus"), - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("oldkroffqtkryqffpsi"), - // StatusText: to.Ptr("bs"), - // StatusDetails: to.Ptr("lhwvcz"), - // Status: to.Ptr("jurqdrxfpowdz"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key4711": to.Ptr("zfrkvxymuupxgxrkkmbm"), - // }, - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/DoTest/providers/Microsoft.ConnectedCache/cacheNodes/MccRPTest1"), - // Name: to.Ptr("MCCTPTest1"), - // Type: to.Ptr("Microsoft.ConnectedCache/cacheNodes"), - // Location: to.Ptr("westus"), - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("gtqfmwgkfp"), - // StatusText: to.Ptr("ztbgggsdeihkputd"), - // StatusDetails: to.Ptr("odhpdelbuqrfkiaolqrrzpdaokctz"), - // Status: to.Ptr("mobullauhrxnpyocr"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key8585": to.Ptr("jgoeqypqcf"), - // }, - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // }, - // NextLink: to.Ptr("https://microsoft.com/a"), - // }, - // } - } -} - -// Generated from example definition: 2023-05-01-preview/CacheNodesOperations_ListBySubscription_MaximumSet_Gen.json -func ExampleCacheNodesOperationsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCacheNodesOperationsClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page = armconnectedcache.CacheNodesOperationsClientListBySubscriptionResponse{ - // CacheNodePreviewResourceListResult: armconnectedcache.CacheNodePreviewResourceListResult{ - // Value: []*armconnectedcache.CacheNodePreviewResource{ - // { - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/DoTest/providers/Microsoft.ConnectedCache/cacheNodes/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/cacheNodes"), - // Location: to.Ptr("westus"), - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("oldkroffqtkryqffpsi"), - // StatusText: to.Ptr("bs"), - // StatusDetails: to.Ptr("lhwvcz"), - // Status: to.Ptr("jurqdrxfpowdz"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key4711": to.Ptr("zfrkvxymuupxgxrkkmbm"), - // }, - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/DoTest/providers/Microsoft.ConnectedCache/cacheNodes/MccRPTest1"), - // Name: to.Ptr("MCCTPTest1"), - // Type: to.Ptr("Microsoft.ConnectedCache/cacheNodes"), - // Location: to.Ptr("westus"), - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("gtqfmwgkfp"), - // StatusText: to.Ptr("ztbgggsdeihkputd"), - // StatusDetails: to.Ptr("odhpdelbuqrfkiaolqrrzpdaokctz"), - // Status: to.Ptr("mobullauhrxnpyocr"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key8585": to.Ptr("jgoeqypqcf"), - // }, - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // }, - // NextLink: to.Ptr("https://microsoft.com/a"), - // }, - // } - } -} - -// Generated from example definition: 2023-05-01-preview/CacheNodesOperations_Update_MaximumSet_Gen.json -func ExampleCacheNodesOperationsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCacheNodesOperationsClient().Update(ctx, "rgConnectedCache", "wlrwpdbcv", armconnectedcache.PatchResource{ - Tags: map[string]*string{ - "key5032": to.Ptr("esiuyjbpcwkpqriqiqztxuocv"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armconnectedcache.CacheNodesOperationsClientUpdateResponse{ - // CacheNodePreviewResource: &armconnectedcache.CacheNodePreviewResource{ - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/DoTest/providers/Microsoft.ConnectedCache/cacheNodes/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/cacheNodes"), - // Location: to.Ptr("westus"), - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("movtzupooyhdqk"), - // StatusText: to.Ptr("bjnsrpzaofjntleoesjwammgbi"), - // StatusDetails: to.Ptr("quuziibkwtgf"), - // Status: to.Ptr("vxwmuwtqimapfw"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dzxbdigdjbdbdclvxkxmfutgcbjf"), - // Message: to.Ptr("ifabxmzinicoximnsjkmhdpdgkw"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key8256": to.Ptr("oreqiywrjkmate"), - // }, - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("yqwxlhphavoggkcwg"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-31T00:19:33.838Z"); return t}()), - // LastModifiedBy: to.Ptr("knekx"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-31T00:19:33.838Z"); return t}()), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/client_factory.go b/sdk/resourcemanager/connectedcache/armconnectedcache/client_factory.go index f565046ada09..609e7b2e9084 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/client_factory.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/client_factory.go @@ -32,22 +32,6 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -// NewCacheNodesOperationsClient creates a new instance of CacheNodesOperationsClient. -func (c *ClientFactory) NewCacheNodesOperationsClient() *CacheNodesOperationsClient { - return &CacheNodesOperationsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewEnterpriseCustomerOperationsClient creates a new instance of EnterpriseCustomerOperationsClient. -func (c *ClientFactory) NewEnterpriseCustomerOperationsClient() *EnterpriseCustomerOperationsClient { - return &EnterpriseCustomerOperationsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewEnterpriseMccCacheNodesOperationsClient creates a new instance of EnterpriseMccCacheNodesOperationsClient. func (c *ClientFactory) NewEnterpriseMccCacheNodesOperationsClient() *EnterpriseMccCacheNodesOperationsClient { return &EnterpriseMccCacheNodesOperationsClient{ diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/constants.go b/sdk/resourcemanager/connectedcache/armconnectedcache/constants.go index 9a67cde6c50a..0a4aa9c0c9c1 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/constants.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/constants.go @@ -6,7 +6,7 @@ package armconnectedcache const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedcache/armconnectedcache" - moduleVersion = "v0.1.0" + moduleVersion = "v0.2.0" ) // ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -132,27 +132,6 @@ func PossibleCustomerTransitStateValues() []CustomerTransitState { } } -// CycleType - Update Cycle type -type CycleType string - -const ( - // CycleTypeFast - customer selection of fast / auto update to install mcc on their physical vm - CycleTypeFast CycleType = "Fast" - // CycleTypePreview - customer selection of preview update install mcc on their physical vm - CycleTypePreview CycleType = "Preview" - // CycleTypeSlow - customer selection of slow update to install mcc on their physical vm - CycleTypeSlow CycleType = "Slow" -) - -// PossibleCycleTypeValues returns the possible values for the CycleType const type. -func PossibleCycleTypeValues() []CycleType { - return []CycleType{ - CycleTypeFast, - CycleTypePreview, - CycleTypeSlow, - } -} - // Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" type Origin string diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisecustomeroperations_client.go b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisecustomeroperations_client.go deleted file mode 100644 index 467e33af5a78..000000000000 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisecustomeroperations_client.go +++ /dev/null @@ -1,426 +0,0 @@ -// 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) Go Code Generator. DO NOT EDIT. - -package armconnectedcache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// EnterpriseCustomerOperationsClient contains the methods for the EnterpriseCustomerOperations group. -// Don't use this type directly, use NewEnterpriseCustomerOperationsClient() instead. -type EnterpriseCustomerOperationsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewEnterpriseCustomerOperationsClient creates a new instance of EnterpriseCustomerOperationsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewEnterpriseCustomerOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnterpriseCustomerOperationsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &EnterpriseCustomerOperationsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a cacheNodes with the specified create parameters -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - customerResourceName - Name of the Customer resource -// - resource - Resource create parameters. -// - options - EnterpriseCustomerOperationsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.BeginCreateOrUpdate -// method. -func (client *EnterpriseCustomerOperationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, customerResourceName string, resource EnterprisePreviewResource, options *EnterpriseCustomerOperationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[EnterpriseCustomerOperationsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, customerResourceName, resource, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnterpriseCustomerOperationsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnterpriseCustomerOperationsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Creates a cacheNodes with the specified create parameters -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -func (client *EnterpriseCustomerOperationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, customerResourceName string, resource EnterprisePreviewResource, options *EnterpriseCustomerOperationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "EnterpriseCustomerOperationsClient.BeginCreateOrUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, customerResourceName, resource, options) - if err != nil { - return nil, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *EnterpriseCustomerOperationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, resource EnterprisePreviewResource, _ *EnterpriseCustomerOperationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customerResourceName == "" { - return nil, errors.New("parameter customerResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - req.Raw().Header["Content-Type"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, resource); err != nil { - return nil, err - } - return req, nil -} - -// Delete - Deletes an existing customer Enterprise resource -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - customerResourceName - Name of the Customer resource -// - options - EnterpriseCustomerOperationsClientDeleteOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.Delete -// method. -func (client *EnterpriseCustomerOperationsClient) Delete(ctx context.Context, resourceGroupName string, customerResourceName string, options *EnterpriseCustomerOperationsClientDeleteOptions) (EnterpriseCustomerOperationsClientDeleteResponse, error) { - var err error - const operationName = "EnterpriseCustomerOperationsClient.Delete" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteCreateRequest(ctx, resourceGroupName, customerResourceName, options) - if err != nil { - return EnterpriseCustomerOperationsClientDeleteResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnterpriseCustomerOperationsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return EnterpriseCustomerOperationsClientDeleteResponse{}, err - } - return EnterpriseCustomerOperationsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *EnterpriseCustomerOperationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, _ *EnterpriseCustomerOperationsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customerResourceName == "" { - return nil, errors.New("parameter customerResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the properties of a Enterprise customer -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - customerResourceName - Name of the Customer resource -// - options - EnterpriseCustomerOperationsClientGetOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.Get -// method. -func (client *EnterpriseCustomerOperationsClient) Get(ctx context.Context, resourceGroupName string, customerResourceName string, options *EnterpriseCustomerOperationsClientGetOptions) (EnterpriseCustomerOperationsClientGetResponse, error) { - var err error - const operationName = "EnterpriseCustomerOperationsClient.Get" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getCreateRequest(ctx, resourceGroupName, customerResourceName, options) - if err != nil { - return EnterpriseCustomerOperationsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnterpriseCustomerOperationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return EnterpriseCustomerOperationsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *EnterpriseCustomerOperationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, _ *EnterpriseCustomerOperationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customerResourceName == "" { - return nil, errors.New("parameter customerResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *EnterpriseCustomerOperationsClient) getHandleResponse(resp *http.Response) (EnterpriseCustomerOperationsClientGetResponse, error) { - result := EnterpriseCustomerOperationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnterprisePreviewResource); err != nil { - return EnterpriseCustomerOperationsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Retrieves the properties of all ConnectedCache enterpriseCustomers -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - options - EnterpriseCustomerOperationsClientListByResourceGroupOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.NewListByResourceGroupPager -// method. -func (client *EnterpriseCustomerOperationsClient) NewListByResourceGroupPager(resourceGroupName string, options *EnterpriseCustomerOperationsClientListByResourceGroupOptions) *runtime.Pager[EnterpriseCustomerOperationsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[EnterpriseCustomerOperationsClientListByResourceGroupResponse]{ - More: func(page EnterpriseCustomerOperationsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnterpriseCustomerOperationsClientListByResourceGroupResponse) (EnterpriseCustomerOperationsClientListByResourceGroupResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnterpriseCustomerOperationsClient.NewListByResourceGroupPager") - nextLink := "" - if page != nil { - nextLink = *page.NextLink - } - resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - }, nil) - if err != nil { - return EnterpriseCustomerOperationsClientListByResourceGroupResponse{}, err - } - return client.listByResourceGroupHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *EnterpriseCustomerOperationsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *EnterpriseCustomerOperationsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *EnterpriseCustomerOperationsClient) listByResourceGroupHandleResponse(resp *http.Response) (EnterpriseCustomerOperationsClientListByResourceGroupResponse, error) { - result := EnterpriseCustomerOperationsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnterprisePreviewResourceListResult); err != nil { - return EnterpriseCustomerOperationsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Retrieves the properties of all ConnectedCaches -// -// Generated from API version 2023-05-01-preview -// - options - EnterpriseCustomerOperationsClientListBySubscriptionOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.NewListBySubscriptionPager -// method. -func (client *EnterpriseCustomerOperationsClient) NewListBySubscriptionPager(options *EnterpriseCustomerOperationsClientListBySubscriptionOptions) *runtime.Pager[EnterpriseCustomerOperationsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[EnterpriseCustomerOperationsClientListBySubscriptionResponse]{ - More: func(page EnterpriseCustomerOperationsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnterpriseCustomerOperationsClientListBySubscriptionResponse) (EnterpriseCustomerOperationsClientListBySubscriptionResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnterpriseCustomerOperationsClient.NewListBySubscriptionPager") - nextLink := "" - if page != nil { - nextLink = *page.NextLink - } - resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { - return client.listBySubscriptionCreateRequest(ctx, options) - }, nil) - if err != nil { - return EnterpriseCustomerOperationsClientListBySubscriptionResponse{}, err - } - return client.listBySubscriptionHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *EnterpriseCustomerOperationsClient) listBySubscriptionCreateRequest(ctx context.Context, _ *EnterpriseCustomerOperationsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/enterpriseCustomers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *EnterpriseCustomerOperationsClient) listBySubscriptionHandleResponse(resp *http.Response) (EnterpriseCustomerOperationsClientListBySubscriptionResponse, error) { - result := EnterpriseCustomerOperationsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnterprisePreviewResourceListResult); err != nil { - return EnterpriseCustomerOperationsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - updates an existing enterpriseCustomers -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-05-01-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - customerResourceName - Name of the Customer resource -// - properties - The resource properties to be updated. -// - options - EnterpriseCustomerOperationsClientUpdateOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.Update -// method. -func (client *EnterpriseCustomerOperationsClient) Update(ctx context.Context, resourceGroupName string, customerResourceName string, properties PatchResource, options *EnterpriseCustomerOperationsClientUpdateOptions) (EnterpriseCustomerOperationsClientUpdateResponse, error) { - var err error - const operationName = "EnterpriseCustomerOperationsClient.Update" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.updateCreateRequest(ctx, resourceGroupName, customerResourceName, properties, options) - if err != nil { - return EnterpriseCustomerOperationsClientUpdateResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnterpriseCustomerOperationsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return EnterpriseCustomerOperationsClientUpdateResponse{}, err - } - resp, err := client.updateHandleResponse(httpResp) - return resp, err -} - -// updateCreateRequest creates the Update request. -func (client *EnterpriseCustomerOperationsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, properties PatchResource, _ *EnterpriseCustomerOperationsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customerResourceName == "" { - return nil, errors.New("parameter customerResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - req.Raw().Header["Content-Type"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, properties); err != nil { - return nil, err - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *EnterpriseCustomerOperationsClient) updateHandleResponse(resp *http.Response) (EnterpriseCustomerOperationsClientUpdateResponse, error) { - result := EnterpriseCustomerOperationsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnterprisePreviewResource); err != nil { - return EnterpriseCustomerOperationsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisecustomeroperations_client_example_test.go b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisecustomeroperations_client_example_test.go deleted file mode 100644 index e5afac622ea2..000000000000 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisecustomeroperations_client_example_test.go +++ /dev/null @@ -1,334 +0,0 @@ -// 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) Go Code Generator. DO NOT EDIT. - -package armconnectedcache_test - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedcache/armconnectedcache" - "log" -) - -// Generated from example definition: 2023-05-01-preview/EnterpriseCustomerOperations_CreateOrUpdate_MaximumSet_Gen.json -func ExampleEnterpriseCustomerOperationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnterpriseCustomerOperationsClient().BeginCreateOrUpdate(ctx, "rgConnectedCache", "l", armconnectedcache.EnterprisePreviewResource{ - Properties: &armconnectedcache.CacheNodeOldResponse{ - StatusCode: to.Ptr("oldkroffqtkryqffpsi"), - StatusText: to.Ptr("bs"), - StatusDetails: to.Ptr("lhwvcz"), - Error: &armconnectedcache.ErrorDetail{}, - }, - Tags: map[string]*string{ - "key4215": to.Ptr("zjbszvlzf"), - }, - Location: to.Ptr("zdzhhkjyogrqxwihkifnmeyhwpujbr"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armconnectedcache.EnterpriseCustomerOperationsClientCreateOrUpdateResponse{ - // EnterprisePreviewResource: &armconnectedcache.EnterprisePreviewResource{ - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("oldkroffqtkryqffpsi"), - // StatusText: to.Ptr("bs"), - // StatusDetails: to.Ptr("lhwvcz"), - // Status: to.Ptr("jurqdrxfpowdz"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key4215": to.Ptr("zjbszvlzf"), - // }, - // Location: to.Ptr("westus"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/enterpriseCustomers/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/enterpriseCustomers"), - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // } -} - -// Generated from example definition: 2023-05-01-preview/EnterpriseCustomerOperations_Delete_MaximumSet_Gen.json -func ExampleEnterpriseCustomerOperationsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnterpriseCustomerOperationsClient().Delete(ctx, "rgConnectedCache", "jeubxmhiaihcusgnahblvvckbdcetacvqgwbohlrqucodtlwuyefpejskvamgrdnwgucziodcfpjhqy", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armconnectedcache.EnterpriseCustomerOperationsClientDeleteResponse{ - // } -} - -// Generated from example definition: 2023-05-01-preview/EnterpriseCustomerOperations_Get_MaximumSet_Gen.json -func ExampleEnterpriseCustomerOperationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnterpriseCustomerOperationsClient().Get(ctx, "rgConnectedCache", "MCCTPTest2", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armconnectedcache.EnterpriseCustomerOperationsClientGetResponse{ - // EnterprisePreviewResource: &armconnectedcache.EnterprisePreviewResource{ - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("oldkroffqtkryqffpsi"), - // StatusText: to.Ptr("bs"), - // StatusDetails: to.Ptr("lhwvcz"), - // Status: to.Ptr("jurqdrxfpowdz"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key4215": to.Ptr("zjbszvlzf"), - // }, - // Location: to.Ptr("westus"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/enterpriseCustomers/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/enterpriseCustomers"), - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // } -} - -// Generated from example definition: 2023-05-01-preview/EnterpriseCustomerOperations_ListByResourceGroup_MaximumSet_Gen.json -func ExampleEnterpriseCustomerOperationsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnterpriseCustomerOperationsClient().NewListByResourceGroupPager("rgConnectedCache", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page = armconnectedcache.EnterpriseCustomerOperationsClientListByResourceGroupResponse{ - // EnterprisePreviewResourceListResult: armconnectedcache.EnterprisePreviewResourceListResult{ - // Value: []*armconnectedcache.EnterprisePreviewResource{ - // { - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("oldkroffqtkryqffpsi"), - // StatusText: to.Ptr("bs"), - // StatusDetails: to.Ptr("lhwvcz"), - // Status: to.Ptr("jurqdrxfpowdz"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key4215": to.Ptr("zjbszvlzf"), - // }, - // Location: to.Ptr("westus"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/enterpriseCustomers/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/enterpriseCustomers"), - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // }, - // NextLink: to.Ptr("https://microsoft.com/a"), - // }, - // } - } -} - -// Generated from example definition: 2023-05-01-preview/EnterpriseCustomerOperations_ListBySubscription_MaximumSet_Gen.json -func ExampleEnterpriseCustomerOperationsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnterpriseCustomerOperationsClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page = armconnectedcache.EnterpriseCustomerOperationsClientListBySubscriptionResponse{ - // EnterprisePreviewResourceListResult: armconnectedcache.EnterprisePreviewResourceListResult{ - // Value: []*armconnectedcache.EnterprisePreviewResource{ - // { - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("oldkroffqtkryqffpsi"), - // StatusText: to.Ptr("bs"), - // StatusDetails: to.Ptr("lhwvcz"), - // Status: to.Ptr("jurqdrxfpowdz"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key4215": to.Ptr("zjbszvlzf"), - // }, - // Location: to.Ptr("westus"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/enterpriseCustomers/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/enterpriseCustomers"), - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // }, - // NextLink: to.Ptr("https://microsoft.com/a"), - // }, - // } - } -} - -// Generated from example definition: 2023-05-01-preview/EnterpriseCustomerOperations_Update_MaximumSet_Gen.json -func ExampleEnterpriseCustomerOperationsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnterpriseCustomerOperationsClient().Update(ctx, "rgConnectedCache", "MCCTPTest2", armconnectedcache.PatchResource{ - Tags: map[string]*string{ - "key1653": to.Ptr("nzjczrhclhkndesgy"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armconnectedcache.EnterpriseCustomerOperationsClientUpdateResponse{ - // EnterprisePreviewResource: &armconnectedcache.EnterprisePreviewResource{ - // Properties: &armconnectedcache.CacheNodeOldResponse{ - // ProvisioningState: to.Ptr(armconnectedcache.ProvisioningStateSucceeded), - // StatusCode: to.Ptr("oldkroffqtkryqffpsi"), - // StatusText: to.Ptr("bs"), - // StatusDetails: to.Ptr("lhwvcz"), - // Status: to.Ptr("jurqdrxfpowdz"), - // Error: &armconnectedcache.ErrorDetail{ - // Code: to.Ptr("dkvgvtftpsjsbhlnapvihefxneoggs"), - // Message: to.Ptr("okakgyfnmyob"), - // Details: []*armconnectedcache.ErrorDetail{ - // }, - // }, - // }, - // Tags: map[string]*string{ - // "key4215": to.Ptr("zjbszvlzf"), - // }, - // Location: to.Ptr("westus"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/enterpriseCustomers/MccRPTest2"), - // Name: to.Ptr("MCCTPTest2"), - // Type: to.Ptr("Microsoft.ConnectedCache/enterpriseCustomers"), - // SystemData: &armconnectedcache.SystemData{ - // CreatedBy: to.Ptr("gambtqj"), - // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), - // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccachenodesoperations_client.go b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccachenodesoperations_client.go index ddde3de711f9..c647478caa4f 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccachenodesoperations_client.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccachenodesoperations_client.go @@ -42,7 +42,7 @@ func NewEnterpriseMccCacheNodesOperationsClient(subscriptionID string, credentia // BeginCreateOrUpdate - This api creates an ispCacheNode with the specified create parameters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -69,7 +69,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) BeginCreateOrUpdate(ctx c // CreateOrUpdate - This api creates an ispCacheNode with the specified create parameters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview func (client *EnterpriseMccCacheNodesOperationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, resource EnterpriseMccCacheNodeResource, options *EnterpriseMccCacheNodesOperationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "EnterpriseMccCacheNodesOperationsClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) createOrUpdateCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -128,7 +128,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) createOrUpdateCreateReque // BeginDelete - This api deletes an existing ispCacheNode resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -154,7 +154,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) BeginDelete(ctx context.C // Delete - This api deletes an existing ispCacheNode resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview func (client *EnterpriseMccCacheNodesOperationsClient) deleteOperation(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *EnterpriseMccCacheNodesOperationsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "EnterpriseMccCacheNodesOperationsClient.BeginDelete" @@ -200,7 +200,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) deleteCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,7 +209,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) deleteCreateRequest(ctx c // Get - This api gets ispCacheNode resource information // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -261,7 +261,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -276,10 +276,80 @@ func (client *EnterpriseMccCacheNodesOperationsClient) getHandleResponse(resp *h return result, nil } +// GetCacheNodeAutoUpdateHistory - This api gets ispCacheNode resource auto update histrory information +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-11-30-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - customerResourceName - Name of the Customer resource +// - cacheNodeResourceName - Name of the ConnectedCache resource +// - options - EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions contains the optional parameters +// for the EnterpriseMccCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory method. +func (client *EnterpriseMccCacheNodesOperationsClient) GetCacheNodeAutoUpdateHistory(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse, error) { + var err error + const operationName = "EnterpriseMccCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCacheNodeAutoUpdateHistoryCreateRequest(ctx, resourceGroupName, customerResourceName, cacheNodeResourceName, options) + if err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{}, err + } + resp, err := client.getCacheNodeAutoUpdateHistoryHandleResponse(httpResp) + return resp, err +} + +// getCacheNodeAutoUpdateHistoryCreateRequest creates the GetCacheNodeAutoUpdateHistory request. +func (client *EnterpriseMccCacheNodesOperationsClient) getCacheNodeAutoUpdateHistoryCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, _ *EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeAutoUpdateHistory" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customerResourceName == "" { + return nil, errors.New("parameter customerResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) + if cacheNodeResourceName == "" { + return nil, errors.New("parameter cacheNodeResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheNodeResourceName}", url.PathEscape(cacheNodeResourceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-11-30-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCacheNodeAutoUpdateHistoryHandleResponse handles the GetCacheNodeAutoUpdateHistory response. +func (client *EnterpriseMccCacheNodesOperationsClient) getCacheNodeAutoUpdateHistoryHandleResponse(resp *http.Response) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse, error) { + result := EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MccCacheNodeAutoUpdateHistory); err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{}, err + } + return result, nil +} + // GetCacheNodeInstallDetails - This api gets secrets of the ispCacheNode resource install details // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -331,7 +401,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) getCacheNodeInstallDetail return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,10 +416,150 @@ func (client *EnterpriseMccCacheNodesOperationsClient) getCacheNodeInstallDetail return result, nil } +// GetCacheNodeMccIssueDetailsHistory - This api gets ispCacheNode resource issues details histrory information +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-11-30-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - customerResourceName - Name of the Customer resource +// - cacheNodeResourceName - Name of the ConnectedCache resource +// - options - EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions contains the optional parameters +// for the EnterpriseMccCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory method. +func (client *EnterpriseMccCacheNodesOperationsClient) GetCacheNodeMccIssueDetailsHistory(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse, error) { + var err error + const operationName = "EnterpriseMccCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCacheNodeMccIssueDetailsHistoryCreateRequest(ctx, resourceGroupName, customerResourceName, cacheNodeResourceName, options) + if err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{}, err + } + resp, err := client.getCacheNodeMccIssueDetailsHistoryHandleResponse(httpResp) + return resp, err +} + +// getCacheNodeMccIssueDetailsHistoryCreateRequest creates the GetCacheNodeMccIssueDetailsHistory request. +func (client *EnterpriseMccCacheNodesOperationsClient) getCacheNodeMccIssueDetailsHistoryCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, _ *EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeMccIssueDetailsHistory" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customerResourceName == "" { + return nil, errors.New("parameter customerResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) + if cacheNodeResourceName == "" { + return nil, errors.New("parameter cacheNodeResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheNodeResourceName}", url.PathEscape(cacheNodeResourceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-11-30-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCacheNodeMccIssueDetailsHistoryHandleResponse handles the GetCacheNodeMccIssueDetailsHistory response. +func (client *EnterpriseMccCacheNodesOperationsClient) getCacheNodeMccIssueDetailsHistoryHandleResponse(resp *http.Response) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse, error) { + result := EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MccCacheNodeIssueHistory); err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{}, err + } + return result, nil +} + +// GetCacheNodeTLSCertificateHistory - This api gets ispCacheNode resource tls certificate histrory information +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-11-30-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - customerResourceName - Name of the Customer resource +// - cacheNodeResourceName - Name of the ConnectedCache resource +// - options - EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryOptions contains the optional parameters +// for the EnterpriseMccCacheNodesOperationsClient.GetCacheNodeTLSCertificateHistory method. +func (client *EnterpriseMccCacheNodesOperationsClient) GetCacheNodeTLSCertificateHistory(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryOptions) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse, error) { + var err error + const operationName = "EnterpriseMccCacheNodesOperationsClient.GetCacheNodeTLSCertificateHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCacheNodeTLSCertificateHistoryCreateRequest(ctx, resourceGroupName, customerResourceName, cacheNodeResourceName, options) + if err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse{}, err + } + resp, err := client.getCacheNodeTLSCertificateHistoryHandleResponse(httpResp) + return resp, err +} + +// getCacheNodeTLSCertificateHistoryCreateRequest creates the GetCacheNodeTLSCertificateHistory request. +func (client *EnterpriseMccCacheNodesOperationsClient) getCacheNodeTLSCertificateHistoryCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, _ *EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeTlsCertificateHistory" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customerResourceName == "" { + return nil, errors.New("parameter customerResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) + if cacheNodeResourceName == "" { + return nil, errors.New("parameter cacheNodeResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheNodeResourceName}", url.PathEscape(cacheNodeResourceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-11-30-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCacheNodeTLSCertificateHistoryHandleResponse handles the GetCacheNodeTLSCertificateHistory response. +func (client *EnterpriseMccCacheNodesOperationsClient) getCacheNodeTLSCertificateHistoryHandleResponse(resp *http.Response) (EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse, error) { + result := EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MccCacheNodeTLSCertificateHistory); err != nil { + return EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse{}, err + } + return result, nil +} + // NewListByEnterpriseMccCustomerResourcePager - This api retrieves information about all ispCacheNode resources under the // given subscription and resource group // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - options - EnterpriseMccCacheNodesOperationsClientListByEnterpriseMccCustomerResourceOptions contains the optional parameters @@ -397,7 +607,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) listByEnterpriseMccCustom return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -415,7 +625,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) listByEnterpriseMccCustom // Update - This api updates an existing ispCacheNode resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -468,7 +678,7 @@ func (client *EnterpriseMccCacheNodesOperationsClient) updateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccachenodesoperations_client_example_test.go b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccachenodesoperations_client_example_test.go index e682e439e575..65e4d4e2ae85 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccachenodesoperations_client_example_test.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccachenodesoperations_client_example_test.go @@ -12,7 +12,7 @@ import ( "log" ) -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json func ExampleEnterpriseMccCacheNodesOperationsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -64,7 +64,6 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_BeginCreateOrUpdate() { ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ ProxyURL: to.Ptr("hplstyg"), }, - ProxyURL: to.Ptr("ihkzxlzvpcywtzrogupqozkdud"), OptionalProperty1: to.Ptr("ph"), OptionalProperty2: to.Ptr("soqqgpgcbhb"), OptionalProperty3: to.Ptr("fpnycrbagptsujiotnjfuhlm"), @@ -173,7 +172,6 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_BeginCreateOrUpdate() { // ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ // ProxyURL: to.Ptr("hplstyg"), // }, - // ProxyURL: to.Ptr("ihkzxlzvpcywtzrogupqozkdud"), // OptionalProperty1: to.Ptr("ph"), // OptionalProperty2: to.Ptr("soqqgpgcbhb"), // OptionalProperty3: to.Ptr("fpnycrbagptsujiotnjfuhlm"), @@ -203,7 +201,7 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json func ExampleEnterpriseMccCacheNodesOperationsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -224,7 +222,7 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_BeginDelete() { } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json func ExampleEnterpriseMccCacheNodesOperationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -328,7 +326,6 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_Get() { // ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ // ProxyURL: to.Ptr("hplstyg"), // }, - // ProxyURL: to.Ptr("ihkzxlzvpcywtzrogupqozkdud"), // OptionalProperty1: to.Ptr("ph"), // OptionalProperty2: to.Ptr("soqqgpgcbhb"), // OptionalProperty3: to.Ptr("fpnycrbagptsujiotnjfuhlm"), @@ -358,7 +355,71 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_Get() { // } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json +func ExampleEnterpriseMccCacheNodesOperationsClient_GetCacheNodeAutoUpdateHistory() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewEnterpriseMccCacheNodesOperationsClient().GetCacheNodeAutoUpdateHistory(ctx, "rgConnectedCache", "MccRPTest1", "MCCCachenode1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{ + // MccCacheNodeAutoUpdateHistory: &armconnectedcache.MccCacheNodeAutoUpdateHistory{ + // Properties: &armconnectedcache.MccCacheNodeAutoUpdateHistoryProperties{ + // CustomerID: to.Ptr("fqyulypmqacwoifqnddnkcexbgm"), + // CacheNodeID: to.Ptr("elwtomk"), + // AutoUpdateHistory: []*armconnectedcache.MccCacheNodeAutoUpdateInfo{ + // { + // ImageURIBeforeUpdate: to.Ptr("ne"), + // ImageURITargeted: to.Ptr("zqgjxlqoucwyjf"), + // ImageURITerminal: to.Ptr("akng"), + // AutoUpdateRingType: to.Ptr[int32](16), + // MovedToTerminalStateDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:45.657Z"); return t}()), + // RuleRequestedWeek: to.Ptr[int32](1), + // RuleRequestedDay: to.Ptr[int32](9), + // CreatedDateTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:45.657Z"); return t}()), + // UpdatedRegistryDateTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:45.657Z"); return t}()), + // PlanChangeLogText: to.Ptr("uhfsokrwx"), + // AutoUpdateLastAppliedStatus: to.Ptr[int32](24), + // AutoUpdateLastAppliedStatusText: to.Ptr("cwoy"), + // AutoUpdateLastAppliedStatusDetailedText: to.Ptr("oicfonhqlnrc"), + // PlanID: to.Ptr[int64](17), + // TimeToGoLiveDateTime: to.Ptr("wqhjexgtkqzu"), + // RuleRequestedMinute: to.Ptr("ewoqhdmofybbpf"), + // RuleRequestedHour: to.Ptr("degiarxknlfqfgwz"), + // }, + // }, + // }, + // Tags: map[string]*string{ + // "key5753": to.Ptr("ubrjiectme"), + // }, + // Location: to.Ptr("westus"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/DOTest/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/MccRPTest1/enterpriseMccCacheNodes/MCCCachenode1"), + // Name: to.Ptr("cgy"), + // Type: to.Ptr("kqbnkmxgllkdxfnsogmmdogjtotj"), + // SystemData: &armconnectedcache.SystemData{ + // CreatedBy: to.Ptr("gambtqj"), + // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), + // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // }, + // }, + // } +} + +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json func ExampleEnterpriseMccCacheNodesOperationsClient_GetCacheNodeInstallDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -403,7 +464,114 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_GetCacheNodeInstallDetails() // } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json +func ExampleEnterpriseMccCacheNodesOperationsClient_GetCacheNodeMccIssueDetailsHistory() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewEnterpriseMccCacheNodesOperationsClient().GetCacheNodeMccIssueDetailsHistory(ctx, "rgConnectedCache", "MccRPTest1", "MCCCachenode1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{ + // MccCacheNodeIssueHistory: &armconnectedcache.MccCacheNodeIssueHistory{ + // Properties: &armconnectedcache.MccCacheNodeIssueHistoryProperties{ + // CustomerID: to.Ptr("xqsblxpzcdxwwlzejepoyqrhbrpqgz"), + // CacheNodeID: to.Ptr("enw"), + // MccIssueHistory: []*armconnectedcache.MccIssue{ + // { + // MccIssueType: to.Ptr("uznqingg"), + // ToastString: to.Ptr("tkaajhrpptywiwfjnh"), + // DetailString: to.Ptr("rziwfs"), + // HelpLink: to.Ptr("fd"), + // IssueStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:40.167Z"); return t}()), + // IssueEndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:40.167Z"); return t}()), + // }, + // }, + // }, + // Tags: map[string]*string{ + // "key587": to.Ptr("tcgetdmzjjwtbvghsskfzzrmnrexgx"), + // }, + // Location: to.Ptr("msgrhbbqoannzbfuplaxnl"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/DOTest/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/MccRPTest1/enterpriseMccCacheNodes/MCCCachenode1"), + // Name: to.Ptr("fizavvfblaoosm"), + // Type: to.Ptr("bkkjnjpkvvlnrcfurjsfdspsnoozu"), + // SystemData: &armconnectedcache.SystemData{ + // CreatedBy: to.Ptr("gambtqj"), + // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), + // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // }, + // }, + // } +} + +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeTlsCertificateHistory_MaximumSet_Gen.json +func ExampleEnterpriseMccCacheNodesOperationsClient_GetCacheNodeTLSCertificateHistory() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewEnterpriseMccCacheNodesOperationsClient().GetCacheNodeTLSCertificateHistory(ctx, "rgConnectedCache", "MccRPTest1", "MCCCachenode1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse{ + // MccCacheNodeTLSCertificateHistory: &armconnectedcache.MccCacheNodeTLSCertificateHistory{ + // Properties: &armconnectedcache.MccCacheNodeTLSCertificateProperties{ + // CustomerID: to.Ptr("hzqoghvbmzvdk"), + // CacheNodeID: to.Ptr("bzbrwogbsuat"), + // TLSCertificateHistory: []*armconnectedcache.MccCacheNodeTLSCertificate{ + // { + // ActionRequired: to.Ptr("iwvzhqdwdjhvpqfbwovc"), + // CertificateFileName: to.Ptr("mi"), + // Thumbprint: to.Ptr("bzztaqiu"), + // ExpiryDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:46.556Z"); return t}()), + // NotBeforeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:46.556Z"); return t}()), + // Subject: to.Ptr("vdabg"), + // SubjectAltName: to.Ptr("sbfyvvyylwjamhjubjjsmypwe"), + // }, + // }, + // }, + // Tags: map[string]*string{ + // "key6995": to.Ptr("xuobdofbhsuhqzxpwzlacrxbkcgydn"), + // }, + // Location: to.Ptr("dwqjj"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/DOTest/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/MccRPTest1/enterpriseMccCacheNodes/MCCCachenode1"), + // Name: to.Ptr("zvazurbeqjdbfs"), + // Type: to.Ptr("jxnyhcvyyjvkxddgymvlwvwqtewg"), + // SystemData: &armconnectedcache.SystemData{ + // CreatedBy: to.Ptr("gambtqj"), + // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), + // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // }, + // }, + // } +} + +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json func ExampleEnterpriseMccCacheNodesOperationsClient_NewListByEnterpriseMccCustomerResourcePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -513,7 +681,6 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_NewListByEnterpriseMccCustom // ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ // ProxyURL: to.Ptr("hplstyg"), // }, - // ProxyURL: to.Ptr("ihkzxlzvpcywtzrogupqozkdud"), // OptionalProperty1: to.Ptr("ph"), // OptionalProperty2: to.Ptr("soqqgpgcbhb"), // OptionalProperty3: to.Ptr("fpnycrbagptsujiotnjfuhlm"), @@ -547,7 +714,7 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_NewListByEnterpriseMccCustom } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json func ExampleEnterpriseMccCacheNodesOperationsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -655,7 +822,6 @@ func ExampleEnterpriseMccCacheNodesOperationsClient_Update() { // ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ // ProxyURL: to.Ptr("hplstyg"), // }, - // ProxyURL: to.Ptr("ihkzxlzvpcywtzrogupqozkdud"), // OptionalProperty1: to.Ptr("ph"), // OptionalProperty2: to.Ptr("soqqgpgcbhb"), // OptionalProperty3: to.Ptr("fpnycrbagptsujiotnjfuhlm"), diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccustomers_client.go b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccustomers_client.go index ec10681f124e..e9032a3ff19b 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccustomers_client.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccustomers_client.go @@ -42,7 +42,7 @@ func NewEnterpriseMccCustomersClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - This api creates an enterprise mcc customer with the specified create parameters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - resource - Resource create parameters. @@ -68,7 +68,7 @@ func (client *EnterpriseMccCustomersClient) BeginCreateOrUpdate(ctx context.Cont // CreateOrUpdate - This api creates an enterprise mcc customer with the specified create parameters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview func (client *EnterpriseMccCustomersClient) createOrUpdate(ctx context.Context, resourceGroupName string, customerResourceName string, resource EnterpriseMccCustomerResource, options *EnterpriseMccCustomersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "EnterpriseMccCustomersClient.BeginCreateOrUpdate" @@ -110,7 +110,7 @@ func (client *EnterpriseMccCustomersClient) createOrUpdateCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -123,7 +123,7 @@ func (client *EnterpriseMccCustomersClient) createOrUpdateCreateRequest(ctx cont // BeginDelete - This api deletes an existing enterprise mcc customer resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - options - EnterpriseMccCustomersClientBeginDeleteOptions contains the optional parameters for the EnterpriseMccCustomersClient.BeginDelete @@ -148,7 +148,7 @@ func (client *EnterpriseMccCustomersClient) BeginDelete(ctx context.Context, res // Delete - This api deletes an existing enterprise mcc customer resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview func (client *EnterpriseMccCustomersClient) deleteOperation(ctx context.Context, resourceGroupName string, customerResourceName string, options *EnterpriseMccCustomersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "EnterpriseMccCustomersClient.BeginDelete" @@ -190,7 +190,7 @@ func (client *EnterpriseMccCustomersClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -199,7 +199,7 @@ func (client *EnterpriseMccCustomersClient) deleteCreateRequest(ctx context.Cont // Get - Gets the enterprise mcc customer resource information using this get call // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - options - EnterpriseMccCustomersClientGetOptions contains the optional parameters for the EnterpriseMccCustomersClient.Get @@ -246,7 +246,7 @@ func (client *EnterpriseMccCustomersClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *EnterpriseMccCustomersClient) getHandleResponse(resp *http.Respons // NewListByResourceGroupPager - This api gets the information about all enterprise mcc customer resources under the given // subscription and resource group // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - EnterpriseMccCustomersClientListByResourceGroupOptions contains the optional parameters for the EnterpriseMccCustomersClient.NewListByResourceGroupPager // method. @@ -307,7 +307,7 @@ func (client *EnterpriseMccCustomersClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,7 +324,7 @@ func (client *EnterpriseMccCustomersClient) listByResourceGroupHandleResponse(re // NewListBySubscriptionPager - This api gets information about all enterpriseMccCustomer resources under the given subscription // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - options - EnterpriseMccCustomersClientListBySubscriptionOptions contains the optional parameters for the EnterpriseMccCustomersClient.NewListBySubscriptionPager // method. func (client *EnterpriseMccCustomersClient) NewListBySubscriptionPager(options *EnterpriseMccCustomersClientListBySubscriptionOptions) *runtime.Pager[EnterpriseMccCustomersClientListBySubscriptionResponse] { @@ -362,7 +362,7 @@ func (client *EnterpriseMccCustomersClient) listBySubscriptionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -380,7 +380,7 @@ func (client *EnterpriseMccCustomersClient) listBySubscriptionHandleResponse(res // Update - This api updates an existing enterprise mcc customer resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - properties - The resource properties to be updated. @@ -428,7 +428,7 @@ func (client *EnterpriseMccCustomersClient) updateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccustomers_client_example_test.go b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccustomers_client_example_test.go index ce3c3099eabc..83d02db8c2f9 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccustomers_client_example_test.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/enterprisemcccustomers_client_example_test.go @@ -13,7 +13,7 @@ import ( "time" ) -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json func ExampleEnterpriseMccCustomersClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -44,6 +44,7 @@ func ExampleEnterpriseMccCustomersClient_BeginCreateOrUpdate() { AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ CustomerEmail: to.Ptr("zdjgibsidydyzm"), CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), CustomerEntitlementSKUID: to.Ptr("b"), CustomerEntitlementSKUGUID: to.Ptr("rvzmdpxyflgqetvpwupnfaxsweiiz"), @@ -96,7 +97,6 @@ func ExampleEnterpriseMccCustomersClient_BeginCreateOrUpdate() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -115,6 +115,7 @@ func ExampleEnterpriseMccCustomersClient_BeginCreateOrUpdate() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -157,7 +158,7 @@ func ExampleEnterpriseMccCustomersClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json func ExampleEnterpriseMccCustomersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -178,7 +179,7 @@ func ExampleEnterpriseMccCustomersClient_BeginDelete() { } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json func ExampleEnterpriseMccCustomersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -220,7 +221,6 @@ func ExampleEnterpriseMccCustomersClient_Get() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -239,6 +239,7 @@ func ExampleEnterpriseMccCustomersClient_Get() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -281,7 +282,7 @@ func ExampleEnterpriseMccCustomersClient_Get() { // } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json func ExampleEnterpriseMccCustomersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -329,7 +330,6 @@ func ExampleEnterpriseMccCustomersClient_NewListByResourceGroupPager() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -348,6 +348,7 @@ func ExampleEnterpriseMccCustomersClient_NewListByResourceGroupPager() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -394,7 +395,7 @@ func ExampleEnterpriseMccCustomersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json func ExampleEnterpriseMccCustomersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -442,7 +443,6 @@ func ExampleEnterpriseMccCustomersClient_NewListBySubscriptionPager() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -461,6 +461,7 @@ func ExampleEnterpriseMccCustomersClient_NewListBySubscriptionPager() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -507,7 +508,7 @@ func ExampleEnterpriseMccCustomersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: 2023-05-01-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json func ExampleEnterpriseMccCustomersClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -557,7 +558,6 @@ func ExampleEnterpriseMccCustomersClient_Update() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -576,6 +576,7 @@ func ExampleEnterpriseMccCustomersClient_Update() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/cachenodesoperations_server.go b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/cachenodesoperations_server.go deleted file mode 100644 index d85abb59b355..000000000000 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/cachenodesoperations_server.go +++ /dev/null @@ -1,348 +0,0 @@ -// 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) Go Code Generator. DO NOT EDIT. - -package fake - -import ( - "context" - "errors" - "fmt" - azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedcache/armconnectedcache" - "net/http" - "net/url" - "regexp" -) - -// CacheNodesOperationsServer is a fake server for instances of the armconnectedcache.CacheNodesOperationsClient type. -type CacheNodesOperationsServer struct { - // BeginCreateorUpdate is the fake for method CacheNodesOperationsClient.BeginCreateorUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateorUpdate func(ctx context.Context, resourceGroupName string, customerResourceName string, resource armconnectedcache.CacheNodePreviewResource, options *armconnectedcache.CacheNodesOperationsClientBeginCreateorUpdateOptions) (resp azfake.PollerResponder[armconnectedcache.CacheNodesOperationsClientCreateorUpdateResponse], errResp azfake.ErrorResponder) - - // Delete is the fake for method CacheNodesOperationsClient.Delete - // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent - Delete func(ctx context.Context, resourceGroupName string, customerResourceName string, options *armconnectedcache.CacheNodesOperationsClientDeleteOptions) (resp azfake.Responder[armconnectedcache.CacheNodesOperationsClientDeleteResponse], errResp azfake.ErrorResponder) - - // Get is the fake for method CacheNodesOperationsClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, customerResourceName string, options *armconnectedcache.CacheNodesOperationsClientGetOptions) (resp azfake.Responder[armconnectedcache.CacheNodesOperationsClientGetResponse], errResp azfake.ErrorResponder) - - // NewListByResourceGroupPager is the fake for method CacheNodesOperationsClient.NewListByResourceGroupPager - // HTTP status codes to indicate success: http.StatusOK - NewListByResourceGroupPager func(resourceGroupName string, options *armconnectedcache.CacheNodesOperationsClientListByResourceGroupOptions) (resp azfake.PagerResponder[armconnectedcache.CacheNodesOperationsClientListByResourceGroupResponse]) - - // NewListBySubscriptionPager is the fake for method CacheNodesOperationsClient.NewListBySubscriptionPager - // HTTP status codes to indicate success: http.StatusOK - NewListBySubscriptionPager func(options *armconnectedcache.CacheNodesOperationsClientListBySubscriptionOptions) (resp azfake.PagerResponder[armconnectedcache.CacheNodesOperationsClientListBySubscriptionResponse]) - - // Update is the fake for method CacheNodesOperationsClient.Update - // HTTP status codes to indicate success: http.StatusOK - Update func(ctx context.Context, resourceGroupName string, customerResourceName string, properties armconnectedcache.PatchResource, options *armconnectedcache.CacheNodesOperationsClientUpdateOptions) (resp azfake.Responder[armconnectedcache.CacheNodesOperationsClientUpdateResponse], errResp azfake.ErrorResponder) -} - -// NewCacheNodesOperationsServerTransport creates a new instance of CacheNodesOperationsServerTransport with the provided implementation. -// The returned CacheNodesOperationsServerTransport instance is connected to an instance of armconnectedcache.CacheNodesOperationsClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewCacheNodesOperationsServerTransport(srv *CacheNodesOperationsServer) *CacheNodesOperationsServerTransport { - return &CacheNodesOperationsServerTransport{ - srv: srv, - beginCreateorUpdate: newTracker[azfake.PollerResponder[armconnectedcache.CacheNodesOperationsClientCreateorUpdateResponse]](), - newListByResourceGroupPager: newTracker[azfake.PagerResponder[armconnectedcache.CacheNodesOperationsClientListByResourceGroupResponse]](), - newListBySubscriptionPager: newTracker[azfake.PagerResponder[armconnectedcache.CacheNodesOperationsClientListBySubscriptionResponse]](), - } -} - -// CacheNodesOperationsServerTransport connects instances of armconnectedcache.CacheNodesOperationsClient to instances of CacheNodesOperationsServer. -// Don't use this type directly, use NewCacheNodesOperationsServerTransport instead. -type CacheNodesOperationsServerTransport struct { - srv *CacheNodesOperationsServer - beginCreateorUpdate *tracker[azfake.PollerResponder[armconnectedcache.CacheNodesOperationsClientCreateorUpdateResponse]] - newListByResourceGroupPager *tracker[azfake.PagerResponder[armconnectedcache.CacheNodesOperationsClientListByResourceGroupResponse]] - newListBySubscriptionPager *tracker[azfake.PagerResponder[armconnectedcache.CacheNodesOperationsClientListBySubscriptionResponse]] -} - -// Do implements the policy.Transporter interface for CacheNodesOperationsServerTransport. -func (c *CacheNodesOperationsServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return c.dispatchToMethodFake(req, method) -} - -func (c *CacheNodesOperationsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if cacheNodesOperationsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = cacheNodesOperationsServerTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "CacheNodesOperationsClient.BeginCreateorUpdate": - res.resp, res.err = c.dispatchBeginCreateorUpdate(req) - case "CacheNodesOperationsClient.Delete": - res.resp, res.err = c.dispatchDelete(req) - case "CacheNodesOperationsClient.Get": - res.resp, res.err = c.dispatchGet(req) - case "CacheNodesOperationsClient.NewListByResourceGroupPager": - res.resp, res.err = c.dispatchNewListByResourceGroupPager(req) - case "CacheNodesOperationsClient.NewListBySubscriptionPager": - res.resp, res.err = c.dispatchNewListBySubscriptionPager(req) - case "CacheNodesOperationsClient.Update": - res.resp, res.err = c.dispatchUpdate(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (c *CacheNodesOperationsServerTransport) dispatchBeginCreateorUpdate(req *http.Request) (*http.Response, error) { - if c.srv.BeginCreateorUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCreateorUpdate not implemented")} - } - beginCreateorUpdate := c.beginCreateorUpdate.get(req) - if beginCreateorUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/cacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armconnectedcache.CacheNodePreviewResource](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := c.srv.BeginCreateorUpdate(req.Context(), resourceGroupNameParam, customerResourceNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCreateorUpdate = &respr - c.beginCreateorUpdate.add(req, beginCreateorUpdate) - } - - resp, err := server.PollerResponderNext(beginCreateorUpdate, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { - c.beginCreateorUpdate.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} - } - if !server.PollerResponderMore(beginCreateorUpdate) { - c.beginCreateorUpdate.remove(req) - } - - return resp, nil -} - -func (c *CacheNodesOperationsServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { - if c.srv.Delete == nil { - return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/cacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := c.srv.Delete(req.Context(), resourceGroupNameParam, customerResourceNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} - } - resp, err := server.NewResponse(respContent, req, nil) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *CacheNodesOperationsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if c.srv.Get == nil { - return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/cacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameParam, customerResourceNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CacheNodePreviewResource, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (c *CacheNodesOperationsServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { - if c.srv.NewListByResourceGroupPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} - } - newListByResourceGroupPager := c.newListByResourceGroupPager.get(req) - if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/cacheNodes` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resp := c.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) - newListByResourceGroupPager = &resp - c.newListByResourceGroupPager.add(req, newListByResourceGroupPager) - server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armconnectedcache.CacheNodesOperationsClientListByResourceGroupResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - c.newListByResourceGroupPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListByResourceGroupPager) { - c.newListByResourceGroupPager.remove(req) - } - return resp, nil -} - -func (c *CacheNodesOperationsServerTransport) dispatchNewListBySubscriptionPager(req *http.Request) (*http.Response, error) { - if c.srv.NewListBySubscriptionPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListBySubscriptionPager not implemented")} - } - newListBySubscriptionPager := c.newListBySubscriptionPager.get(req) - if newListBySubscriptionPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/cacheNodes` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resp := c.srv.NewListBySubscriptionPager(nil) - newListBySubscriptionPager = &resp - c.newListBySubscriptionPager.add(req, newListBySubscriptionPager) - server.PagerResponderInjectNextLinks(newListBySubscriptionPager, req, func(page *armconnectedcache.CacheNodesOperationsClientListBySubscriptionResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListBySubscriptionPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - c.newListBySubscriptionPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListBySubscriptionPager) { - c.newListBySubscriptionPager.remove(req) - } - return resp, nil -} - -func (c *CacheNodesOperationsServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { - if c.srv.Update == nil { - return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/cacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armconnectedcache.PatchResource](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := c.srv.Update(req.Context(), resourceGroupNameParam, customerResourceNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CacheNodePreviewResource, req) - if err != nil { - return nil, err - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to CacheNodesOperationsServerTransport -var cacheNodesOperationsServerTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisecustomeroperations_server.go b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisecustomeroperations_server.go deleted file mode 100644 index e7955086b130..000000000000 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisecustomeroperations_server.go +++ /dev/null @@ -1,348 +0,0 @@ -// 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) Go Code Generator. DO NOT EDIT. - -package fake - -import ( - "context" - "errors" - "fmt" - azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedcache/armconnectedcache" - "net/http" - "net/url" - "regexp" -) - -// EnterpriseCustomerOperationsServer is a fake server for instances of the armconnectedcache.EnterpriseCustomerOperationsClient type. -type EnterpriseCustomerOperationsServer struct { - // BeginCreateOrUpdate is the fake for method EnterpriseCustomerOperationsClient.BeginCreateOrUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, customerResourceName string, resource armconnectedcache.EnterprisePreviewResource, options *armconnectedcache.EnterpriseCustomerOperationsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armconnectedcache.EnterpriseCustomerOperationsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) - - // Delete is the fake for method EnterpriseCustomerOperationsClient.Delete - // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent - Delete func(ctx context.Context, resourceGroupName string, customerResourceName string, options *armconnectedcache.EnterpriseCustomerOperationsClientDeleteOptions) (resp azfake.Responder[armconnectedcache.EnterpriseCustomerOperationsClientDeleteResponse], errResp azfake.ErrorResponder) - - // Get is the fake for method EnterpriseCustomerOperationsClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, customerResourceName string, options *armconnectedcache.EnterpriseCustomerOperationsClientGetOptions) (resp azfake.Responder[armconnectedcache.EnterpriseCustomerOperationsClientGetResponse], errResp azfake.ErrorResponder) - - // NewListByResourceGroupPager is the fake for method EnterpriseCustomerOperationsClient.NewListByResourceGroupPager - // HTTP status codes to indicate success: http.StatusOK - NewListByResourceGroupPager func(resourceGroupName string, options *armconnectedcache.EnterpriseCustomerOperationsClientListByResourceGroupOptions) (resp azfake.PagerResponder[armconnectedcache.EnterpriseCustomerOperationsClientListByResourceGroupResponse]) - - // NewListBySubscriptionPager is the fake for method EnterpriseCustomerOperationsClient.NewListBySubscriptionPager - // HTTP status codes to indicate success: http.StatusOK - NewListBySubscriptionPager func(options *armconnectedcache.EnterpriseCustomerOperationsClientListBySubscriptionOptions) (resp azfake.PagerResponder[armconnectedcache.EnterpriseCustomerOperationsClientListBySubscriptionResponse]) - - // Update is the fake for method EnterpriseCustomerOperationsClient.Update - // HTTP status codes to indicate success: http.StatusOK - Update func(ctx context.Context, resourceGroupName string, customerResourceName string, properties armconnectedcache.PatchResource, options *armconnectedcache.EnterpriseCustomerOperationsClientUpdateOptions) (resp azfake.Responder[armconnectedcache.EnterpriseCustomerOperationsClientUpdateResponse], errResp azfake.ErrorResponder) -} - -// NewEnterpriseCustomerOperationsServerTransport creates a new instance of EnterpriseCustomerOperationsServerTransport with the provided implementation. -// The returned EnterpriseCustomerOperationsServerTransport instance is connected to an instance of armconnectedcache.EnterpriseCustomerOperationsClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewEnterpriseCustomerOperationsServerTransport(srv *EnterpriseCustomerOperationsServer) *EnterpriseCustomerOperationsServerTransport { - return &EnterpriseCustomerOperationsServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armconnectedcache.EnterpriseCustomerOperationsClientCreateOrUpdateResponse]](), - newListByResourceGroupPager: newTracker[azfake.PagerResponder[armconnectedcache.EnterpriseCustomerOperationsClientListByResourceGroupResponse]](), - newListBySubscriptionPager: newTracker[azfake.PagerResponder[armconnectedcache.EnterpriseCustomerOperationsClientListBySubscriptionResponse]](), - } -} - -// EnterpriseCustomerOperationsServerTransport connects instances of armconnectedcache.EnterpriseCustomerOperationsClient to instances of EnterpriseCustomerOperationsServer. -// Don't use this type directly, use NewEnterpriseCustomerOperationsServerTransport instead. -type EnterpriseCustomerOperationsServerTransport struct { - srv *EnterpriseCustomerOperationsServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[armconnectedcache.EnterpriseCustomerOperationsClientCreateOrUpdateResponse]] - newListByResourceGroupPager *tracker[azfake.PagerResponder[armconnectedcache.EnterpriseCustomerOperationsClientListByResourceGroupResponse]] - newListBySubscriptionPager *tracker[azfake.PagerResponder[armconnectedcache.EnterpriseCustomerOperationsClientListBySubscriptionResponse]] -} - -// Do implements the policy.Transporter interface for EnterpriseCustomerOperationsServerTransport. -func (e *EnterpriseCustomerOperationsServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return e.dispatchToMethodFake(req, method) -} - -func (e *EnterpriseCustomerOperationsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if enterpriseCustomerOperationsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = enterpriseCustomerOperationsServerTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "EnterpriseCustomerOperationsClient.BeginCreateOrUpdate": - res.resp, res.err = e.dispatchBeginCreateOrUpdate(req) - case "EnterpriseCustomerOperationsClient.Delete": - res.resp, res.err = e.dispatchDelete(req) - case "EnterpriseCustomerOperationsClient.Get": - res.resp, res.err = e.dispatchGet(req) - case "EnterpriseCustomerOperationsClient.NewListByResourceGroupPager": - res.resp, res.err = e.dispatchNewListByResourceGroupPager(req) - case "EnterpriseCustomerOperationsClient.NewListBySubscriptionPager": - res.resp, res.err = e.dispatchNewListBySubscriptionPager(req) - case "EnterpriseCustomerOperationsClient.Update": - res.resp, res.err = e.dispatchUpdate(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (e *EnterpriseCustomerOperationsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { - if e.srv.BeginCreateOrUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} - } - beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) - if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armconnectedcache.EnterprisePreviewResource](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, customerResourceNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCreateOrUpdate = &respr - e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) - } - - resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { - e.beginCreateOrUpdate.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} - } - if !server.PollerResponderMore(beginCreateOrUpdate) { - e.beginCreateOrUpdate.remove(req) - } - - return resp, nil -} - -func (e *EnterpriseCustomerOperationsServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { - if e.srv.Delete == nil { - return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := e.srv.Delete(req.Context(), resourceGroupNameParam, customerResourceNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} - } - resp, err := server.NewResponse(respContent, req, nil) - if err != nil { - return nil, err - } - return resp, nil -} - -func (e *EnterpriseCustomerOperationsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if e.srv.Get == nil { - return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, customerResourceNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).EnterprisePreviewResource, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (e *EnterpriseCustomerOperationsServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { - if e.srv.NewListByResourceGroupPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} - } - newListByResourceGroupPager := e.newListByResourceGroupPager.get(req) - if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseCustomers` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resp := e.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) - newListByResourceGroupPager = &resp - e.newListByResourceGroupPager.add(req, newListByResourceGroupPager) - server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armconnectedcache.EnterpriseCustomerOperationsClientListByResourceGroupResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - e.newListByResourceGroupPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListByResourceGroupPager) { - e.newListByResourceGroupPager.remove(req) - } - return resp, nil -} - -func (e *EnterpriseCustomerOperationsServerTransport) dispatchNewListBySubscriptionPager(req *http.Request) (*http.Response, error) { - if e.srv.NewListBySubscriptionPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListBySubscriptionPager not implemented")} - } - newListBySubscriptionPager := e.newListBySubscriptionPager.get(req) - if newListBySubscriptionPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseCustomers` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resp := e.srv.NewListBySubscriptionPager(nil) - newListBySubscriptionPager = &resp - e.newListBySubscriptionPager.add(req, newListBySubscriptionPager) - server.PagerResponderInjectNextLinks(newListBySubscriptionPager, req, func(page *armconnectedcache.EnterpriseCustomerOperationsClientListBySubscriptionResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListBySubscriptionPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - e.newListBySubscriptionPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListBySubscriptionPager) { - e.newListBySubscriptionPager.remove(req) - } - return resp, nil -} - -func (e *EnterpriseCustomerOperationsServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { - if e.srv.Update == nil { - return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armconnectedcache.PatchResource](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := e.srv.Update(req.Context(), resourceGroupNameParam, customerResourceNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).EnterprisePreviewResource, req) - if err != nil { - return nil, err - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to EnterpriseCustomerOperationsServerTransport -var enterpriseCustomerOperationsServerTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisemcccachenodesoperations_server.go b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisemcccachenodesoperations_server.go index d4e726786935..eccdf5b2c061 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisemcccachenodesoperations_server.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisemcccachenodesoperations_server.go @@ -32,10 +32,22 @@ type EnterpriseMccCacheNodesOperationsServer struct { // HTTP status codes to indicate success: http.StatusOK Get func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetOptions) (resp azfake.Responder[armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetResponse], errResp azfake.ErrorResponder) + // GetCacheNodeAutoUpdateHistory is the fake for method EnterpriseMccCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory + // HTTP status codes to indicate success: http.StatusOK + GetCacheNodeAutoUpdateHistory func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions) (resp azfake.Responder[armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse], errResp azfake.ErrorResponder) + // GetCacheNodeInstallDetails is the fake for method EnterpriseMccCacheNodesOperationsClient.GetCacheNodeInstallDetails // HTTP status codes to indicate success: http.StatusOK GetCacheNodeInstallDetails func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeInstallDetailsOptions) (resp azfake.Responder[armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeInstallDetailsResponse], errResp azfake.ErrorResponder) + // GetCacheNodeMccIssueDetailsHistory is the fake for method EnterpriseMccCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory + // HTTP status codes to indicate success: http.StatusOK + GetCacheNodeMccIssueDetailsHistory func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions) (resp azfake.Responder[armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse], errResp azfake.ErrorResponder) + + // GetCacheNodeTLSCertificateHistory is the fake for method EnterpriseMccCacheNodesOperationsClient.GetCacheNodeTLSCertificateHistory + // HTTP status codes to indicate success: http.StatusOK + GetCacheNodeTLSCertificateHistory func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryOptions) (resp azfake.Responder[armconnectedcache.EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse], errResp azfake.ErrorResponder) + // NewListByEnterpriseMccCustomerResourcePager is the fake for method EnterpriseMccCacheNodesOperationsClient.NewListByEnterpriseMccCustomerResourcePager // HTTP status codes to indicate success: http.StatusOK NewListByEnterpriseMccCustomerResourcePager func(resourceGroupName string, customerResourceName string, options *armconnectedcache.EnterpriseMccCacheNodesOperationsClientListByEnterpriseMccCustomerResourceOptions) (resp azfake.PagerResponder[armconnectedcache.EnterpriseMccCacheNodesOperationsClientListByEnterpriseMccCustomerResourceResponse]) @@ -95,8 +107,14 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchToMethodFake( res.resp, res.err = e.dispatchBeginDelete(req) case "EnterpriseMccCacheNodesOperationsClient.Get": res.resp, res.err = e.dispatchGet(req) + case "EnterpriseMccCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory": + res.resp, res.err = e.dispatchGetCacheNodeAutoUpdateHistory(req) case "EnterpriseMccCacheNodesOperationsClient.GetCacheNodeInstallDetails": res.resp, res.err = e.dispatchGetCacheNodeInstallDetails(req) + case "EnterpriseMccCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory": + res.resp, res.err = e.dispatchGetCacheNodeMccIssueDetailsHistory(req) + case "EnterpriseMccCacheNodesOperationsClient.GetCacheNodeTLSCertificateHistory": + res.resp, res.err = e.dispatchGetCacheNodeTLSCertificateHistory(req) case "EnterpriseMccCacheNodesOperationsClient.NewListByEnterpriseMccCustomerResourcePager": res.resp, res.err = e.dispatchNewListByEnterpriseMccCustomerResourcePager(req) case "EnterpriseMccCacheNodesOperationsClient.Update": @@ -129,7 +147,7 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchBeginCreateOr const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armconnectedcache.EnterpriseMccCacheNodeResource](req) @@ -181,7 +199,7 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchBeginDelete(r const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -227,7 +245,7 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchGet(req *http const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -257,6 +275,43 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchGet(req *http return resp, nil } +func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchGetCacheNodeAutoUpdateHistory(req *http.Request) (*http.Response, error) { + if e.srv.GetCacheNodeAutoUpdateHistory == nil { + return nil, &nonRetriableError{errors.New("fake for method GetCacheNodeAutoUpdateHistory not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getCacheNodeAutoUpdateHistory` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) + if err != nil { + return nil, err + } + cacheNodeResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cacheNodeResourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetCacheNodeAutoUpdateHistory(req.Context(), resourceGroupNameParam, customerResourceNameParam, cacheNodeResourceNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MccCacheNodeAutoUpdateHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchGetCacheNodeInstallDetails(req *http.Request) (*http.Response, error) { if e.srv.GetCacheNodeInstallDetails == nil { return nil, &nonRetriableError{errors.New("fake for method GetCacheNodeInstallDetails not implemented")} @@ -264,7 +319,7 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchGetCacheNodeI const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getCacheNodeInstallDetails` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -294,6 +349,80 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchGetCacheNodeI return resp, nil } +func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchGetCacheNodeMccIssueDetailsHistory(req *http.Request) (*http.Response, error) { + if e.srv.GetCacheNodeMccIssueDetailsHistory == nil { + return nil, &nonRetriableError{errors.New("fake for method GetCacheNodeMccIssueDetailsHistory not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getCacheNodeMccIssueDetailsHistory` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) + if err != nil { + return nil, err + } + cacheNodeResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cacheNodeResourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetCacheNodeMccIssueDetailsHistory(req.Context(), resourceGroupNameParam, customerResourceNameParam, cacheNodeResourceNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MccCacheNodeIssueHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchGetCacheNodeTLSCertificateHistory(req *http.Request) (*http.Response, error) { + if e.srv.GetCacheNodeTLSCertificateHistory == nil { + return nil, &nonRetriableError{errors.New("fake for method GetCacheNodeTLSCertificateHistory not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getCacheNodeTlsCertificateHistory` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) + if err != nil { + return nil, err + } + cacheNodeResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cacheNodeResourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetCacheNodeTLSCertificateHistory(req.Context(), resourceGroupNameParam, customerResourceNameParam, cacheNodeResourceNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MccCacheNodeTLSCertificateHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchNewListByEnterpriseMccCustomerResourcePager(req *http.Request) (*http.Response, error) { if e.srv.NewListByEnterpriseMccCustomerResourcePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByEnterpriseMccCustomerResourcePager not implemented")} @@ -303,7 +432,7 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchNewListByEnte const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -342,7 +471,7 @@ func (e *EnterpriseMccCacheNodesOperationsServerTransport) dispatchUpdate(req *h const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/enterpriseMccCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armconnectedcache.PatchResource](req) diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisemcccustomers_server.go b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisemcccustomers_server.go index ca8d452a5a75..00ac241125b1 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisemcccustomers_server.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/enterprisemcccustomers_server.go @@ -131,7 +131,7 @@ func (e *EnterpriseMccCustomersServerTransport) dispatchBeginCreateOrUpdate(req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armconnectedcache.EnterpriseMccCustomerResource](req) @@ -179,7 +179,7 @@ func (e *EnterpriseMccCustomersServerTransport) dispatchBeginDelete(req *http.Re const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -221,7 +221,7 @@ func (e *EnterpriseMccCustomersServerTransport) dispatchGet(req *http.Request) ( const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -256,7 +256,7 @@ func (e *EnterpriseMccCustomersServerTransport) dispatchNewListByResourceGroupPa const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -293,7 +293,7 @@ func (e *EnterpriseMccCustomersServerTransport) dispatchNewListBySubscriptionPag const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := e.srv.NewListBySubscriptionPager(nil) @@ -324,7 +324,7 @@ func (e *EnterpriseMccCustomersServerTransport) dispatchUpdate(req *http.Request const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/enterpriseMccCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armconnectedcache.PatchResource](req) diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/ispcachenodesoperations_server.go b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/ispcachenodesoperations_server.go index 61d62032ad5d..c2f4bae2e4f2 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/ispcachenodesoperations_server.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/ispcachenodesoperations_server.go @@ -36,10 +36,18 @@ type IspCacheNodesOperationsServer struct { // HTTP status codes to indicate success: http.StatusOK GetBgpCidrs func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.IspCacheNodesOperationsClientGetBgpCidrsOptions) (resp azfake.Responder[armconnectedcache.IspCacheNodesOperationsClientGetBgpCidrsResponse], errResp azfake.ErrorResponder) + // GetCacheNodeAutoUpdateHistory is the fake for method IspCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory + // HTTP status codes to indicate success: http.StatusOK + GetCacheNodeAutoUpdateHistory func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions) (resp azfake.Responder[armconnectedcache.IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse], errResp azfake.ErrorResponder) + // GetCacheNodeInstallDetails is the fake for method IspCacheNodesOperationsClient.GetCacheNodeInstallDetails // HTTP status codes to indicate success: http.StatusOK GetCacheNodeInstallDetails func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.IspCacheNodesOperationsClientGetCacheNodeInstallDetailsOptions) (resp azfake.Responder[armconnectedcache.IspCacheNodesOperationsClientGetCacheNodeInstallDetailsResponse], errResp azfake.ErrorResponder) + // GetCacheNodeMccIssueDetailsHistory is the fake for method IspCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory + // HTTP status codes to indicate success: http.StatusOK + GetCacheNodeMccIssueDetailsHistory func(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *armconnectedcache.IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions) (resp azfake.Responder[armconnectedcache.IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse], errResp azfake.ErrorResponder) + // NewListByIspCustomerResourcePager is the fake for method IspCacheNodesOperationsClient.NewListByIspCustomerResourcePager // HTTP status codes to indicate success: http.StatusOK NewListByIspCustomerResourcePager func(resourceGroupName string, customerResourceName string, options *armconnectedcache.IspCacheNodesOperationsClientListByIspCustomerResourceOptions) (resp azfake.PagerResponder[armconnectedcache.IspCacheNodesOperationsClientListByIspCustomerResourceResponse]) @@ -101,8 +109,12 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchToMethodFake(req *http. res.resp, res.err = i.dispatchGet(req) case "IspCacheNodesOperationsClient.GetBgpCidrs": res.resp, res.err = i.dispatchGetBgpCidrs(req) + case "IspCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory": + res.resp, res.err = i.dispatchGetCacheNodeAutoUpdateHistory(req) case "IspCacheNodesOperationsClient.GetCacheNodeInstallDetails": res.resp, res.err = i.dispatchGetCacheNodeInstallDetails(req) + case "IspCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory": + res.resp, res.err = i.dispatchGetCacheNodeMccIssueDetailsHistory(req) case "IspCacheNodesOperationsClient.NewListByIspCustomerResourcePager": res.resp, res.err = i.dispatchNewListByIspCustomerResourcePager(req) case "IspCacheNodesOperationsClient.Update": @@ -135,7 +147,7 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchBeginCreateOrUpdate(req const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armconnectedcache.IspCacheNodeResource](req) @@ -187,7 +199,7 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchBeginDelete(req *http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -233,7 +245,7 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchGet(req *http.Request) const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -270,7 +282,7 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchGetBgpCidrs(req *http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getBgpCidrs` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -300,6 +312,43 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchGetBgpCidrs(req *http.R return resp, nil } +func (i *IspCacheNodesOperationsServerTransport) dispatchGetCacheNodeAutoUpdateHistory(req *http.Request) (*http.Response, error) { + if i.srv.GetCacheNodeAutoUpdateHistory == nil { + return nil, &nonRetriableError{errors.New("fake for method GetCacheNodeAutoUpdateHistory not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getCacheNodeAutoUpdateHistory` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) + if err != nil { + return nil, err + } + cacheNodeResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cacheNodeResourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := i.srv.GetCacheNodeAutoUpdateHistory(req.Context(), resourceGroupNameParam, customerResourceNameParam, cacheNodeResourceNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MccCacheNodeAutoUpdateHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + func (i *IspCacheNodesOperationsServerTransport) dispatchGetCacheNodeInstallDetails(req *http.Request) (*http.Response, error) { if i.srv.GetCacheNodeInstallDetails == nil { return nil, &nonRetriableError{errors.New("fake for method GetCacheNodeInstallDetails not implemented")} @@ -307,7 +356,7 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchGetCacheNodeInstallDeta const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getCacheNodeInstallDetails` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -337,6 +386,43 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchGetCacheNodeInstallDeta return resp, nil } +func (i *IspCacheNodesOperationsServerTransport) dispatchGetCacheNodeMccIssueDetailsHistory(req *http.Request) (*http.Response, error) { + if i.srv.GetCacheNodeMccIssueDetailsHistory == nil { + return nil, &nonRetriableError{errors.New("fake for method GetCacheNodeMccIssueDetailsHistory not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getCacheNodeMccIssueDetailsHistory` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + customerResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customerResourceName")]) + if err != nil { + return nil, err + } + cacheNodeResourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cacheNodeResourceName")]) + if err != nil { + return nil, err + } + respr, errRespr := i.srv.GetCacheNodeMccIssueDetailsHistory(req.Context(), resourceGroupNameParam, customerResourceNameParam, cacheNodeResourceNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MccCacheNodeIssueHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + func (i *IspCacheNodesOperationsServerTransport) dispatchNewListByIspCustomerResourcePager(req *http.Request) (*http.Response, error) { if i.srv.NewListByIspCustomerResourcePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByIspCustomerResourcePager not implemented")} @@ -346,7 +432,7 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchNewListByIspCustomerRes const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -385,7 +471,7 @@ func (i *IspCacheNodesOperationsServerTransport) dispatchUpdate(req *http.Reques const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ispCacheNodes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armconnectedcache.PatchResource](req) diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/ispcustomers_server.go b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/ispcustomers_server.go index 1fb980a4bd60..3f7b9b9e5375 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/ispcustomers_server.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/ispcustomers_server.go @@ -131,7 +131,7 @@ func (i *IspCustomersServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armconnectedcache.IspCustomerResource](req) @@ -179,7 +179,7 @@ func (i *IspCustomersServerTransport) dispatchBeginDelete(req *http.Request) (*h const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -221,7 +221,7 @@ func (i *IspCustomersServerTransport) dispatchGet(req *http.Request) (*http.Resp const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -256,7 +256,7 @@ func (i *IspCustomersServerTransport) dispatchNewListByResourceGroupPager(req *h const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) @@ -293,7 +293,7 @@ func (i *IspCustomersServerTransport) dispatchNewListBySubscriptionPager(req *ht const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { + if len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := i.srv.NewListBySubscriptionPager(nil) @@ -324,7 +324,7 @@ func (i *IspCustomersServerTransport) dispatchUpdate(req *http.Request) (*http.R const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ConnectedCache/ispCustomers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 3 { + if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armconnectedcache.PatchResource](req) diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/server_factory.go b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/server_factory.go index 5e9b7929d6fe..77b3fda5000a 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/server_factory.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/server_factory.go @@ -15,12 +15,6 @@ import ( // ServerFactory is a fake server for instances of the armconnectedcache.ClientFactory type. type ServerFactory struct { - // CacheNodesOperationsServer contains the fakes for client CacheNodesOperationsClient - CacheNodesOperationsServer CacheNodesOperationsServer - - // EnterpriseCustomerOperationsServer contains the fakes for client EnterpriseCustomerOperationsClient - EnterpriseCustomerOperationsServer EnterpriseCustomerOperationsServer - // EnterpriseMccCacheNodesOperationsServer contains the fakes for client EnterpriseMccCacheNodesOperationsClient EnterpriseMccCacheNodesOperationsServer EnterpriseMccCacheNodesOperationsServer @@ -51,8 +45,6 @@ func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { type ServerFactoryTransport struct { srv *ServerFactory trMu sync.Mutex - trCacheNodesOperationsServer *CacheNodesOperationsServerTransport - trEnterpriseCustomerOperationsServer *EnterpriseCustomerOperationsServerTransport trEnterpriseMccCacheNodesOperationsServer *EnterpriseMccCacheNodesOperationsServerTransport trEnterpriseMccCustomersServer *EnterpriseMccCustomersServerTransport trIspCacheNodesOperationsServer *IspCacheNodesOperationsServerTransport @@ -73,16 +65,6 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { var err error switch client { - case "CacheNodesOperationsClient": - initServer(s, &s.trCacheNodesOperationsServer, func() *CacheNodesOperationsServerTransport { - return NewCacheNodesOperationsServerTransport(&s.srv.CacheNodesOperationsServer) - }) - resp, err = s.trCacheNodesOperationsServer.Do(req) - case "EnterpriseCustomerOperationsClient": - initServer(s, &s.trEnterpriseCustomerOperationsServer, func() *EnterpriseCustomerOperationsServerTransport { - return NewEnterpriseCustomerOperationsServerTransport(&s.srv.EnterpriseCustomerOperationsServer) - }) - resp, err = s.trEnterpriseCustomerOperationsServer.Do(req) case "EnterpriseMccCacheNodesOperationsClient": initServer(s, &s.trEnterpriseMccCacheNodesOperationsServer, func() *EnterpriseMccCacheNodesOperationsServerTransport { return NewEnterpriseMccCacheNodesOperationsServerTransport(&s.srv.EnterpriseMccCacheNodesOperationsServer) diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/time_rfc3339.go b/sdk/resourcemanager/connectedcache/armconnectedcache/fake/time_rfc3339.go deleted file mode 100644 index 87ee11e83b32..000000000000 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/fake/time_rfc3339.go +++ /dev/null @@ -1,109 +0,0 @@ -// 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) Go Code Generator. DO NOT EDIT. - -package fake - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) - -const ( - utcDateTime = "2006-01-02T15:04:05.999999999" - utcDateTimeJSON = `"` + utcDateTime + `"` - utcDateTimeNoT = "2006-01-02 15:04:05.999999999" - utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` - dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` - dateTimeJSON = `"` + time.RFC3339Nano + `"` - dateTimeJSONNoT = `"` + dateTimeNoT + `"` -) - -type dateTimeRFC3339 time.Time - -func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t dateTimeRFC3339) MarshalText() ([]byte, error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { - tzOffset := tzOffsetRegex.Match(data) - hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") - var layout string - if tzOffset && hasT { - layout = dateTimeJSON - } else if tzOffset { - layout = dateTimeJSONNoT - } else if hasT { - layout = utcDateTimeJSON - } else { - layout = utcDateTimeJSONNoT - } - return t.Parse(layout, string(data)) -} - -func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { - if len(data) == 0 { - return nil - } - tzOffset := tzOffsetRegex.Match(data) - hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") - var layout string - if tzOffset && hasT { - layout = time.RFC3339Nano - } else if tzOffset { - layout = dateTimeNoT - } else if hasT { - layout = utcDateTime - } else { - layout = utcDateTimeNoT - } - return t.Parse(layout, string(data)) -} - -func (t *dateTimeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = dateTimeRFC3339(p) - return err -} - -func (t dateTimeRFC3339) String() string { - return time.Time(t).Format(time.RFC3339Nano) -} - -func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*dateTimeRFC3339)(t) -} - -func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || string(data) == "null" { - return nil - } - var aux dateTimeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/ispcachenodesoperations_client.go b/sdk/resourcemanager/connectedcache/armconnectedcache/ispcachenodesoperations_client.go index 114294da874f..dd29cd492858 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/ispcachenodesoperations_client.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/ispcachenodesoperations_client.go @@ -42,7 +42,7 @@ func NewIspCacheNodesOperationsClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - This api creates an ispCacheNode with the specified create parameters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -69,7 +69,7 @@ func (client *IspCacheNodesOperationsClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - This api creates an ispCacheNode with the specified create parameters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview func (client *IspCacheNodesOperationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, resource IspCacheNodeResource, options *IspCacheNodesOperationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "IspCacheNodesOperationsClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *IspCacheNodesOperationsClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -128,7 +128,7 @@ func (client *IspCacheNodesOperationsClient) createOrUpdateCreateRequest(ctx con // BeginDelete - This api deletes an existing ispCacheNode resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -154,7 +154,7 @@ func (client *IspCacheNodesOperationsClient) BeginDelete(ctx context.Context, re // Delete - This api deletes an existing ispCacheNode resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview func (client *IspCacheNodesOperationsClient) deleteOperation(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *IspCacheNodesOperationsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "IspCacheNodesOperationsClient.BeginDelete" @@ -200,7 +200,7 @@ func (client *IspCacheNodesOperationsClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,7 +209,7 @@ func (client *IspCacheNodesOperationsClient) deleteCreateRequest(ctx context.Con // Get - This api gets ispCacheNode resource information // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -261,7 +261,7 @@ func (client *IspCacheNodesOperationsClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,7 +279,7 @@ func (client *IspCacheNodesOperationsClient) getHandleResponse(resp *http.Respon // GetBgpCidrs - This api gets ispCacheNode resource information // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -331,7 +331,7 @@ func (client *IspCacheNodesOperationsClient) getBgpCidrsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,10 +346,80 @@ func (client *IspCacheNodesOperationsClient) getBgpCidrsHandleResponse(resp *htt return result, nil } +// GetCacheNodeAutoUpdateHistory - This api gets ispCacheNode resource auto update histrory information +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-11-30-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - customerResourceName - Name of the Customer resource +// - cacheNodeResourceName - Name of the ConnectedCache resource +// - options - IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions contains the optional parameters for the IspCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory +// method. +func (client *IspCacheNodesOperationsClient) GetCacheNodeAutoUpdateHistory(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions) (IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse, error) { + var err error + const operationName = "IspCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCacheNodeAutoUpdateHistoryCreateRequest(ctx, resourceGroupName, customerResourceName, cacheNodeResourceName, options) + if err != nil { + return IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{}, err + } + resp, err := client.getCacheNodeAutoUpdateHistoryHandleResponse(httpResp) + return resp, err +} + +// getCacheNodeAutoUpdateHistoryCreateRequest creates the GetCacheNodeAutoUpdateHistory request. +func (client *IspCacheNodesOperationsClient) getCacheNodeAutoUpdateHistoryCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, _ *IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeAutoUpdateHistory" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customerResourceName == "" { + return nil, errors.New("parameter customerResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) + if cacheNodeResourceName == "" { + return nil, errors.New("parameter cacheNodeResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheNodeResourceName}", url.PathEscape(cacheNodeResourceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-11-30-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCacheNodeAutoUpdateHistoryHandleResponse handles the GetCacheNodeAutoUpdateHistory response. +func (client *IspCacheNodesOperationsClient) getCacheNodeAutoUpdateHistoryHandleResponse(resp *http.Response) (IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse, error) { + result := IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MccCacheNodeAutoUpdateHistory); err != nil { + return IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{}, err + } + return result, nil +} + // GetCacheNodeInstallDetails - This api gets secrets of the ispCacheNode resource install details // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -401,7 +471,7 @@ func (client *IspCacheNodesOperationsClient) getCacheNodeInstallDetailsCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -416,10 +486,80 @@ func (client *IspCacheNodesOperationsClient) getCacheNodeInstallDetailsHandleRes return result, nil } +// GetCacheNodeMccIssueDetailsHistory - This api gets ispCacheNode resource issues details histrory information +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-11-30-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - customerResourceName - Name of the Customer resource +// - cacheNodeResourceName - Name of the ConnectedCache resource +// - options - IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions contains the optional parameters for the +// IspCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory method. +func (client *IspCacheNodesOperationsClient) GetCacheNodeMccIssueDetailsHistory(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, options *IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions) (IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse, error) { + var err error + const operationName = "IspCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCacheNodeMccIssueDetailsHistoryCreateRequest(ctx, resourceGroupName, customerResourceName, cacheNodeResourceName, options) + if err != nil { + return IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{}, err + } + resp, err := client.getCacheNodeMccIssueDetailsHistoryHandleResponse(httpResp) + return resp, err +} + +// getCacheNodeMccIssueDetailsHistoryCreateRequest creates the GetCacheNodeMccIssueDetailsHistory request. +func (client *IspCacheNodesOperationsClient) getCacheNodeMccIssueDetailsHistoryCreateRequest(ctx context.Context, resourceGroupName string, customerResourceName string, cacheNodeResourceName string, _ *IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeMccIssueDetailsHistory" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customerResourceName == "" { + return nil, errors.New("parameter customerResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customerResourceName}", url.PathEscape(customerResourceName)) + if cacheNodeResourceName == "" { + return nil, errors.New("parameter cacheNodeResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheNodeResourceName}", url.PathEscape(cacheNodeResourceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-11-30-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCacheNodeMccIssueDetailsHistoryHandleResponse handles the GetCacheNodeMccIssueDetailsHistory response. +func (client *IspCacheNodesOperationsClient) getCacheNodeMccIssueDetailsHistoryHandleResponse(resp *http.Response) (IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse, error) { + result := IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MccCacheNodeIssueHistory); err != nil { + return IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{}, err + } + return result, nil +} + // NewListByIspCustomerResourcePager - This api retrieves information about all ispCacheNode resources under the given subscription // and resource group // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - options - IspCacheNodesOperationsClientListByIspCustomerResourceOptions contains the optional parameters for the IspCacheNodesOperationsClient.NewListByIspCustomerResourcePager @@ -467,7 +607,7 @@ func (client *IspCacheNodesOperationsClient) listByIspCustomerResourceCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -485,7 +625,7 @@ func (client *IspCacheNodesOperationsClient) listByIspCustomerResourceHandleResp // Update - This api updates an existing ispCacheNode resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - cacheNodeResourceName - Name of the ConnectedCache resource @@ -538,7 +678,7 @@ func (client *IspCacheNodesOperationsClient) updateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/ispcachenodesoperations_client_example_test.go b/sdk/resourcemanager/connectedcache/armconnectedcache/ispcachenodesoperations_client_example_test.go index cd071f82888d..23a235da945d 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/ispcachenodesoperations_client_example_test.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/ispcachenodesoperations_client_example_test.go @@ -12,7 +12,7 @@ import ( "log" ) -// Generated from example definition: 2023-05-01-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json func ExampleIspCacheNodesOperationsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,7 +61,6 @@ func ExampleIspCacheNodesOperationsClient_BeginCreateOrUpdate() { ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ ProxyURL: to.Ptr("hplstyg"), }, - ProxyURL: to.Ptr("qhux"), OptionalProperty1: to.Ptr("hvpmt"), OptionalProperty2: to.Ptr("talanelmsgxvksrzoeeontqkjzbpv"), OptionalProperty3: to.Ptr("bxkoxq"), @@ -170,7 +169,6 @@ func ExampleIspCacheNodesOperationsClient_BeginCreateOrUpdate() { // ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ // ProxyURL: to.Ptr("hplstyg"), // }, - // ProxyURL: to.Ptr("qhux"), // OptionalProperty1: to.Ptr("hvpmt"), // OptionalProperty2: to.Ptr("talanelmsgxvksrzoeeontqkjzbpv"), // OptionalProperty3: to.Ptr("bxkoxq"), @@ -197,7 +195,7 @@ func ExampleIspCacheNodesOperationsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: 2023-05-01-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json func ExampleIspCacheNodesOperationsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -218,7 +216,7 @@ func ExampleIspCacheNodesOperationsClient_BeginDelete() { } } -// Generated from example definition: 2023-05-01-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json func ExampleIspCacheNodesOperationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -319,7 +317,6 @@ func ExampleIspCacheNodesOperationsClient_Get() { // ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ // ProxyURL: to.Ptr("hplstyg"), // }, - // ProxyURL: to.Ptr("qhux"), // OptionalProperty1: to.Ptr("hvpmt"), // OptionalProperty2: to.Ptr("talanelmsgxvksrzoeeontqkjzbpv"), // OptionalProperty3: to.Ptr("bxkoxq"), @@ -352,7 +349,7 @@ func ExampleIspCacheNodesOperationsClient_Get() { // } } -// Generated from example definition: 2023-05-01-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json func ExampleIspCacheNodesOperationsClient_GetBgpCidrs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -396,7 +393,71 @@ func ExampleIspCacheNodesOperationsClient_GetBgpCidrs() { // } } -// Generated from example definition: 2023-05-01-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json +func ExampleIspCacheNodesOperationsClient_GetCacheNodeAutoUpdateHistory() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewIspCacheNodesOperationsClient().GetCacheNodeAutoUpdateHistory(ctx, "rgConnectedCache", "MccRPTest1", "MCCCachenode1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armconnectedcache.IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse{ + // MccCacheNodeAutoUpdateHistory: &armconnectedcache.MccCacheNodeAutoUpdateHistory{ + // Properties: &armconnectedcache.MccCacheNodeAutoUpdateHistoryProperties{ + // CustomerID: to.Ptr("fqyulypmqacwoifqnddnkcexbgm"), + // CacheNodeID: to.Ptr("elwtomk"), + // AutoUpdateHistory: []*armconnectedcache.MccCacheNodeAutoUpdateInfo{ + // { + // ImageURIBeforeUpdate: to.Ptr("ne"), + // ImageURITargeted: to.Ptr("zqgjxlqoucwyjf"), + // ImageURITerminal: to.Ptr("akng"), + // AutoUpdateRingType: to.Ptr[int32](16), + // MovedToTerminalStateDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:45.657Z"); return t}()), + // RuleRequestedWeek: to.Ptr[int32](1), + // RuleRequestedDay: to.Ptr[int32](9), + // CreatedDateTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:45.657Z"); return t}()), + // UpdatedRegistryDateTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:45.657Z"); return t}()), + // PlanChangeLogText: to.Ptr("uhfsokrwx"), + // AutoUpdateLastAppliedStatus: to.Ptr[int32](24), + // AutoUpdateLastAppliedStatusText: to.Ptr("cwoy"), + // AutoUpdateLastAppliedStatusDetailedText: to.Ptr("oicfonhqlnrc"), + // PlanID: to.Ptr[int64](17), + // TimeToGoLiveDateTime: to.Ptr("wqhjexgtkqzu"), + // RuleRequestedMinute: to.Ptr("ewoqhdmofybbpf"), + // RuleRequestedHour: to.Ptr("degiarxknlfqfgwz"), + // }, + // }, + // }, + // Tags: map[string]*string{ + // "key5753": to.Ptr("ubrjiectme"), + // }, + // Location: to.Ptr("westus"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/ispCustomers/MccRPTest1/ispCacheNodes/MCCCachenode1"), + // Name: to.Ptr("cgy"), + // Type: to.Ptr("kqbnkmxgllkdxfnsogmmdogjtotj"), + // SystemData: &armconnectedcache.SystemData{ + // CreatedBy: to.Ptr("gambtqj"), + // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), + // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // }, + // }, + // } +} + +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json func ExampleIspCacheNodesOperationsClient_GetCacheNodeInstallDetails() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -441,7 +502,60 @@ func ExampleIspCacheNodesOperationsClient_GetCacheNodeInstallDetails() { // } } -// Generated from example definition: 2023-05-01-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json +func ExampleIspCacheNodesOperationsClient_GetCacheNodeMccIssueDetailsHistory() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armconnectedcache.NewClientFactory("12345678-1234-1234-1234-123456789098", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewIspCacheNodesOperationsClient().GetCacheNodeMccIssueDetailsHistory(ctx, "rgConnectedCache", "MccRPTest1", "MCCCachenode1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armconnectedcache.IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse{ + // MccCacheNodeIssueHistory: &armconnectedcache.MccCacheNodeIssueHistory{ + // Properties: &armconnectedcache.MccCacheNodeIssueHistoryProperties{ + // CustomerID: to.Ptr("xqsblxpzcdxwwlzejepoyqrhbrpqgz"), + // CacheNodeID: to.Ptr("enw"), + // MccIssueHistory: []*armconnectedcache.MccIssue{ + // { + // MccIssueType: to.Ptr("uznqingg"), + // ToastString: to.Ptr("tkaajhrpptywiwfjnh"), + // DetailString: to.Ptr("rziwfs"), + // HelpLink: to.Ptr("fd"), + // IssueStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:40.167Z"); return t}()), + // IssueEndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-08T07:01:40.167Z"); return t}()), + // }, + // }, + // }, + // Tags: map[string]*string{ + // "key587": to.Ptr("tcgetdmzjjwtbvghsskfzzrmnrexgx"), + // }, + // Location: to.Ptr("msgrhbbqoannzbfuplaxnl"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rgConnectedCache/providers/Microsoft.ConnectedCache/ispCustomers/MccRPTest1/ispCacheNodes/MCCCachenode1"), + // Name: to.Ptr("fizavvfblaoosm"), + // Type: to.Ptr("bkkjnjpkvvlnrcfurjsfdspsnoozu"), + // SystemData: &armconnectedcache.SystemData{ + // CreatedBy: to.Ptr("gambtqj"), + // CreatedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // LastModifiedBy: to.Ptr("qomgaceiessgnuogz"), + // LastModifiedByType: to.Ptr(armconnectedcache.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.771Z"); return t}()), + // }, + // }, + // } +} + +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json func ExampleIspCacheNodesOperationsClient_NewListByIspCustomerResourcePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -548,7 +662,6 @@ func ExampleIspCacheNodesOperationsClient_NewListByIspCustomerResourcePager() { // ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ // ProxyURL: to.Ptr("hplstyg"), // }, - // ProxyURL: to.Ptr("qhux"), // OptionalProperty1: to.Ptr("hvpmt"), // OptionalProperty2: to.Ptr("talanelmsgxvksrzoeeontqkjzbpv"), // OptionalProperty3: to.Ptr("bxkoxq"), @@ -585,7 +698,7 @@ func ExampleIspCacheNodesOperationsClient_NewListByIspCustomerResourcePager() { } } -// Generated from example definition: 2023-05-01-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json func ExampleIspCacheNodesOperationsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -690,7 +803,6 @@ func ExampleIspCacheNodesOperationsClient_Update() { // ProxyURLConfiguration: &armconnectedcache.ProxyURLConfiguration{ // ProxyURL: to.Ptr("hplstyg"), // }, - // ProxyURL: to.Ptr("qhux"), // OptionalProperty1: to.Ptr("hvpmt"), // OptionalProperty2: to.Ptr("talanelmsgxvksrzoeeontqkjzbpv"), // OptionalProperty3: to.Ptr("bxkoxq"), diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/ispcustomers_client.go b/sdk/resourcemanager/connectedcache/armconnectedcache/ispcustomers_client.go index a9a5ff6d9485..744aecd6b765 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/ispcustomers_client.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/ispcustomers_client.go @@ -42,7 +42,7 @@ func NewIspCustomersClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - This api creates an ispCustomer with the specified create parameters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - resource - Resource create parameters. @@ -68,7 +68,7 @@ func (client *IspCustomersClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - This api creates an ispCustomer with the specified create parameters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview func (client *IspCustomersClient) createOrUpdate(ctx context.Context, resourceGroupName string, customerResourceName string, resource IspCustomerResource, options *IspCustomersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "IspCustomersClient.BeginCreateOrUpdate" @@ -110,7 +110,7 @@ func (client *IspCustomersClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -123,7 +123,7 @@ func (client *IspCustomersClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - This api deletes an existing ispCustomer resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - options - IspCustomersClientBeginDeleteOptions contains the optional parameters for the IspCustomersClient.BeginDelete @@ -148,7 +148,7 @@ func (client *IspCustomersClient) BeginDelete(ctx context.Context, resourceGroup // Delete - This api deletes an existing ispCustomer resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview func (client *IspCustomersClient) deleteOperation(ctx context.Context, resourceGroupName string, customerResourceName string, options *IspCustomersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "IspCustomersClient.BeginDelete" @@ -190,7 +190,7 @@ func (client *IspCustomersClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -199,7 +199,7 @@ func (client *IspCustomersClient) deleteCreateRequest(ctx context.Context, resou // Get - Gets the ispCustomer resource information using this get call // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - options - IspCustomersClientGetOptions contains the optional parameters for the IspCustomersClient.Get method. @@ -245,7 +245,7 @@ func (client *IspCustomersClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,7 +263,7 @@ func (client *IspCustomersClient) getHandleResponse(resp *http.Response) (IspCus // NewListByResourceGroupPager - This api gets the information about all ispCustomer resources under the given subscription // and resource group // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - IspCustomersClientListByResourceGroupOptions contains the optional parameters for the IspCustomersClient.NewListByResourceGroupPager // method. @@ -306,7 +306,7 @@ func (client *IspCustomersClient) listByResourceGroupCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -323,7 +323,7 @@ func (client *IspCustomersClient) listByResourceGroupHandleResponse(resp *http.R // NewListBySubscriptionPager - This api gets information about all ispCustomer resources under the given subscription // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - options - IspCustomersClientListBySubscriptionOptions contains the optional parameters for the IspCustomersClient.NewListBySubscriptionPager // method. func (client *IspCustomersClient) NewListBySubscriptionPager(options *IspCustomersClientListBySubscriptionOptions) *runtime.Pager[IspCustomersClientListBySubscriptionResponse] { @@ -361,7 +361,7 @@ func (client *IspCustomersClient) listBySubscriptionCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -379,7 +379,7 @@ func (client *IspCustomersClient) listBySubscriptionHandleResponse(resp *http.Re // Update - This api updates an existing ispCustomer resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-30-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - customerResourceName - Name of the Customer resource // - properties - The resource properties to be updated. @@ -426,7 +426,7 @@ func (client *IspCustomersClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/ispcustomers_client_example_test.go b/sdk/resourcemanager/connectedcache/armconnectedcache/ispcustomers_client_example_test.go index f03849689aa1..b9aa923c9755 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/ispcustomers_client_example_test.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/ispcustomers_client_example_test.go @@ -13,7 +13,7 @@ import ( "time" ) -// Generated from example definition: 2023-05-01-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json func ExampleIspCustomersClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,6 +45,7 @@ func ExampleIspCustomersClient_BeginCreateOrUpdate() { AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ CustomerEmail: to.Ptr("zdjgibsidydyzm"), CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), CustomerEntitlementSKUID: to.Ptr("b"), CustomerEntitlementSKUGUID: to.Ptr("rvzmdpxyflgqetvpwupnfaxsweiiz"), @@ -100,7 +101,6 @@ func ExampleIspCustomersClient_BeginCreateOrUpdate() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -119,6 +119,7 @@ func ExampleIspCustomersClient_BeginCreateOrUpdate() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -157,7 +158,7 @@ func ExampleIspCustomersClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: 2023-05-01-preview/IspCustomers_Delete_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCustomers_Delete_MaximumSet_Gen.json func ExampleIspCustomersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -178,7 +179,7 @@ func ExampleIspCustomersClient_BeginDelete() { } } -// Generated from example definition: 2023-05-01-preview/IspCustomers_Get_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCustomers_Get_MaximumSet_Gen.json func ExampleIspCustomersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -223,7 +224,6 @@ func ExampleIspCustomersClient_Get() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -242,6 +242,7 @@ func ExampleIspCustomersClient_Get() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -280,7 +281,7 @@ func ExampleIspCustomersClient_Get() { // } } -// Generated from example definition: 2023-05-01-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json func ExampleIspCustomersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -332,7 +333,6 @@ func ExampleIspCustomersClient_NewListByResourceGroupPager() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -351,6 +351,7 @@ func ExampleIspCustomersClient_NewListByResourceGroupPager() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -413,7 +414,6 @@ func ExampleIspCustomersClient_NewListByResourceGroupPager() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -432,6 +432,7 @@ func ExampleIspCustomersClient_NewListByResourceGroupPager() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -474,7 +475,7 @@ func ExampleIspCustomersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: 2023-05-01-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json func ExampleIspCustomersClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -526,7 +527,6 @@ func ExampleIspCustomersClient_NewListBySubscriptionPager() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -545,6 +545,7 @@ func ExampleIspCustomersClient_NewListBySubscriptionPager() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -607,7 +608,6 @@ func ExampleIspCustomersClient_NewListBySubscriptionPager() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -626,6 +626,7 @@ func ExampleIspCustomersClient_NewListBySubscriptionPager() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), @@ -668,7 +669,7 @@ func ExampleIspCustomersClient_NewListBySubscriptionPager() { } } -// Generated from example definition: 2023-05-01-preview/IspCustomers_Update_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/IspCustomers_Update_MaximumSet_Gen.json func ExampleIspCustomersClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -718,7 +719,6 @@ func ExampleIspCustomersClient_Update() { // VerifySignupCode: to.Ptr(true), // }, // AdditionalCustomerProperties: &armconnectedcache.AdditionalCustomerProperties{ - // PeeringDbLastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-30T00:54:04.773Z"); return t}()), // CustomerPropertiesOverviewCacheEfficiency: to.Ptr[float32](20), // CustomerPropertiesOverviewAverageEgressMbps: to.Ptr[float32](8), // CustomerPropertiesOverviewAverageMissMbps: to.Ptr[float32](19), @@ -737,6 +737,7 @@ func ExampleIspCustomersClient_Update() { // CustomerOrgName: to.Ptr("nshrwjhhggmdaqlpc"), // CustomerEmail: to.Ptr("zdjgibsidydyzm"), // CustomerTransitAsn: to.Ptr("habgklnxqzmozqpazoyejwiphezpi"), + // CustomerTransitState: to.Ptr(armconnectedcache.CustomerTransitState("voblixkxfejbmhxilb")), // CustomerAsn: to.Ptr("hgrelgnrtdkleisnepfolu"), // CustomerAsnEstimatedEgressPeekGbps: to.Ptr[float32](10), // CustomerEntitlementSKUID: to.Ptr("b"), diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/models.go b/sdk/resourcemanager/connectedcache/armconnectedcache/models.go index 0809ee407c17..dd514ab63b88 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/models.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/models.go @@ -17,6 +17,9 @@ type AdditionalCacheNodeProperties struct { // issues list to return the issues as part of the additional cache node properties CacheNodePropertiesDetailsIssuesList []*string + // Resource creation method of mcc cache node resource, cli or portal + CreationMethod *int32 + // Cache node resource drive configurations. DriveConfiguration []*CacheNodeDriveConfiguration @@ -41,15 +44,9 @@ type AdditionalCacheNodeProperties struct { // Optional property #5 of Mcc response object OptionalProperty5 *string - // Cache node resource Mcc proxy Url - ProxyURL *string - // proxyUrl configuration of the cache node ProxyURLConfiguration *ProxyURLConfiguration - // Update Cycle Type - UpdateCycleType *CycleType - // Update related information details UpdateInfoDetails *string @@ -95,12 +92,27 @@ type AdditionalCacheNodeProperties struct { // READ-ONLY; Cache node resource short state text. CacheNodeStateShortText *string + // READ-ONLY; cache node current tls certificate. + CurrentTLSCertificate *MccCacheNodeTLSCertificate + // READ-ONLY; Cache node resource flag indicating if cache node has been physically installed or provisioned on their physical // lab. IsProvisioned *bool + // READ-ONLY; Number of cache node issues. + IssuesCount *int32 + + // READ-ONLY; current cache node issue list. + IssuesList []*string + + // READ-ONLY; cache node last auto update information. + LastAutoUpdateInfo *MccCacheNodeAutoUpdateInfo + // READ-ONLY; Cache node resource Mcc product version. ProductVersion *string + + // READ-ONLY; Cache node tls certificate status. + TLSStatus *string } // AdditionalCustomerProperties - Model representing customer for connected cache resource @@ -180,9 +192,6 @@ type AdditionalCustomerProperties struct { // READ-ONLY; Customer resource last PeeringDB update timestamp. PeeringDbLastUpdateDate *time.Time - // READ-ONLY; Customer resource last PeeringDB update timestamp. - PeeringDbLastUpdateTime *time.Time - // READ-ONLY; Customer resource signup phase status code as integer. SignupPhaseStatusCode *int32 @@ -393,6 +402,12 @@ type CacheNodeInstallProperties struct { // Mcc customer resource Id. CustomerID *string + // Cache node resource drive configurations. + DriveConfiguration []*CacheNodeDriveConfiguration + + // proxyUrl configuration of the cache node + ProxyURLConfiguration *ProxyURLConfiguration + // READ-ONLY; Mcc primary account key. Internal to Mcc. PrimaryAccountKey *string @@ -401,61 +416,9 @@ type CacheNodeInstallProperties struct { // READ-ONLY; Mcc secondary account key. Internal to Mcc. SecondaryAccountKey *string -} - -// CacheNodeOldResponse - Model representing Cache Node for ConnectedCache resource -type CacheNodeOldResponse struct { - // The error details - Error *ErrorDetail - - // statusCode used to get code details of Mcc response object - StatusCode *string - - // statusDetails used to get inner details of Mcc response object - StatusDetails *string - - // statusText used to get status details in string format of Mcc response object - StatusText *string - - // READ-ONLY; The provisioned state of the resource - ProvisioningState *ProvisioningState - // READ-ONLY; status of the HTTP error code - Status *string -} - -// CacheNodePreviewResource - Concrete tracked resource types can be created by aliasing this type using a specific property -// type. -type CacheNodePreviewResource struct { - // REQUIRED; The geo-location where the resource lives - Location *string - - // The resource-specific properties for this resource. - Properties *CacheNodeOldResponse - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Name of the Customer resource - Name *string - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// CacheNodePreviewResourceListResult - The response of a CacheNodePreviewResource list operation. -type CacheNodePreviewResourceListResult struct { - // REQUIRED; The CacheNodePreviewResource items on this page - Value []*CacheNodePreviewResource - - // The link to the next page of items - NextLink *string + // READ-ONLY; Mcc Tls certificate provisioning key. + TLSCertificateProvisioningKey *string } // CacheNodeProperty - Model representing an Mcc cache node connectedCache resource @@ -635,40 +598,6 @@ type EnterpriseMccCustomerResourceListResult struct { NextLink *string } -// EnterprisePreviewResource - ConnectedCache Resource. Represents the high level Nodes needed to provision CacheNode and -// customer resources used in private preview -type EnterprisePreviewResource struct { - // REQUIRED; The geo-location where the resource lives - Location *string - - // The resource-specific properties for this resource. - Properties *CacheNodeOldResponse - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Name of the Customer resource - Name *string - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// EnterprisePreviewResourceListResult - The response of a EnterprisePreviewResource list operation. -type EnterprisePreviewResourceListResult struct { - // REQUIRED; The EnterprisePreviewResource items on this page - Value []*EnterprisePreviewResource - - // The link to the next page of items - NextLink *string -} - // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. @@ -765,6 +694,96 @@ type IspCustomerResourceListResult struct { NextLink *string } +// MccCacheNodeAutoUpdateHistory - Mcc cache node resource auto update history. +type MccCacheNodeAutoUpdateHistory struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Mcc cache node resource auto update history properties. + Properties *MccCacheNodeAutoUpdateHistoryProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// MccCacheNodeAutoUpdateHistoryProperties - Mcc cache node resource auto update history properties. +type MccCacheNodeAutoUpdateHistoryProperties struct { + // Cache node resource auto update history information. + AutoUpdateHistory []*MccCacheNodeAutoUpdateInfo + + // READ-ONLY; Mcc cache node resource Id. + CacheNodeID *string + + // READ-ONLY; Mcc customer resource Id. + CustomerID *string +} + +// MccCacheNodeAutoUpdateInfo - Mcc cache node resource auto update properties. +type MccCacheNodeAutoUpdateInfo struct { + // READ-ONLY; Auto update last applied status. + AutoUpdateLastAppliedStatus *int32 + + // READ-ONLY; Auto update last applied detailed status text. + AutoUpdateLastAppliedStatusDetailedText *string + + // READ-ONLY; Auto update last applied status text. + AutoUpdateLastAppliedStatusText *string + + // READ-ONLY; Auto update Ring Type. + AutoUpdateRingType *int32 + + // READ-ONLY; Auto update entity created datetime. + CreatedDateTimeUTC *time.Time + + // READ-ONLY; Auto update image uri before update. + ImageURIBeforeUpdate *string + + // READ-ONLY; Auto update image uri targetted to update. + ImageURITargeted *string + + // READ-ONLY; Auto update image uri at Terminal. + ImageURITerminal *string + + // READ-ONLY; Auto update image uri after update. + MovedToTerminalStateDateTime *time.Time + + // READ-ONLY; This text describing the purpose of the plan of auto update. + PlanChangeLogText *string + + // READ-ONLY; Auto update planId. + PlanID *int64 + + // READ-ONLY; Auto update image uri after update. + RuleRequestedDay *int32 + + // READ-ONLY; Auto update rule requested hour. + RuleRequestedHour *string + + // READ-ONLY; Auto update rule requested minute. + RuleRequestedMinute *string + + // READ-ONLY; Auto update image uri before update. + RuleRequestedWeek *int32 + + // READ-ONLY; Auto update time to go live date time. + TimeToGoLiveDateTime *string + + // READ-ONLY; Auto update entity last updated datetime. + UpdatedRegistryDateTimeUTC *time.Time +} + // MccCacheNodeBgpCidrDetails - Represents all Cidr details of the Bgp request for a specific cache node resource type MccCacheNodeBgpCidrDetails struct { // REQUIRED; The geo-location where the resource lives @@ -813,14 +832,131 @@ type MccCacheNodeInstallDetails struct { Type *string } +// MccCacheNodeIssueHistory - Mcc cache node resource issue history. +type MccCacheNodeIssueHistory struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Mcc cache node resource issue history properties. + Properties *MccCacheNodeIssueHistoryProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// MccCacheNodeIssueHistoryProperties - Mcc cache node resource issue history properties. +type MccCacheNodeIssueHistoryProperties struct { + // Cache node resource issue details history. + MccIssueHistory []*MccIssue + + // READ-ONLY; Mcc cache node resource Id. + CacheNodeID *string + + // READ-ONLY; Mcc customer resource Id. + CustomerID *string +} + +// MccCacheNodeTLSCertificate - Mcc cache node resource Tls certificate details. +type MccCacheNodeTLSCertificate struct { + // READ-ONLY; Mcc cache node Tls certificate status. + ActionRequired *string + + // READ-ONLY; Mcc cache node Tls certificate file name. + CertificateFileName *string + + // READ-ONLY; Mcc cache node Tls certificate expiry date. + ExpiryDate *time.Time + + // READ-ONLY; Mcc cache node Tls certificate not before date. + NotBeforeDate *time.Time + + // READ-ONLY; Mcc cache node Tls certificate subject name. + Subject *string + + // READ-ONLY; Mcc cache node Tls certificate subject alternate name. + SubjectAltName *string + + // READ-ONLY; Mcc cache node Tls certificate thumbprint. + Thumbprint *string +} + +// MccCacheNodeTLSCertificateHistory - Mcc cache node resource Tls certificate history details. +type MccCacheNodeTLSCertificateHistory struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Mcc cache node resource Tls certificate details. + Properties *MccCacheNodeTLSCertificateProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// MccCacheNodeTLSCertificateProperties - Mcc cache node resource auto update properties. +type MccCacheNodeTLSCertificateProperties struct { + // Cache node resource tls certificate history details. + TLSCertificateHistory []*MccCacheNodeTLSCertificate + + // READ-ONLY; Mcc cache node resource Id. + CacheNodeID *string + + // READ-ONLY; Mcc customer resource Id. + CustomerID *string +} + +// MccIssue - Mcc cache node resource issue properties. +type MccIssue struct { + // READ-ONLY; Mcc cache node issue detail string. + DetailString *string + + // READ-ONLY; Mcc cache node issue related help link. + HelpLink *string + + // READ-ONLY; Mcc cache node issue end date. + IssueEndDate *time.Time + + // READ-ONLY; Mcc cache node issue start date. + IssueStartDate *time.Time + + // READ-ONLY; Mcc cache node issue type. + MccIssueType *string + + // READ-ONLY; Mcc cache node issues toastString. + ToastString *string +} + // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { - // Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - ActionType *ActionType - - // READ-ONLY; Localized display information for this particular operation. + // Localized display information for this particular operation. Display *OperationDisplay + // READ-ONLY; Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + ActionType *ActionType + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure // Resource Manager/control-plane operations. IsDataAction *bool diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/models_serde.go b/sdk/resourcemanager/connectedcache/armconnectedcache/models_serde.go index 0a2659d79975..faa18ea8fed6 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/models_serde.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/models_serde.go @@ -30,9 +30,14 @@ func (a AdditionalCacheNodeProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "cacheNodeState", a.CacheNodeState) populate(objectMap, "cacheNodeStateDetailedText", a.CacheNodeStateDetailedText) populate(objectMap, "cacheNodeStateShortText", a.CacheNodeStateShortText) + populate(objectMap, "creationMethod", a.CreationMethod) + populate(objectMap, "currentTlsCertificate", a.CurrentTLSCertificate) populate(objectMap, "driveConfiguration", a.DriveConfiguration) populate(objectMap, "isProvisioned", a.IsProvisioned) populate(objectMap, "isProxyRequired", a.IsProxyRequired) + populate(objectMap, "issuesCount", a.IssuesCount) + populate(objectMap, "issuesList", a.IssuesList) + populate(objectMap, "lastAutoUpdateInfo", a.LastAutoUpdateInfo) populate(objectMap, "osType", a.OSType) populate(objectMap, "optionalProperty1", a.OptionalProperty1) populate(objectMap, "optionalProperty2", a.OptionalProperty2) @@ -40,9 +45,8 @@ func (a AdditionalCacheNodeProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "optionalProperty4", a.OptionalProperty4) populate(objectMap, "optionalProperty5", a.OptionalProperty5) populate(objectMap, "productVersion", a.ProductVersion) - populate(objectMap, "proxyUrl", a.ProxyURL) populate(objectMap, "proxyUrlConfiguration", a.ProxyURLConfiguration) - populate(objectMap, "updateCycleType", a.UpdateCycleType) + populate(objectMap, "tlsStatus", a.TLSStatus) populate(objectMap, "updateInfoDetails", a.UpdateInfoDetails) populateDateTimeRFC3339(objectMap, "updateRequestedDateTime", a.UpdateRequestedDateTime) return json.Marshal(objectMap) @@ -105,6 +109,12 @@ func (a *AdditionalCacheNodeProperties) UnmarshalJSON(data []byte) error { case "cacheNodeStateShortText": err = unpopulate(val, "CacheNodeStateShortText", &a.CacheNodeStateShortText) delete(rawMsg, key) + case "creationMethod": + err = unpopulate(val, "CreationMethod", &a.CreationMethod) + delete(rawMsg, key) + case "currentTlsCertificate": + err = unpopulate(val, "CurrentTLSCertificate", &a.CurrentTLSCertificate) + delete(rawMsg, key) case "driveConfiguration": err = unpopulate(val, "DriveConfiguration", &a.DriveConfiguration) delete(rawMsg, key) @@ -114,6 +124,15 @@ func (a *AdditionalCacheNodeProperties) UnmarshalJSON(data []byte) error { case "isProxyRequired": err = unpopulate(val, "IsProxyRequired", &a.IsProxyRequired) delete(rawMsg, key) + case "issuesCount": + err = unpopulate(val, "IssuesCount", &a.IssuesCount) + delete(rawMsg, key) + case "issuesList": + err = unpopulate(val, "IssuesList", &a.IssuesList) + delete(rawMsg, key) + case "lastAutoUpdateInfo": + err = unpopulate(val, "LastAutoUpdateInfo", &a.LastAutoUpdateInfo) + delete(rawMsg, key) case "osType": err = unpopulate(val, "OSType", &a.OSType) delete(rawMsg, key) @@ -135,14 +154,11 @@ func (a *AdditionalCacheNodeProperties) UnmarshalJSON(data []byte) error { case "productVersion": err = unpopulate(val, "ProductVersion", &a.ProductVersion) delete(rawMsg, key) - case "proxyUrl": - err = unpopulate(val, "ProxyURL", &a.ProxyURL) - delete(rawMsg, key) case "proxyUrlConfiguration": err = unpopulate(val, "ProxyURLConfiguration", &a.ProxyURLConfiguration) delete(rawMsg, key) - case "updateCycleType": - err = unpopulate(val, "UpdateCycleType", &a.UpdateCycleType) + case "tlsStatus": + err = unpopulate(val, "TLSStatus", &a.TLSStatus) delete(rawMsg, key) case "updateInfoDetails": err = unpopulate(val, "UpdateInfoDetails", &a.UpdateInfoDetails) @@ -186,7 +202,6 @@ func (a AdditionalCustomerProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "optionalProperty4", a.OptionalProperty4) populate(objectMap, "optionalProperty5", a.OptionalProperty5) populateDateTimeRFC3339(objectMap, "peeringDbLastUpdateDate", a.PeeringDbLastUpdateDate) - populateDateTimeRFC3339(objectMap, "peeringDbLastUpdateTime", a.PeeringDbLastUpdateTime) populate(objectMap, "signupPhaseStatusCode", a.SignupPhaseStatusCode) populate(objectMap, "signupPhaseStatusText", a.SignupPhaseStatusText) populate(objectMap, "signupStatus", a.SignupStatus) @@ -279,9 +294,6 @@ func (a *AdditionalCustomerProperties) UnmarshalJSON(data []byte) error { case "peeringDbLastUpdateDate": err = unpopulateDateTimeRFC3339(val, "PeeringDbLastUpdateDate", &a.PeeringDbLastUpdateDate) delete(rawMsg, key) - case "peeringDbLastUpdateTime": - err = unpopulateDateTimeRFC3339(val, "PeeringDbLastUpdateTime", &a.PeeringDbLastUpdateTime) - delete(rawMsg, key) case "signupPhaseStatusCode": err = unpopulate(val, "SignupPhaseStatusCode", &a.SignupPhaseStatusCode) delete(rawMsg, key) @@ -634,9 +646,12 @@ func (c CacheNodeInstallProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "cacheNodeId", c.CacheNodeID) populate(objectMap, "customerId", c.CustomerID) + populate(objectMap, "driveConfiguration", c.DriveConfiguration) populate(objectMap, "primaryAccountKey", c.PrimaryAccountKey) + populate(objectMap, "proxyUrlConfiguration", c.ProxyURLConfiguration) populate(objectMap, "registrationKey", c.RegistrationKey) populate(objectMap, "secondaryAccountKey", c.SecondaryAccountKey) + populate(objectMap, "tlsCertificateProvisioningKey", c.TLSCertificateProvisioningKey) return json.Marshal(objectMap) } @@ -655,143 +670,23 @@ func (c *CacheNodeInstallProperties) UnmarshalJSON(data []byte) error { case "customerId": err = unpopulate(val, "CustomerID", &c.CustomerID) delete(rawMsg, key) + case "driveConfiguration": + err = unpopulate(val, "DriveConfiguration", &c.DriveConfiguration) + delete(rawMsg, key) case "primaryAccountKey": err = unpopulate(val, "PrimaryAccountKey", &c.PrimaryAccountKey) delete(rawMsg, key) + case "proxyUrlConfiguration": + err = unpopulate(val, "ProxyURLConfiguration", &c.ProxyURLConfiguration) + delete(rawMsg, key) case "registrationKey": err = unpopulate(val, "RegistrationKey", &c.RegistrationKey) delete(rawMsg, key) case "secondaryAccountKey": err = unpopulate(val, "SecondaryAccountKey", &c.SecondaryAccountKey) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheNodeOldResponse. -func (c CacheNodeOldResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", c.Error) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "status", c.Status) - populate(objectMap, "statusCode", c.StatusCode) - populate(objectMap, "statusDetails", c.StatusDetails) - populate(objectMap, "statusText", c.StatusText) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheNodeOldResponse. -func (c *CacheNodeOldResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &c.Error) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) - delete(rawMsg, key) - case "statusCode": - err = unpopulate(val, "StatusCode", &c.StatusCode) - delete(rawMsg, key) - case "statusDetails": - err = unpopulate(val, "StatusDetails", &c.StatusDetails) - delete(rawMsg, key) - case "statusText": - err = unpopulate(val, "StatusText", &c.StatusText) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheNodePreviewResource. -func (c CacheNodePreviewResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheNodePreviewResource. -func (c *CacheNodePreviewResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheNodePreviewResourceListResult. -func (c CacheNodePreviewResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheNodePreviewResourceListResult. -func (c *CacheNodePreviewResourceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) + case "tlsCertificateProvisioningKey": + err = unpopulate(val, "TLSCertificateProvisioningKey", &c.TLSCertificateProvisioningKey) delete(rawMsg, key) } if err != nil { @@ -1170,88 +1065,6 @@ func (e *EnterpriseMccCustomerResourceListResult) UnmarshalJSON(data []byte) err return nil } -// MarshalJSON implements the json.Marshaller interface for type EnterprisePreviewResource. -func (e EnterprisePreviewResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "systemData", e.SystemData) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnterprisePreviewResource. -func (e *EnterprisePreviewResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EnterprisePreviewResourceListResult. -func (e EnterprisePreviewResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnterprisePreviewResourceListResult. -func (e *EnterprisePreviewResourceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1490,6 +1303,183 @@ func (i *IspCustomerResourceListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type MccCacheNodeAutoUpdateHistory. +func (m MccCacheNodeAutoUpdateHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccCacheNodeAutoUpdateHistory. +func (m *MccCacheNodeAutoUpdateHistory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MccCacheNodeAutoUpdateHistoryProperties. +func (m MccCacheNodeAutoUpdateHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoUpdateHistory", m.AutoUpdateHistory) + populate(objectMap, "cacheNodeId", m.CacheNodeID) + populate(objectMap, "customerId", m.CustomerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccCacheNodeAutoUpdateHistoryProperties. +func (m *MccCacheNodeAutoUpdateHistoryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoUpdateHistory": + err = unpopulate(val, "AutoUpdateHistory", &m.AutoUpdateHistory) + delete(rawMsg, key) + case "cacheNodeId": + err = unpopulate(val, "CacheNodeID", &m.CacheNodeID) + delete(rawMsg, key) + case "customerId": + err = unpopulate(val, "CustomerID", &m.CustomerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MccCacheNodeAutoUpdateInfo. +func (m MccCacheNodeAutoUpdateInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoUpdateLastAppliedStatus", m.AutoUpdateLastAppliedStatus) + populate(objectMap, "autoUpdateLastAppliedStatusDetailedText", m.AutoUpdateLastAppliedStatusDetailedText) + populate(objectMap, "autoUpdateLastAppliedStatusText", m.AutoUpdateLastAppliedStatusText) + populate(objectMap, "autoUpdateRingType", m.AutoUpdateRingType) + populateDateTimeRFC3339(objectMap, "createdDateTimeUtc", m.CreatedDateTimeUTC) + populate(objectMap, "imageUriBeforeUpdate", m.ImageURIBeforeUpdate) + populate(objectMap, "imageUriTargeted", m.ImageURITargeted) + populate(objectMap, "imageUriTerminal", m.ImageURITerminal) + populateDateTimeRFC3339(objectMap, "movedToTerminalStateDateTime", m.MovedToTerminalStateDateTime) + populate(objectMap, "planChangeLogText", m.PlanChangeLogText) + populate(objectMap, "planId", m.PlanID) + populate(objectMap, "ruleRequestedDay", m.RuleRequestedDay) + populate(objectMap, "ruleRequestedHour", m.RuleRequestedHour) + populate(objectMap, "ruleRequestedMinute", m.RuleRequestedMinute) + populate(objectMap, "ruleRequestedWeek", m.RuleRequestedWeek) + populate(objectMap, "timeToGoLiveDateTime", m.TimeToGoLiveDateTime) + populateDateTimeRFC3339(objectMap, "updatedRegistryDateTimeUtc", m.UpdatedRegistryDateTimeUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccCacheNodeAutoUpdateInfo. +func (m *MccCacheNodeAutoUpdateInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoUpdateLastAppliedStatus": + err = unpopulate(val, "AutoUpdateLastAppliedStatus", &m.AutoUpdateLastAppliedStatus) + delete(rawMsg, key) + case "autoUpdateLastAppliedStatusDetailedText": + err = unpopulate(val, "AutoUpdateLastAppliedStatusDetailedText", &m.AutoUpdateLastAppliedStatusDetailedText) + delete(rawMsg, key) + case "autoUpdateLastAppliedStatusText": + err = unpopulate(val, "AutoUpdateLastAppliedStatusText", &m.AutoUpdateLastAppliedStatusText) + delete(rawMsg, key) + case "autoUpdateRingType": + err = unpopulate(val, "AutoUpdateRingType", &m.AutoUpdateRingType) + delete(rawMsg, key) + case "createdDateTimeUtc": + err = unpopulateDateTimeRFC3339(val, "CreatedDateTimeUTC", &m.CreatedDateTimeUTC) + delete(rawMsg, key) + case "imageUriBeforeUpdate": + err = unpopulate(val, "ImageURIBeforeUpdate", &m.ImageURIBeforeUpdate) + delete(rawMsg, key) + case "imageUriTargeted": + err = unpopulate(val, "ImageURITargeted", &m.ImageURITargeted) + delete(rawMsg, key) + case "imageUriTerminal": + err = unpopulate(val, "ImageURITerminal", &m.ImageURITerminal) + delete(rawMsg, key) + case "movedToTerminalStateDateTime": + err = unpopulateDateTimeRFC3339(val, "MovedToTerminalStateDateTime", &m.MovedToTerminalStateDateTime) + delete(rawMsg, key) + case "planChangeLogText": + err = unpopulate(val, "PlanChangeLogText", &m.PlanChangeLogText) + delete(rawMsg, key) + case "planId": + err = unpopulate(val, "PlanID", &m.PlanID) + delete(rawMsg, key) + case "ruleRequestedDay": + err = unpopulate(val, "RuleRequestedDay", &m.RuleRequestedDay) + delete(rawMsg, key) + case "ruleRequestedHour": + err = unpopulate(val, "RuleRequestedHour", &m.RuleRequestedHour) + delete(rawMsg, key) + case "ruleRequestedMinute": + err = unpopulate(val, "RuleRequestedMinute", &m.RuleRequestedMinute) + delete(rawMsg, key) + case "ruleRequestedWeek": + err = unpopulate(val, "RuleRequestedWeek", &m.RuleRequestedWeek) + delete(rawMsg, key) + case "timeToGoLiveDateTime": + err = unpopulate(val, "TimeToGoLiveDateTime", &m.TimeToGoLiveDateTime) + delete(rawMsg, key) + case "updatedRegistryDateTimeUtc": + err = unpopulateDateTimeRFC3339(val, "UpdatedRegistryDateTimeUTC", &m.UpdatedRegistryDateTimeUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type MccCacheNodeBgpCidrDetails. func (m MccCacheNodeBgpCidrDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1592,6 +1582,276 @@ func (m *MccCacheNodeInstallDetails) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type MccCacheNodeIssueHistory. +func (m MccCacheNodeIssueHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccCacheNodeIssueHistory. +func (m *MccCacheNodeIssueHistory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MccCacheNodeIssueHistoryProperties. +func (m MccCacheNodeIssueHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheNodeId", m.CacheNodeID) + populate(objectMap, "customerId", m.CustomerID) + populate(objectMap, "mccIssueHistory", m.MccIssueHistory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccCacheNodeIssueHistoryProperties. +func (m *MccCacheNodeIssueHistoryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheNodeId": + err = unpopulate(val, "CacheNodeID", &m.CacheNodeID) + delete(rawMsg, key) + case "customerId": + err = unpopulate(val, "CustomerID", &m.CustomerID) + delete(rawMsg, key) + case "mccIssueHistory": + err = unpopulate(val, "MccIssueHistory", &m.MccIssueHistory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MccCacheNodeTLSCertificate. +func (m MccCacheNodeTLSCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionRequired", m.ActionRequired) + populate(objectMap, "certificateFileName", m.CertificateFileName) + populateDateTimeRFC3339(objectMap, "expiryDate", m.ExpiryDate) + populateDateTimeRFC3339(objectMap, "notBeforeDate", m.NotBeforeDate) + populate(objectMap, "subject", m.Subject) + populate(objectMap, "subjectAltName", m.SubjectAltName) + populate(objectMap, "thumbprint", m.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccCacheNodeTLSCertificate. +func (m *MccCacheNodeTLSCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionRequired": + err = unpopulate(val, "ActionRequired", &m.ActionRequired) + delete(rawMsg, key) + case "certificateFileName": + err = unpopulate(val, "CertificateFileName", &m.CertificateFileName) + delete(rawMsg, key) + case "expiryDate": + err = unpopulateDateTimeRFC3339(val, "ExpiryDate", &m.ExpiryDate) + delete(rawMsg, key) + case "notBeforeDate": + err = unpopulateDateTimeRFC3339(val, "NotBeforeDate", &m.NotBeforeDate) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &m.Subject) + delete(rawMsg, key) + case "subjectAltName": + err = unpopulate(val, "SubjectAltName", &m.SubjectAltName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &m.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MccCacheNodeTLSCertificateHistory. +func (m MccCacheNodeTLSCertificateHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccCacheNodeTLSCertificateHistory. +func (m *MccCacheNodeTLSCertificateHistory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MccCacheNodeTLSCertificateProperties. +func (m MccCacheNodeTLSCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheNodeId", m.CacheNodeID) + populate(objectMap, "customerId", m.CustomerID) + populate(objectMap, "tlsCertificateHistory", m.TLSCertificateHistory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccCacheNodeTLSCertificateProperties. +func (m *MccCacheNodeTLSCertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheNodeId": + err = unpopulate(val, "CacheNodeID", &m.CacheNodeID) + delete(rawMsg, key) + case "customerId": + err = unpopulate(val, "CustomerID", &m.CustomerID) + delete(rawMsg, key) + case "tlsCertificateHistory": + err = unpopulate(val, "TLSCertificateHistory", &m.TLSCertificateHistory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MccIssue. +func (m MccIssue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "detailString", m.DetailString) + populate(objectMap, "helpLink", m.HelpLink) + populateDateTimeRFC3339(objectMap, "issueEndDate", m.IssueEndDate) + populateDateTimeRFC3339(objectMap, "issueStartDate", m.IssueStartDate) + populate(objectMap, "mccIssueType", m.MccIssueType) + populate(objectMap, "toastString", m.ToastString) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MccIssue. +func (m *MccIssue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "detailString": + err = unpopulate(val, "DetailString", &m.DetailString) + delete(rawMsg, key) + case "helpLink": + err = unpopulate(val, "HelpLink", &m.HelpLink) + delete(rawMsg, key) + case "issueEndDate": + err = unpopulateDateTimeRFC3339(val, "IssueEndDate", &m.IssueEndDate) + delete(rawMsg, key) + case "issueStartDate": + err = unpopulateDateTimeRFC3339(val, "IssueStartDate", &m.IssueStartDate) + delete(rawMsg, key) + case "mccIssueType": + err = unpopulate(val, "MccIssueType", &m.MccIssueType) + delete(rawMsg, key) + case "toastString": + err = unpopulate(val, "ToastString", &m.ToastString) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/operations_client.go b/sdk/resourcemanager/connectedcache/armconnectedcache/operations_client.go index 0099d85a32aa..72457ad82a38 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/operations_client.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/operations_client.go @@ -35,7 +35,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - List the operations for the provider // -// Generated from API version 2023-05-01-preview +// Generated from API version 2024-11-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]{ @@ -68,7 +68,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *Operat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01-preview") + reqQP.Set("api-version", "2024-11-30-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/operations_client_example_test.go b/sdk/resourcemanager/connectedcache/armconnectedcache/operations_client_example_test.go index dbee9b83e9bc..4412703b5dec 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/operations_client_example_test.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/operations_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2023-05-01-preview/Operations_List_MaximumSet_Gen.json +// Generated from example definition: 2024-11-30-preview/Operations_List_MaximumSet_Gen.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/options.go b/sdk/resourcemanager/connectedcache/armconnectedcache/options.go index ace5356a6a0d..0e55d00a782c 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/options.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/options.go @@ -4,94 +4,41 @@ package armconnectedcache -// CacheNodesOperationsClientBeginCreateorUpdateOptions contains the optional parameters for the CacheNodesOperationsClient.BeginCreateorUpdate +// EnterpriseMccCacheNodesOperationsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnterpriseMccCacheNodesOperationsClient.BeginCreateOrUpdate // method. -type CacheNodesOperationsClientBeginCreateorUpdateOptions struct { +type EnterpriseMccCacheNodesOperationsClientBeginCreateOrUpdateOptions struct { // Resumes the long-running operation from the provided token. ResumeToken string } -// CacheNodesOperationsClientDeleteOptions contains the optional parameters for the CacheNodesOperationsClient.Delete method. -type CacheNodesOperationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CacheNodesOperationsClientGetOptions contains the optional parameters for the CacheNodesOperationsClient.Get method. -type CacheNodesOperationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// CacheNodesOperationsClientListByResourceGroupOptions contains the optional parameters for the CacheNodesOperationsClient.NewListByResourceGroupPager -// method. -type CacheNodesOperationsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// CacheNodesOperationsClientListBySubscriptionOptions contains the optional parameters for the CacheNodesOperationsClient.NewListBySubscriptionPager -// method. -type CacheNodesOperationsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// CacheNodesOperationsClientUpdateOptions contains the optional parameters for the CacheNodesOperationsClient.Update method. -type CacheNodesOperationsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// EnterpriseCustomerOperationsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.BeginCreateOrUpdate +// EnterpriseMccCacheNodesOperationsClientBeginDeleteOptions contains the optional parameters for the EnterpriseMccCacheNodesOperationsClient.BeginDelete // method. -type EnterpriseCustomerOperationsClientBeginCreateOrUpdateOptions struct { +type EnterpriseMccCacheNodesOperationsClientBeginDeleteOptions struct { // Resumes the long-running operation from the provided token. ResumeToken string } -// EnterpriseCustomerOperationsClientDeleteOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.Delete -// method. -type EnterpriseCustomerOperationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// EnterpriseCustomerOperationsClientGetOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.Get -// method. -type EnterpriseCustomerOperationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// EnterpriseCustomerOperationsClientListByResourceGroupOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.NewListByResourceGroupPager +// EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions contains the optional parameters for the EnterpriseMccCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory // method. -type EnterpriseCustomerOperationsClientListByResourceGroupOptions struct { +type EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions struct { // placeholder for future optional parameters } -// EnterpriseCustomerOperationsClientListBySubscriptionOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.NewListBySubscriptionPager +// EnterpriseMccCacheNodesOperationsClientGetCacheNodeInstallDetailsOptions contains the optional parameters for the EnterpriseMccCacheNodesOperationsClient.GetCacheNodeInstallDetails // method. -type EnterpriseCustomerOperationsClientListBySubscriptionOptions struct { +type EnterpriseMccCacheNodesOperationsClientGetCacheNodeInstallDetailsOptions struct { // placeholder for future optional parameters } -// EnterpriseCustomerOperationsClientUpdateOptions contains the optional parameters for the EnterpriseCustomerOperationsClient.Update -// method. -type EnterpriseCustomerOperationsClientUpdateOptions struct { +// EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions contains the optional parameters for the +// EnterpriseMccCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory method. +type EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions struct { // placeholder for future optional parameters } -// EnterpriseMccCacheNodesOperationsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnterpriseMccCacheNodesOperationsClient.BeginCreateOrUpdate -// method. -type EnterpriseMccCacheNodesOperationsClientBeginCreateOrUpdateOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// EnterpriseMccCacheNodesOperationsClientBeginDeleteOptions contains the optional parameters for the EnterpriseMccCacheNodesOperationsClient.BeginDelete -// method. -type EnterpriseMccCacheNodesOperationsClientBeginDeleteOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// EnterpriseMccCacheNodesOperationsClientGetCacheNodeInstallDetailsOptions contains the optional parameters for the EnterpriseMccCacheNodesOperationsClient.GetCacheNodeInstallDetails -// method. -type EnterpriseMccCacheNodesOperationsClientGetCacheNodeInstallDetailsOptions struct { +// EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryOptions contains the optional parameters for the +// EnterpriseMccCacheNodesOperationsClient.GetCacheNodeTLSCertificateHistory method. +type EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryOptions struct { // placeholder for future optional parameters } @@ -170,12 +117,24 @@ type IspCacheNodesOperationsClientGetBgpCidrsOptions struct { // placeholder for future optional parameters } +// IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions contains the optional parameters for the IspCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory +// method. +type IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryOptions struct { + // placeholder for future optional parameters +} + // IspCacheNodesOperationsClientGetCacheNodeInstallDetailsOptions contains the optional parameters for the IspCacheNodesOperationsClient.GetCacheNodeInstallDetails // method. type IspCacheNodesOperationsClientGetCacheNodeInstallDetailsOptions struct { // placeholder for future optional parameters } +// IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions contains the optional parameters for the IspCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory +// method. +type IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryOptions struct { + // placeholder for future optional parameters +} + // IspCacheNodesOperationsClientGetOptions contains the optional parameters for the IspCacheNodesOperationsClient.Get method. type IspCacheNodesOperationsClientGetOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/responses.go b/sdk/resourcemanager/connectedcache/armconnectedcache/responses.go index 501b070cb846..d53d309f3cb4 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/responses.go +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/responses.go @@ -4,79 +4,6 @@ package armconnectedcache -// CacheNodesOperationsClientCreateorUpdateResponse contains the response from method CacheNodesOperationsClient.BeginCreateorUpdate. -type CacheNodesOperationsClientCreateorUpdateResponse struct { - // Concrete tracked resource types can be created by aliasing this type using a specific property type. - CacheNodePreviewResource -} - -// CacheNodesOperationsClientDeleteResponse contains the response from method CacheNodesOperationsClient.Delete. -type CacheNodesOperationsClientDeleteResponse struct { - // placeholder for future response values -} - -// CacheNodesOperationsClientGetResponse contains the response from method CacheNodesOperationsClient.Get. -type CacheNodesOperationsClientGetResponse struct { - // Concrete tracked resource types can be created by aliasing this type using a specific property type. - CacheNodePreviewResource -} - -// CacheNodesOperationsClientListByResourceGroupResponse contains the response from method CacheNodesOperationsClient.NewListByResourceGroupPager. -type CacheNodesOperationsClientListByResourceGroupResponse struct { - // The response of a CacheNodePreviewResource list operation. - CacheNodePreviewResourceListResult -} - -// CacheNodesOperationsClientListBySubscriptionResponse contains the response from method CacheNodesOperationsClient.NewListBySubscriptionPager. -type CacheNodesOperationsClientListBySubscriptionResponse struct { - // The response of a CacheNodePreviewResource list operation. - CacheNodePreviewResourceListResult -} - -// CacheNodesOperationsClientUpdateResponse contains the response from method CacheNodesOperationsClient.Update. -type CacheNodesOperationsClientUpdateResponse struct { - // Concrete tracked resource types can be created by aliasing this type using a specific property type. - CacheNodePreviewResource -} - -// EnterpriseCustomerOperationsClientCreateOrUpdateResponse contains the response from method EnterpriseCustomerOperationsClient.BeginCreateOrUpdate. -type EnterpriseCustomerOperationsClientCreateOrUpdateResponse struct { - // ConnectedCache Resource. Represents the high level Nodes needed to provision CacheNode and customer resources used in private - // preview - EnterprisePreviewResource -} - -// EnterpriseCustomerOperationsClientDeleteResponse contains the response from method EnterpriseCustomerOperationsClient.Delete. -type EnterpriseCustomerOperationsClientDeleteResponse struct { - // placeholder for future response values -} - -// EnterpriseCustomerOperationsClientGetResponse contains the response from method EnterpriseCustomerOperationsClient.Get. -type EnterpriseCustomerOperationsClientGetResponse struct { - // ConnectedCache Resource. Represents the high level Nodes needed to provision CacheNode and customer resources used in private - // preview - EnterprisePreviewResource -} - -// EnterpriseCustomerOperationsClientListByResourceGroupResponse contains the response from method EnterpriseCustomerOperationsClient.NewListByResourceGroupPager. -type EnterpriseCustomerOperationsClientListByResourceGroupResponse struct { - // The response of a EnterprisePreviewResource list operation. - EnterprisePreviewResourceListResult -} - -// EnterpriseCustomerOperationsClientListBySubscriptionResponse contains the response from method EnterpriseCustomerOperationsClient.NewListBySubscriptionPager. -type EnterpriseCustomerOperationsClientListBySubscriptionResponse struct { - // The response of a EnterprisePreviewResource list operation. - EnterprisePreviewResourceListResult -} - -// EnterpriseCustomerOperationsClientUpdateResponse contains the response from method EnterpriseCustomerOperationsClient.Update. -type EnterpriseCustomerOperationsClientUpdateResponse struct { - // ConnectedCache Resource. Represents the high level Nodes needed to provision CacheNode and customer resources used in private - // preview - EnterprisePreviewResource -} - // EnterpriseMccCacheNodesOperationsClientCreateOrUpdateResponse contains the response from method EnterpriseMccCacheNodesOperationsClient.BeginCreateOrUpdate. type EnterpriseMccCacheNodesOperationsClientCreateOrUpdateResponse struct { // Represents the high level Nodes needed to provision cache node resources @@ -88,12 +15,30 @@ type EnterpriseMccCacheNodesOperationsClientDeleteResponse struct { // placeholder for future response values } +// EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse contains the response from method EnterpriseMccCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory. +type EnterpriseMccCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse struct { + // Mcc cache node resource auto update history. + MccCacheNodeAutoUpdateHistory +} + // EnterpriseMccCacheNodesOperationsClientGetCacheNodeInstallDetailsResponse contains the response from method EnterpriseMccCacheNodesOperationsClient.GetCacheNodeInstallDetails. type EnterpriseMccCacheNodesOperationsClientGetCacheNodeInstallDetailsResponse struct { // Mcc cache node resource all install details. MccCacheNodeInstallDetails } +// EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse contains the response from method EnterpriseMccCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory. +type EnterpriseMccCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse struct { + // Mcc cache node resource issue history. + MccCacheNodeIssueHistory +} + +// EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse contains the response from method EnterpriseMccCacheNodesOperationsClient.GetCacheNodeTLSCertificateHistory. +type EnterpriseMccCacheNodesOperationsClientGetCacheNodeTLSCertificateHistoryResponse struct { + // Mcc cache node resource Tls certificate history details. + MccCacheNodeTLSCertificateHistory +} + // EnterpriseMccCacheNodesOperationsClientGetResponse contains the response from method EnterpriseMccCacheNodesOperationsClient.Get. type EnterpriseMccCacheNodesOperationsClientGetResponse struct { // Represents the high level Nodes needed to provision cache node resources @@ -164,12 +109,24 @@ type IspCacheNodesOperationsClientGetBgpCidrsResponse struct { MccCacheNodeBgpCidrDetails } +// IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse contains the response from method IspCacheNodesOperationsClient.GetCacheNodeAutoUpdateHistory. +type IspCacheNodesOperationsClientGetCacheNodeAutoUpdateHistoryResponse struct { + // Mcc cache node resource auto update history. + MccCacheNodeAutoUpdateHistory +} + // IspCacheNodesOperationsClientGetCacheNodeInstallDetailsResponse contains the response from method IspCacheNodesOperationsClient.GetCacheNodeInstallDetails. type IspCacheNodesOperationsClientGetCacheNodeInstallDetailsResponse struct { // Mcc cache node resource all install details. MccCacheNodeInstallDetails } +// IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse contains the response from method IspCacheNodesOperationsClient.GetCacheNodeMccIssueDetailsHistory. +type IspCacheNodesOperationsClientGetCacheNodeMccIssueDetailsHistoryResponse struct { + // Mcc cache node resource issue history. + MccCacheNodeIssueHistory +} + // IspCacheNodesOperationsClientGetResponse contains the response from method IspCacheNodesOperationsClient.Get. type IspCacheNodesOperationsClientGetResponse struct { // Represents the high level Nodes needed to provision cache node resources diff --git a/sdk/resourcemanager/connectedcache/armconnectedcache/tsp-location.yaml b/sdk/resourcemanager/connectedcache/armconnectedcache/tsp-location.yaml index 1ebce821159f..f0d880aeeed5 100644 --- a/sdk/resourcemanager/connectedcache/armconnectedcache/tsp-location.yaml +++ b/sdk/resourcemanager/connectedcache/armconnectedcache/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/connectedcache/ConnectedCache.Management -commit: d477c7caa09bf82e22c419be0a99d170552b5892 +commit: bd63bf3710616fd0dc1d883b0760899ca7f9babd repo: Azure/azure-rest-api-specs additionalDirectories: